- WPCS for defined constants;

* um_url -> UM_URL
   * um_path -> UM_PATH
   * um_plugin -> UM_PLUGIN
   * ultimatemember_version -> UM_VERSION
   * ultimatemember_plugin_name -> UM_PLUGIN_NAME
This commit is contained in:
Mykyta Synelnikov
2023-09-13 22:56:32 +03:00
parent 57159f2496
commit b83da8b814
25 changed files with 213 additions and 213 deletions
+56 -56
View File
@@ -62,11 +62,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
* Admin_Enqueue constructor.
*/
public function __construct() {
$this->js_url = um_url . 'includes/admin/assets/js/';
$this->css_url = um_url . 'includes/admin/assets/css/';
$this->js_url = UM_URL . 'includes/admin/assets/js/';
$this->css_url = UM_URL . 'includes/admin/assets/css/';
$this->front_js_baseurl = um_url . 'assets/js/';
$this->front_css_baseurl = um_url . 'assets/css/';
$this->front_js_baseurl = UM_URL . 'assets/js/';
$this->front_css_baseurl = UM_URL . 'assets/css/';
$this->suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || defined( 'UM_SCRIPT_DEBUG' ) ) ? '' : '.min';
@@ -98,22 +98,22 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
* Enqueue Gutenberg Block Editor assets
*/
public function block_editor() {
wp_register_style( 'um_ui', um_url . 'assets/css/jquery-ui.css', array(), ultimatemember_version );
wp_register_style( 'um_members', um_url . 'assets/css/um-members.css', array( 'um_ui' ), ultimatemember_version );
wp_register_style( 'um_ui', UM_URL . 'assets/css/jquery-ui.css', array(), UM_VERSION );
wp_register_style( 'um_members', UM_URL . 'assets/css/um-members.css', array( 'um_ui' ), UM_VERSION );
if ( is_rtl() ) {
wp_register_style( 'um_members_rtl', um_url . 'assets/css/um-members-rtl.css', array( 'um_members' ), ultimatemember_version );
wp_register_style( 'um_members_rtl', UM_URL . 'assets/css/um-members-rtl.css', array( 'um_members' ), UM_VERSION );
}
wp_register_style( 'um_styles', um_url . 'assets/css/um-styles.css', array(), ultimatemember_version );
wp_register_style( 'um_profile', um_url . 'assets/css/um-profile.css', array(), ultimatemember_version );
wp_register_style( 'um_crop', um_url . 'assets/css/um-crop.css', array(), ultimatemember_version );
wp_register_style( 'um_responsive', um_url . 'assets/css/um-responsive.css', array( 'um_profile', 'um_crop' ), ultimatemember_version );
wp_register_style( 'um_account', um_url . 'assets/css/um-account.css', array(), ultimatemember_version );
wp_register_style( 'um_default_css', um_url . 'assets/css/um-old-default.css', array(), ultimatemember_version );
wp_register_style( 'um_fonticons_fa', um_url . 'assets/css/um-fonticons-fa.css', array(), ultimatemember_version );
wp_register_style( 'select2', um_url . 'assets/css/select2/select2' . $this->suffix . '.css', array(), ultimatemember_version );
wp_register_style( 'um_fonticons_ii', um_url . 'assets/css/um-fonticons-ii.css', array(), ultimatemember_version );
wp_register_style( 'um_styles', UM_URL . 'assets/css/um-styles.css', array(), UM_VERSION );
wp_register_style( 'um_profile', UM_URL . 'assets/css/um-profile.css', array(), UM_VERSION );
wp_register_style( 'um_crop', UM_URL . 'assets/css/um-crop.css', array(), UM_VERSION );
wp_register_style( 'um_responsive', UM_URL . 'assets/css/um-responsive.css', array( 'um_profile', 'um_crop' ), UM_VERSION );
wp_register_style( 'um_account', UM_URL . 'assets/css/um-account.css', array(), UM_VERSION );
wp_register_style( 'um_default_css', UM_URL . 'assets/css/um-old-default.css', array(), UM_VERSION );
wp_register_style( 'um_fonticons_fa', UM_URL . 'assets/css/um-fonticons-fa.css', array(), UM_VERSION );
wp_register_style( 'select2', UM_URL . 'assets/css/select2/select2' . $this->suffix . '.css', array(), UM_VERSION );
wp_register_style( 'um_fonticons_ii', UM_URL . 'assets/css/um-fonticons-ii.css', array(), UM_VERSION );
wp_register_script( 'um_admin_blocks_shortcodes', um_url . 'assets/js/um-blocks' . $this->suffix . '.js', array( 'wp-i18n', 'wp-blocks', 'wp-components' ), ultimatemember_version, true );
wp_register_script( 'um_admin_blocks_shortcodes', UM_URL . 'assets/js/um-blocks' . $this->suffix . '.js', array( 'wp-i18n', 'wp-blocks', 'wp-components' ), UM_VERSION, true );
wp_set_script_translations( 'um_admin_blocks_shortcodes', 'ultimate-member' );
if ( ! empty( UM()->account()->get_tab_fields( 'notifications', array() ) ) ) {
@@ -149,12 +149,12 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
wp_enqueue_script( 'um_admin_blocks_shortcodes' );
wp_register_script( 'select2', um_url . 'assets/js/select2/select2.full' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry' ), ultimatemember_version, true );
wp_register_script( 'um_datetime', um_url . 'assets/js/pickadate/picker.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_datetime_date', um_url . 'assets/js/pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script( 'um_datetime_time', um_url . 'assets/js/pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script( 'um_conditional', um_url . 'assets/js/um-conditional' . $this->suffix . '.js', array( 'jquery', 'wp-hooks' ), ultimatemember_version, true );
wp_register_script( 'um_scripts', um_url . 'assets/js/um-scripts' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_conditional', 'um_datetime', 'um_datetime_date', 'um_datetime_time', 'select2' ), ultimatemember_version, true );
wp_register_script( 'select2', UM_URL . 'assets/js/select2/select2.full' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry' ), UM_VERSION, true );
wp_register_script( 'um_datetime', UM_URL . 'assets/js/pickadate/picker.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_datetime_date', UM_URL . 'assets/js/pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
wp_register_script( 'um_datetime_time', UM_URL . 'assets/js/pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
wp_register_script( 'um_conditional', UM_URL . 'assets/js/um-conditional' . $this->suffix . '.js', array( 'jquery', 'wp-hooks' ), UM_VERSION, true );
wp_register_script( 'um_scripts', UM_URL . 'assets/js/um-scripts' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_conditional', 'um_datetime', 'um_datetime_date', 'um_datetime_time', 'select2' ), UM_VERSION, true );
$max_upload_size = wp_max_upload_size();
if ( ! $max_upload_size ) {
$max_upload_size = 0;
@@ -169,14 +169,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
);
wp_localize_script( 'um_scripts', 'um_scripts', $localize_data );
wp_register_script( 'um_dropdown', um_url . 'assets/js/dropdown' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_members', um_url . 'assets/js/um-members' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'jquery-ui-slider', 'um_dropdown', 'wp-hooks', 'jquery-masonry', 'um_scripts' ), ultimatemember_version, true );
wp_register_script( 'um_dropdown', UM_URL . 'assets/js/dropdown' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_members', UM_URL . 'assets/js/um-members' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'jquery-ui-slider', 'um_dropdown', 'wp-hooks', 'jquery-masonry', 'um_scripts' ), UM_VERSION, true );
wp_register_script( 'um_account', um_url . 'assets/js/um-account' . $this->suffix . '.js', array( 'jquery', 'wp-hooks' ), ultimatemember_version, true );
wp_register_script( 'um_scrollbar', um_url . 'assets/js/simplebar' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_crop', um_url . 'assets/js/um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_functions', um_url . 'assets/js/um-functions' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
wp_register_script( 'um_responsive', um_url . 'assets/js/um-responsive' . $this->suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), ultimatemember_version, true );
wp_register_script( 'um_account', UM_URL . 'assets/js/um-account' . $this->suffix . '.js', array( 'jquery', 'wp-hooks' ), UM_VERSION, true );
wp_register_script( 'um_scrollbar', UM_URL . 'assets/js/simplebar' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_crop', UM_URL . 'assets/js/um-crop' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_functions', UM_URL . 'assets/js/um-functions' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), UM_VERSION, true );
wp_register_script( 'um_responsive', UM_URL . 'assets/js/um-responsive' . $this->suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), UM_VERSION, true );
// render blocks
wp_enqueue_script( 'um_datetime' );
@@ -239,33 +239,33 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
}
wp_register_script( 'select2', $this->front_js_baseurl . 'select2/select2.full' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry' ), '4.0.13', true );
wp_register_script( 'um_jquery_form', $this->front_js_baseurl . 'um-jquery-form' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_fileupload', $this->front_js_baseurl . 'um-fileupload.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_crop', $this->front_js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_tipsy', $this->front_js_baseurl . 'um-tipsy' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_functions', $this->front_js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'um_tipsy', 'um_scrollbar' ), ultimatemember_version, true );
wp_register_script( 'um_jquery_form', $this->front_js_baseurl . 'um-jquery-form' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_fileupload', $this->front_js_baseurl . 'um-fileupload.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_crop', $this->front_js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_tipsy', $this->front_js_baseurl . 'um-tipsy' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_functions', $this->front_js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'um_tipsy', 'um_scrollbar' ), UM_VERSION, true );
wp_register_script( 'um_datetime', $this->front_js_baseurl . 'pickadate/picker.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_datetime_date', $this->front_js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script( 'um_datetime_time', $this->front_js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
//wp_register_script( 'um_datetime_legacy', $this->front_js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script( 'um_datetime', $this->front_js_baseurl . 'pickadate/picker.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_datetime_date', $this->front_js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
wp_register_script( 'um_datetime_time', $this->front_js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
//wp_register_script( 'um_datetime_legacy', $this->front_js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
// load a localized version for date/time
$locale = get_locale();
if ( $locale ) {
if ( file_exists( WP_LANG_DIR . '/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js' ) ) {
wp_register_script( 'um_datetime_locale', content_url() . '/languages/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
} elseif ( file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
wp_register_script( 'um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script( 'um_datetime_locale', content_url() . '/languages/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
} elseif ( file_exists( UM_PATH . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
wp_register_script( 'um_datetime_locale', UM_URL . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
}
}
wp_register_script( 'um_scripts', $this->front_js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'um_functions', 'um_crop', 'um_raty', 'select2', 'um_jquery_form', 'um_fileupload', 'um_datetime', 'um_datetime_date', 'um_datetime_time'/*, 'um_datetime_legacy'*/ ), ultimatemember_version, true );
wp_register_script( 'um_responsive', $this->front_js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'um_scripts' ), ultimatemember_version, true );
wp_register_script( 'um_modal', $this->front_js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'um_responsive' ), ultimatemember_version, true );
wp_register_script( 'um_scripts', $this->front_js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'um_functions', 'um_crop', 'um_raty', 'select2', 'um_jquery_form', 'um_fileupload', 'um_datetime', 'um_datetime_date', 'um_datetime_time'/*, 'um_datetime_legacy'*/ ), UM_VERSION, true );
wp_register_script( 'um_responsive', $this->front_js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'um_scripts' ), UM_VERSION, true );
wp_register_script( 'um_modal', $this->front_js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'um_responsive' ), UM_VERSION, true );
wp_register_style( 'select2', $this->front_css_baseurl . 'select2/select2' . $this->suffix . '.css', array(), '4.0.13' );
wp_register_style( 'um_datetime', $this->front_css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
wp_register_style( 'um_datetime_date', $this->front_css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
wp_register_style( 'um_datetime', $this->front_css_baseurl . 'pickadate/default.css', array(), UM_VERSION );
wp_register_style( 'um_datetime_date', $this->front_css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), UM_VERSION );
wp_register_style( 'um_datetime_time', $this->front_css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
wp_register_style( 'um_scrollbar', $this->front_css_baseurl . 'simplebar.css', array(), ultimatemember_version );
@@ -485,8 +485,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
* Load functions js
*/
public function load_functions() {
wp_register_script( 'um_scrollbar', um_url . 'assets/js/simplebar.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_functions', um_url . 'assets/js/um-functions.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
wp_register_script( 'um_scrollbar', UM_URL . 'assets/js/simplebar.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_functions', UM_URL . 'assets/js/um-functions.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
wp_enqueue_script( 'um_functions' );
}
@@ -495,10 +495,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
* Load Fonticons
*/
public function load_fonticons() {
wp_register_style( 'um_fonticons_ii', um_url . 'assets/css/um-fonticons-ii.css', array(), ultimatemember_version );
wp_register_style( 'um_fonticons_ii', UM_URL . 'assets/css/um-fonticons-ii.css', array(), ultimatemember_version );
wp_enqueue_style( 'um_fonticons_ii' );
wp_register_style( 'um_fonticons_fa', um_url . 'assets/css/um-fonticons-fa.css', array(), ultimatemember_version );
wp_register_style( 'um_fonticons_fa', UM_URL . 'assets/css/um-fonticons-fa.css', array(), ultimatemember_version );
wp_enqueue_style( 'um_fonticons_fa' );
}
@@ -528,8 +528,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
if ( $locale ) {
if ( file_exists( WP_LANG_DIR . '/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js' ) ) {
wp_register_script( 'um_datetime_locale', content_url() . '/languages/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
} elseif ( file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
wp_register_script( 'um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
} elseif ( file_exists( UM_PATH . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
wp_register_script( 'um_datetime_locale', UM_URL . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
}
}
@@ -694,10 +694,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
UM()->enqueue()->load_modal();
UM()->enqueue()->load_responsive();
wp_register_script( 'um_raty', um_url . 'assets/js/um-raty' . UM()->enqueue()->suffix . '.js', array( 'jquery', 'wp-i18n' ), ultimatemember_version, true );
wp_register_style( 'um_raty', um_url . 'assets/css/um-raty.css', array(), ultimatemember_version );
wp_register_script( 'um_raty', UM_URL . 'assets/js/um-raty' . UM()->enqueue()->suffix . '.js', array( 'jquery', 'wp-i18n' ), ultimatemember_version, true );
wp_register_style( 'um_raty', UM_URL . 'assets/css/um-raty.css', array(), ultimatemember_version );
wp_register_style( 'um_default_css', um_url . 'assets/css/um-old-default.css', '', ultimatemember_version, 'all' );
wp_register_style( 'um_default_css', UM_URL . 'assets/css/um-old-default.css', '', ultimatemember_version, 'all' );
wp_enqueue_style( 'um_default_css' );
if ( is_rtl() ) {
+4 -4
View File
@@ -137,7 +137,7 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
*/
function plugin_add_suggested_privacy_content() {
$content = $this->plugin_get_default_privacy_content();
wp_add_privacy_policy_content( ultimatemember_plugin_name, $content );
wp_add_privacy_policy_content( UM_PLUGIN_NAME, $content );
}
@@ -152,7 +152,7 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
*/
function plugin_register_exporters( $exporters ) {
$exporters[] = array(
'exporter_friendly_name' => ultimatemember_plugin_name,
'exporter_friendly_name' => UM_PLUGIN_NAME,
'callback' => array( &$this, 'data_exporter' )
);
return $exporters;
@@ -222,7 +222,7 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
// If you define your own group, the first exporter to
// include a label will be used as the group label in the
// final exported report
$group_label = ultimatemember_plugin_name;
$group_label = UM_PLUGIN_NAME;
// Plugins can add as many items in the item data array as they want
//$data = array();
@@ -257,7 +257,7 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
*/
function plugin_register_erasers( $erasers = array() ) {
$erasers[] = array(
'eraser_friendly_name' => ultimatemember_plugin_name,
'eraser_friendly_name' => UM_PLUGIN_NAME,
'callback' => array( &$this, 'data_eraser' )
);
return $erasers;
+3 -3
View File
@@ -192,9 +192,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
*/
function um_roles_pages() {
if ( empty( $_GET['tab'] ) ) {
include_once um_path . 'includes/admin/core/list-tables/roles-list-table.php';
include_once UM_PATH . 'includes/admin/core/list-tables/roles-list-table.php';
} elseif ( 'add' === sanitize_key( $_GET['tab'] ) || 'edit' === sanitize_key( $_GET['tab'] ) ) {
include_once um_path . 'includes/admin/templates/role/role-edit.php';
include_once UM_PATH . 'includes/admin/templates/role/role-edit.php';
} else {
um_js_redirect( add_query_arg( array( 'page' => 'um_roles' ), get_admin_url( 'admin.php' ) ) );
}
@@ -301,7 +301,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
<div id="um-metaboxes-general" class="wrap">
<h1>Ultimate Member <sup><?php echo ultimatemember_version; ?></sup></h1>
<h1>Ultimate Member <sup><?php echo UM_VERSION; ?></sup></h1>
<?php wp_nonce_field( 'um-metaboxes-general' ); ?>
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
+7 -7
View File
@@ -710,7 +710,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$path = $matches[0];
$box['id'] = preg_replace('~(\\{[^}]+\\})~','', $box['id'] );
} else {
$path = um_path;
$path = UM_PATH;
}
$path = str_replace('{','', $path );
@@ -746,7 +746,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$path = $matches[0];
$box['id'] = preg_replace('~(\\{[^}]+\\})~','', $box['id'] );
} else {
$path = um_path;
$path = UM_PATH;
}
$path = str_replace('{','', $path );
@@ -778,7 +778,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$path = $matches[0];
$box['id'] = preg_replace('~(\\{[^}]+\\})~','', $box['id'] );
} else {
$path = um_path;
$path = UM_PATH;
}
$path = str_replace('{','', $path );
@@ -810,7 +810,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$path = $matches[0];
$box['id'] = preg_replace('~(\\{[^}]+\\})~','', $box['id'] );
} else {
$path = um_path;
$path = UM_PATH;
}
$path = str_replace('{','', $path );
@@ -1229,17 +1229,17 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$screen = get_current_screen();
if ( isset( $screen->id ) && strstr( $screen->id, 'um_form' ) ) {
foreach ( glob( um_path . 'includes/admin/templates/modal/forms/*.php' ) as $modal_content ) {
foreach ( glob( UM_PATH . 'includes/admin/templates/modal/forms/*.php' ) as $modal_content ) {
include_once $modal_content;
}
}
if ( $this->init_icon ) {
include_once um_path . 'includes/admin/templates/modal/forms/fonticons.php';
include_once UM_PATH . 'includes/admin/templates/modal/forms/fonticons.php';
}
if ( 'users' === $screen->id ) {
include_once um_path . 'includes/admin/templates/modal/dynamic_registration_preview.php';
include_once UM_PATH . 'includes/admin/templates/modal/dynamic_registration_preview.php';
}
// needed on forms only
+11 -11
View File
@@ -365,7 +365,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
array(
'class' => 'error',
// translators: %1$s is a plugin name; %2$s is a plugin version; %3$s is a plugin name; %4$s is a doc link.
'message' => '<p>' . sprintf( __( '<strong>%1$s %2$s</strong> requires 2.0 extensions. You have pre 2.0 extensions installed on your site. <br /> Please update %3$s extensions to latest versions. For more info see this <a href="%4$s" target="_blank">doc</a>.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, 'https://docs.ultimatemember.com/article/201-how-to-update-your-site' ) . '</p>',
'message' => '<p>' . sprintf( __( '<strong>%1$s %2$s</strong> requires 2.0 extensions. You have pre 2.0 extensions installed on your site. <br /> Please update %3$s extensions to latest versions. For more info see this <a href="%4$s" target="_blank">doc</a>.', 'ultimate-member' ), UM_PLUGIN_NAME, UM_VERSION, UM_PLUGIN_NAME, 'https://docs.ultimatemember.com/article/201-how-to-update-your-site' ) . '</p>',
),
0
);
@@ -396,7 +396,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
<p>
<?php
// translators: %s: Plugin name.
echo wp_kses( sprintf( __( '%s needs to create several pages (User Profiles, Account, Registration, Login, Password Reset, Logout, Member Directory) to function correctly.', 'ultimate-member' ), ultimatemember_plugin_name ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( '%s needs to create several pages (User Profiles, Account, Registration, Login, Password Reset, Logout, Member Directory) to function correctly.', 'ultimate-member' ), UM_PLUGIN_NAME ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
@@ -569,7 +569,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
function check_wrong_install_folder() {
$invalid_folder = false;
$slug_array = explode( '/', um_plugin );
$slug_array = explode( '/', UM_PLUGIN );
if ( $slug_array[0] != 'ultimate-member' ) {
$invalid_folder = true;
}
@@ -580,7 +580,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
array(
'class' => 'error',
// translators: %s: Plugin name.
'message' => '<p>' . sprintf( __( 'You have installed <strong>%s</strong> with wrong folder name. Correct folder name is <strong>"ultimate-member"</strong>.', 'ultimate-member' ), ultimatemember_plugin_name ) . '</p>',
'message' => '<p>' . sprintf( __( 'You have installed <strong>%s</strong> with wrong folder name. Correct folder name is <strong>"ultimate-member"</strong>.', 'ultimate-member' ), UM_PLUGIN_NAME ) . '</p>',
),
1
);
@@ -615,7 +615,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
array(
'class' => 'error',
// translators: %1$s is a inactive license number; %2$s is a plugin name; %3$s is a store link.
'message' => '<p>' . sprintf( __( 'There are %1$s inactive %2$s license keys for this site. This site is not authorized to get plugin updates. You can active this site on <a href="%3$s">www.ultimatemember.com</a>.', 'ultimate-member' ), count( $arr_inactive_license_keys ), ultimatemember_plugin_name, UM()->store_url ) . '</p>',
'message' => '<p>' . sprintf( __( 'There are %1$s inactive %2$s license keys for this site. This site is not authorized to get plugin updates. You can active this site on <a href="%3$s">www.ultimatemember.com</a>.', 'ultimate-member' ), count( $arr_inactive_license_keys ), UM_PLUGIN_NAME, UM()->store_url ) . '</p>',
),
3
);
@@ -627,7 +627,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
array(
'class' => 'error',
// translators: %1$s is a invalid license; %2$s is a plugin name; %3$s is a license link.
'message' => '<p>' . sprintf( __( 'You have %1$s invalid or expired license keys for %2$s. Please go to the <a href="%3$s">Licenses page</a> to correct this issue.', 'ultimate-member' ), $invalid_license, ultimatemember_plugin_name, add_query_arg( array( 'page' => 'um_options', 'tab' => 'licenses' ), admin_url( 'admin.php' ) ) ) . '</p>',
'message' => '<p>' . sprintf( __( 'You have %1$s invalid or expired license keys for %2$s. Please go to the <a href="%3$s">Licenses page</a> to correct this issue.', 'ultimate-member' ), $invalid_license, UM_PLUGIN_NAME, add_query_arg( array( 'page' => 'um_options', 'tab' => 'licenses' ), admin_url( 'admin.php' ) ) ) . '</p>',
),
3
);
@@ -645,7 +645,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
<p>
<?php
// translators: %1$s is a plugin name; %2$s is a plugin version; %3$s is a plugin name; %4$s is a plugin version; %5$s is a upgrade link.
echo wp_kses( sprintf( __( '<strong>%1$s version %2$s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%3$s %4$s</strong>.<br />Please visit <a href="%5$s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( '<strong>%1$s version %2$s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%3$s %4$s</strong>.<br />Please visit <a href="%5$s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), UM_PLUGIN_NAME, UM_VERSION, UM_PLUGIN_NAME, UM_VERSION, $url ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
@@ -673,7 +673,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
array(
'class' => 'updated',
// translators: %1$s is a plugin name title; %2$s is a plugin version.
'message' => '<p>' . sprintf( __( '<strong>%1$s %2$s</strong> Successfully Upgraded', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version ) . '</p>',
'message' => '<p>' . sprintf( __( '<strong>%1$s %2$s</strong> Successfully Upgraded', 'ultimate-member' ), UM_PLUGIN_NAME, UM_VERSION ) . '</p>',
),
4
);
@@ -704,7 +704,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
<p>
<?php
// translators: %s: plugin name.
echo wp_kses( sprintf( __( 'Hey there! It\'s been one month since you installed %s. How have you found the plugin so far?', 'ultimate-member' ), ultimatemember_plugin_name ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( 'Hey there! It\'s been one month since you installed %s. How have you found the plugin so far?', 'ultimate-member' ), UM_PLUGIN_NAME ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<p>
@@ -715,7 +715,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
</div>
<div class="um_hidden_notice" data-key="love">
<p>
<?php printf( __( 'Great! We\'re happy to hear that you love the plugin. It would be amazing if you could let others know why you like %s by leaving a review of the plugin. This will help %s to grow and become more popular and would be massively appreciated by us!' ), ultimatemember_plugin_name, ultimatemember_plugin_name ); ?>
<?php printf( __( 'Great! We\'re happy to hear that you love the plugin. It would be amazing if you could let others know why you like %s by leaving a review of the plugin. This will help %s to grow and become more popular and would be massively appreciated by us!' ), UM_PLUGIN_NAME, UM_PLUGIN_NAME ); ?>
</p>
<p>
@@ -761,7 +761,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
<p>
<?php
// translators: %1$s is a plugin name; %2$s is a #.
echo wp_kses( sprintf( __( '<strong>%1$s</strong> future plans! Detailed future list is <a href="%2$s" target="_blank">here</a>', 'ultimate-member' ), ultimatemember_plugin_name, '#' ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( '<strong>%1$s</strong> future plans! Detailed future list is <a href="%2$s" target="_blank">here</a>', 'ultimate-member' ), UM_PLUGIN_NAME, '#' ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
+7 -7
View File
@@ -1474,7 +1474,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'tooltip' => __( 'You can change the default profile picture globally here. Please make sure that the photo is 300x300px.', 'ultimate-member' ),
'upload_frame_title' => __( 'Select Default Profile Photo', 'ultimate-member' ),
'default' => array(
'url' => um_url . 'assets/img/default_avatar.jpg',
'url' => UM_URL . 'assets/img/default_avatar.jpg',
),
),
array(
@@ -2660,7 +2660,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$emails = UM()->config()->email_notifications;
if ( empty( $email_key ) || empty( $emails[ $email_key ] ) ) {
include_once um_path . 'includes/admin/core/list-tables/emails-list-table.php';
include_once UM_PATH . 'includes/admin/core/list-tables/emails-list-table.php';
}
}
@@ -3121,7 +3121,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
</p>
<?php
include_once um_path . 'includes/admin/core/list-tables/version-template-list-table.php';
include_once UM_PATH . 'includes/admin/core/list-tables/version-template-list-table.php';
}
@@ -3132,7 +3132,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
*/
public function get_override_templates( $get_list = false ) {
$outdated_files = array();
$scan_files['um'] = $this->scan_template_files( um_path . '/templates/' );
$scan_files['um'] = $this->scan_template_files( UM_PATH . '/templates/' );
/**
* Filters an array of the template files for scanning versions.
*
@@ -3199,8 +3199,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$core_path = $located['core'];
$core_file_path = stristr( $core_path, 'wp-content' );
} else {
$core_path = um_path . '/templates/' . $core_file;
$core_file_path = stristr( um_path . 'templates/' . $core_file, 'wp-content' );
$core_path = UM_PATH . '/templates/' . $core_file;
$core_file_path = stristr( UM_PATH . 'templates/' . $core_file, 'wp-content' );
}
$core_version = $this->get_file_version( $core_path );
$theme_version = $this->get_file_version( $theme_file );
@@ -3312,7 +3312,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
global $wpdb;
if ( ! class_exists( '\Browser' ) )
require_once um_path . 'includes/lib/browser.php';
require_once UM_PATH . 'includes/lib/browser.php';
// Detect browser
$browser = new \Browser();
+5 -5
View File
@@ -69,7 +69,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
add_action( 'wp_loaded', array( $this, 'initialize_upgrade_packages' ), 0 );
}
add_action( 'in_plugin_update_message-' . um_plugin, array( $this, 'in_plugin_update_message' ) );
add_action( 'in_plugin_update_message-' . UM_PLUGIN, array( $this, 'in_plugin_update_message' ) );
}
/**
@@ -92,7 +92,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
function in_plugin_update_message( $args ) {
$show_additional_notice = false;
if ( isset( $args['new_version'] ) ) {
$old_version_array = explode( '.', ultimatemember_version );
$old_version_array = explode( '.', UM_VERSION );
$new_version_array = explode( '.', $args['new_version'] );
if ( $old_version_array[0] < $new_version_array[0] ) {
@@ -175,7 +175,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
$all_packages = $this->get_packages();
foreach ( $all_packages as $package ) {
if ( version_compare( $um_last_version_upgrade, $package, '<' ) && version_compare( $package, ultimatemember_version, '<=' ) ) {
if ( version_compare( $um_last_version_upgrade, $package, '<' ) && version_compare( $package, UM_VERSION, '<=' ) ) {
$diff_packages[] = $package;
}
}
@@ -257,13 +257,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
<h2>
<?php
// translators: %s: plugin name.
echo wp_kses( sprintf( __( '%s - Upgrade Process', 'ultimate-member' ), ultimatemember_plugin_name ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( '%s - Upgrade Process', 'ultimate-member' ), UM_PLUGIN_NAME ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</h2>
<p>
<?php
// translators: %1$s is a plugin version; %2$s is a last version upgrade.
echo wp_kses( sprintf( __( 'You have installed <strong>%1$s</strong> version. Your latest DB version is <strong>%2$s</strong>. We recommend creating a backup of your site before running the update process. Do not exit the page before the update process has complete.', 'ultimate-member' ), ultimatemember_version, $um_last_version_upgrade ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( 'You have installed <strong>%1$s</strong> version. Your latest DB version is <strong>%2$s</strong>. We recommend creating a backup of your site before running the update process. Do not exit the page before the update process has complete.', 'ultimate-member' ), UM_VERSION, $um_last_version_upgrade ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<p><?php _e( 'After clicking the <strong>"Run"</strong> button, the update process will start. All information will be displayed in the <strong>"Upgrade Log"</strong> field.', 'ultimate-member' ); ?></p>
@@ -50,7 +50,7 @@ function um_upgrade20beta1_get_template_file( $location, $template_name, $html =
$template_path = trailingslashit( get_stylesheet_directory() . '/ultimate-member/email' . $blog_id ). $template_name_file . $ext;
break;
case 'plugin':
$path = ! empty( UM()->mail()->path_by_slug[ $template_name ] ) ? UM()->mail()->path_by_slug[ $template_name ] : um_path . 'templates/email';
$path = ! empty( UM()->mail()->path_by_slug[ $template_name ] ) ? UM()->mail()->path_by_slug[ $template_name ] : UM_PATH . 'templates/email';
$template_path = trailingslashit( $path ) . $template_name . $ext;
break;
}
@@ -194,4 +194,4 @@ if ( is_multisite() ) {
restore_current_blog();
} else {
um_upgrade20beta1_email_templates_process();
}
}
+2 -2
View File
@@ -232,7 +232,7 @@ $free['terms-conditions'] = array(
<div class="plugin-card">
<div class="plugin-image-wrapper">
<a href="<?php echo esc_url( $info['url'] ); ?>" class="plugin-image<?php if ( false !== strpos( $info['img'], '.svg' ) ) { ?> svg-image<?php } ?>">
<img id="<?php echo esc_attr( 'um_' . $key . '_image' ); ?>" src="<?php echo esc_url( um_url . 'assets/img/extensions/' . $info['img'] ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
<img id="<?php echo esc_attr( 'um_' . $key . '_image' ); ?>" src="<?php echo esc_url( UM_URL . 'assets/img/extensions/' . $info['img'] ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
</a>
</div>
<div class="plugin-card-top">
@@ -261,7 +261,7 @@ $free['terms-conditions'] = array(
<div class="plugin-card">
<div class="plugin-image-wrapper">
<a href="<?php echo esc_url( $info['url'] ); ?>" class="plugin-image<?php if ( false !== strpos( $info['img'], '.svg' ) ) { ?> svg-image<?php } ?>">
<img id="<?php echo esc_attr( 'um_' . $key . '_image' ); ?>" src="<?php echo esc_url( um_url . 'assets/img/extensions/' . $info['img'] ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
<img id="<?php echo esc_attr( 'um_' . $key . '_image' ); ?>" src="<?php echo esc_url( UM_URL . 'assets/img/extensions/' . $info['img'] ); ?>" alt="<?php echo esc_attr( $info['name'] ) ?>" />
</a>
</div>
<div class="plugin-card-top">
+2 -2
View File
@@ -9,7 +9,7 @@
<p>
<?php
// translators: %s: plugin name.
echo wp_kses( sprintf( __( '%s provides you with forms for user registration, login and profiles.', 'ultimate-member' ), ultimatemember_plugin_name ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( '%s provides you with forms for user registration, login and profiles.', 'ultimate-member' ), UM_PLUGIN_NAME ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<p>
@@ -38,7 +38,7 @@
<p>
<?php
// translators: %s: plugin name.
echo wp_kses( sprintf( __( '%s does not send any user data outside of your site by default.', 'ultimate-member' ), ultimatemember_plugin_name ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( '%s does not send any user data outside of your site by default.', 'ultimate-member' ), UM_PLUGIN_NAME ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<p>
+5 -5
View File
@@ -187,20 +187,20 @@ if ( ! class_exists( 'um\Dependencies' ) ) {
*/
public function compare_versions( $um_required_ver, $ext_ver, $ext_key, $ext_title ) {
if ( version_compare( ultimatemember_version, $um_required_ver, '<' )
if ( version_compare( UM_VERSION, $um_required_ver, '<' )
|| empty( $this->ext_required_version[$ext_key] )
|| version_compare( $this->ext_required_version[$ext_key], $ext_ver, '>' ) ) {
$message = '';
if ( version_compare( ultimatemember_version, $um_required_ver, '<' ) ) {
if ( version_compare( UM_VERSION, $um_required_ver, '<' ) ) {
// translators: %1$s is a extension name; %2$s is a plugin name; %3$s is a required version.
$message = sprintf( __( 'This version of <strong>"%1$s"</strong> requires the core <strong>%2$s</strong> plugin to be <strong>%3$s</strong> or higher.', 'ultimate-member' ), $ext_title, ultimatemember_plugin_name, $um_required_ver ) .
$message = sprintf( __( 'This version of <strong>"%1$s"</strong> requires the core <strong>%2$s</strong> plugin to be <strong>%3$s</strong> or higher.', 'ultimate-member' ), $ext_title, UM_PLUGIN_NAME, $um_required_ver ) .
'<br />' .
// translators: %s: plugin name.
sprintf( __( 'Please update <strong>%s</strong> to the latest version.', 'ultimate-member' ), ultimatemember_plugin_name );
sprintf( __( 'Please update <strong>%s</strong> to the latest version.', 'ultimate-member' ), UM_PLUGIN_NAME );
} elseif ( empty( $this->ext_required_version[ $ext_key ] ) || version_compare( $this->ext_required_version[ $ext_key ], $ext_ver, '>' ) ) {
// translators: %1$s is a plugin name; %2$s is a extension name; %3$s is a extension version.
$message = sprintf( __( 'Sorry, but this version of <strong>%1$s</strong> does not work with extension <strong>"%2$s" %3$s</strong> version.', 'ultimate-member' ), ultimatemember_plugin_name, $ext_title, $ext_ver ) .
$message = sprintf( __( 'Sorry, but this version of <strong>%1$s</strong> does not work with extension <strong>"%2$s" %3$s</strong> version.', 'ultimate-member' ), UM_PLUGIN_NAME, $ext_title, $ext_ver ) .
'<br />' .
// translators: %s: extension name.
sprintf( __( 'Please update extension <strong>"%s"</strong> to the latest version.', 'ultimate-member' ), $ext_title );
+1 -1
View File
@@ -302,7 +302,7 @@ if ( ! class_exists( 'UM_Functions' ) ) {
if ( $path ) {
$template = trailingslashit( trailingslashit( WP_PLUGIN_DIR ) . $path );
} else {
$template = trailingslashit( um_path );
$template = trailingslashit( UM_PATH );
}
$template .= 'templates' . DIRECTORY_SEPARATOR . $template_name;
}
+8 -8
View File
@@ -215,9 +215,9 @@ if ( ! class_exists( 'UM' ) ) {
add_action( 'init', array( &$this, 'old_update_patch' ), 0 );
//run activation
register_activation_hook( um_plugin, array( &$this, 'activation' ) );
register_activation_hook( UM_PLUGIN, array( &$this, 'activation' ) );
register_deactivation_hook( um_plugin, array( &$this, 'deactivation' ) );
register_deactivation_hook( UM_PLUGIN, array( &$this, 'deactivation' ) );
if ( is_multisite() && ! defined( 'DOING_AJAX' ) ) {
add_action( 'wp_loaded', array( $this, 'maybe_network_activation' ) );
@@ -430,7 +430,7 @@ if ( ! class_exists( 'UM' ) ) {
$array = explode( '\\', strtolower( $class ) );
$array[ count( $array ) - 1 ] = 'class-'. end( $array );
if ( strpos( $class, 'um_ext' ) === 0 ) {
$full_path = str_replace( 'ultimate-member', '', untrailingslashit( um_path ) ) . str_replace( '_', '-', $array[1] ) . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR;
$full_path = str_replace( 'ultimate-member', '', untrailingslashit( UM_PATH ) ) . str_replace( '_', '-', $array[1] ) . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR;
unset( $array[0], $array[1] );
$path = implode( DIRECTORY_SEPARATOR, $array );
$path = str_replace( '_', '-', $path );
@@ -442,7 +442,7 @@ if ( ! class_exists( 'UM' ) ) {
array( 'um\\', '_', '\\' ),
array( $slash, '-', $slash ),
$class );
$full_path = um_path . 'includes' . $path . '.php';
$full_path = UM_PATH . 'includes' . $path . '.php';
}
if( isset( $full_path ) && file_exists( $full_path ) ) {
@@ -487,7 +487,7 @@ if ( ! class_exists( 'UM' ) ) {
delete_network_option( get_current_network_id(), 'um_maybe_network_wide_activation' );
if ( is_plugin_active_for_network( um_plugin ) ) {
if ( is_plugin_active_for_network( UM_PLUGIN ) ) {
// get all blogs
$blogs = get_sites();
if ( ! empty( $blogs ) ) {
@@ -510,7 +510,7 @@ if ( ! class_exists( 'UM' ) ) {
//first install
$version = get_option( 'um_version' );
if ( ! $version ) {
update_option( 'um_last_version_upgrade', ultimatemember_version );
update_option( 'um_last_version_upgrade', UM_VERSION );
add_option( 'um_first_activation_date', time() );
@@ -522,8 +522,8 @@ if ( ! class_exists( 'UM' ) ) {
UM()->options()->update( 'rest_api_version', '1.0' );
}
if ( $version != ultimatemember_version ) {
update_option( 'um_version', ultimatemember_version );
if ( $version != UM_VERSION ) {
update_option( 'um_version', UM_VERSION );
}
//run setup
+1 -1
View File
@@ -131,7 +131,7 @@ if ( ! class_exists( 'um\core\Blocks' ) ) {
foreach ( $blocks as $k => $block_data ) {
$block_type = str_replace( 'um-block/', '', $k );
register_block_type_from_metadata( um_path . 'includes/blocks/' . $block_type, $block_data );
register_block_type_from_metadata( UM_PATH . 'includes/blocks/' . $block_type, $block_data );
}
}
+50 -50
View File
@@ -40,8 +40,8 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
function __construct() {
$this->suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || defined( 'UM_SCRIPT_DEBUG' ) ) ? '' : '.min';
$this->js_baseurl = um_url . 'assets/js/';
$this->css_baseurl = um_url . 'assets/css/';
$this->js_baseurl = UM_URL . 'assets/js/';
$this->css_baseurl = UM_URL . 'assets/css/';
add_action( 'init', array( &$this, 'scripts_enqueue_priority' ) );
}
@@ -97,38 +97,38 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
}
wp_register_script( 'select2', $this->js_baseurl . 'select2/select2.full' . $this->suffix . '.js', array( 'jquery' ), '4.0.13', true );
wp_register_script( 'um_scrollbar', $this->js_baseurl . 'simplebar' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_scrollbar', $this->js_baseurl . 'simplebar' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_jquery_form', $this->js_baseurl . 'um-jquery-form' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_fileupload', $this->js_baseurl . 'um-fileupload.js', array( 'jquery', 'um_jquery_form' ), ultimatemember_version, true );
wp_register_script( 'um_jquery_form', $this->js_baseurl . 'um-jquery-form' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_fileupload', $this->js_baseurl . 'um-fileupload.js', array( 'jquery', 'um_jquery_form' ), UM_VERSION, true );
wp_register_script( 'um_datetime', $this->js_baseurl . 'pickadate/picker.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_datetime_date', $this->js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script( 'um_datetime_time', $this->js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
// wp_register_script( 'um_datetime_legacy', $this->js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script( 'um_datetime', $this->js_baseurl . 'pickadate/picker.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_datetime_date', $this->js_baseurl . 'pickadate/picker.date.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
wp_register_script( 'um_datetime_time', $this->js_baseurl . 'pickadate/picker.time.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
// wp_register_script( 'um_datetime_legacy', $this->js_baseurl . 'pickadate/legacy.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
// load a localized version for date/time
$locale = get_locale();
if ( $locale ) {
if ( file_exists( WP_LANG_DIR . '/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js' ) ) {
wp_register_script('um_datetime_locale', content_url() . '/languages/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
} elseif ( file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), ultimatemember_version, true );
wp_register_script('um_datetime_locale', content_url() . '/languages/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
} elseif ( file_exists( UM_PATH . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
wp_register_script('um_datetime_locale', UM_URL . 'assets/js/pickadate/translations/' . $locale . '.js', array( 'jquery', 'um_datetime' ), UM_VERSION, true );
}
}
wp_register_script( 'um_tipsy', $this->js_baseurl . 'um-tipsy' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_raty', $this->js_baseurl . 'um-raty' . $this->suffix . '.js', array( 'jquery', 'wp-i18n' ), ultimatemember_version, true );
wp_register_script( 'um_crop', $this->js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script( 'um_tipsy', $this->js_baseurl . 'um-tipsy' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_raty', $this->js_baseurl . 'um-raty' . $this->suffix . '.js', array( 'jquery', 'wp-i18n' ), UM_VERSION, true );
wp_register_script( 'um_crop', $this->js_baseurl . 'um-crop' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script( 'um_modal', $this->js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_crop' ), ultimatemember_version, true );
wp_register_script( 'um_modal', $this->js_baseurl . 'um-modal' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_crop' ), UM_VERSION, true );
wp_register_script('um_functions', $this->js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), ultimatemember_version, true );
wp_register_script( 'um_responsive', $this->js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), ultimatemember_version, true );
wp_register_script('um_functions', $this->js_baseurl . 'um-functions' . $this->suffix . '.js', array( 'jquery', 'jquery-masonry', 'wp-util', 'um_scrollbar' ), UM_VERSION, true );
wp_register_script( 'um_responsive', $this->js_baseurl . 'um-responsive' . $this->suffix . '.js', array( 'jquery', 'um_functions', 'um_crop' ), UM_VERSION, true );
wp_register_script( 'um-gdpr', $this->js_baseurl . 'um-gdpr' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, false );
wp_register_script('um_conditional', $this->js_baseurl . 'um-conditional' . $this->suffix . '.js', array( 'jquery', 'wp-hooks' ), ultimatemember_version, true );
wp_register_script('um_scripts', $this->js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_conditional', 'um_datetime', 'um_datetime_date', 'um_datetime_time', /*'um_datetime_legacy',*/ 'select2' ), ultimatemember_version, true );
wp_register_script( 'um-gdpr', $this->js_baseurl . 'um-gdpr' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, false );
wp_register_script('um_conditional', $this->js_baseurl . 'um-conditional' . $this->suffix . '.js', array( 'jquery', 'wp-hooks' ), UM_VERSION, true );
wp_register_script('um_scripts', $this->js_baseurl . 'um-scripts' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'um_conditional', 'um_datetime', 'um_datetime_date', 'um_datetime_time', /*'um_datetime_legacy',*/ 'select2' ), UM_VERSION, true );
/**
* UM hook
*
@@ -162,15 +162,15 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
) );
wp_localize_script( 'um_scripts', 'um_scripts', $localize_data );
wp_register_script('um_dropdown', $this->js_baseurl . 'dropdown' . $this->suffix . '.js', array( 'jquery' ), ultimatemember_version, true );
wp_register_script('um_dropdown', $this->js_baseurl . 'dropdown' . $this->suffix . '.js', array( 'jquery' ), UM_VERSION, true );
wp_register_script('um_members', $this->js_baseurl . 'um-members' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'jquery-ui-slider', 'um_dropdown', 'wp-hooks', 'jquery-masonry', 'um_scripts' ), ultimatemember_version, true );
wp_register_script('um_profile', $this->js_baseurl . 'um-profile' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'wp-i18n' ), ultimatemember_version, true );
wp_register_script('um_members', $this->js_baseurl . 'um-members' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'jquery-ui-slider', 'um_dropdown', 'wp-hooks', 'jquery-masonry', 'um_scripts' ), UM_VERSION, true );
wp_register_script('um_profile', $this->js_baseurl . 'um-profile' . $this->suffix . '.js', array( 'jquery', 'wp-util', 'wp-i18n' ), UM_VERSION, true );
$account_deps = apply_filters( 'um_account_scripts_dependencies', array( 'jquery', 'wp-hooks' ) );
wp_register_script('um_account', $this->js_baseurl . 'um-account' . $this->suffix . '.js', $account_deps, ultimatemember_version, true );
wp_register_script('um_account', $this->js_baseurl . 'um-account' . $this->suffix . '.js', $account_deps, UM_VERSION, true );
wp_register_script( 'um_gchart', 'https://www.google.com/jsapi', array(), ultimatemember_version, true );
wp_register_script( 'um_gchart', 'https://www.google.com/jsapi', array(), UM_VERSION, true );
}
@@ -180,36 +180,36 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
function register_styles() {
//FontAwesome and FontIcons styles
wp_register_style( 'um_fonticons_ii', $this->css_baseurl . 'um-fonticons-ii.css', array(), ultimatemember_version );
wp_register_style( 'um_fonticons_fa', $this->css_baseurl . 'um-fonticons-fa.css', array(), ultimatemember_version );
wp_register_style( 'um_crop', $this->css_baseurl . 'um-crop.css', array(), ultimatemember_version );
wp_register_style( 'um_tipsy', $this->css_baseurl . 'um-tipsy.css', array(), ultimatemember_version );
wp_register_style( 'um_raty', $this->css_baseurl . 'um-raty.css', array(), ultimatemember_version );
wp_register_style( 'um_fonticons_ii', $this->css_baseurl . 'um-fonticons-ii.css', array(), UM_VERSION );
wp_register_style( 'um_fonticons_fa', $this->css_baseurl . 'um-fonticons-fa.css', array(), UM_VERSION );
wp_register_style( 'um_crop', $this->css_baseurl . 'um-crop.css', array(), UM_VERSION );
wp_register_style( 'um_tipsy', $this->css_baseurl . 'um-tipsy.css', array(), UM_VERSION );
wp_register_style( 'um_raty', $this->css_baseurl . 'um-raty.css', array(), UM_VERSION );
wp_register_style( 'select2', $this->css_baseurl . 'select2/select2.min.css', array(), '4.0.13' );
wp_register_style( 'um_fileupload', $this->css_baseurl . 'um-fileupload.css', array(), ultimatemember_version );
wp_register_style( 'um_datetime', $this->css_baseurl . 'pickadate/default.css', array(), ultimatemember_version );
wp_register_style( 'um_datetime_date', $this->css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), ultimatemember_version );
wp_register_style( 'um_datetime_time', $this->css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), ultimatemember_version );
wp_register_style( 'um_scrollbar', $this->css_baseurl . 'simplebar.css', array(), ultimatemember_version );
wp_register_style( 'um_fileupload', $this->css_baseurl . 'um-fileupload.css', array(), UM_VERSION );
wp_register_style( 'um_datetime', $this->css_baseurl . 'pickadate/default.css', array(), UM_VERSION );
wp_register_style( 'um_datetime_date', $this->css_baseurl . 'pickadate/default.date.css', array( 'um_datetime' ), UM_VERSION );
wp_register_style( 'um_datetime_time', $this->css_baseurl . 'pickadate/default.time.css', array( 'um_datetime' ), UM_VERSION );
wp_register_style( 'um_scrollbar', $this->css_baseurl . 'simplebar.css', array(), UM_VERSION );
wp_register_style( 'um_rtl', $this->css_baseurl . 'um.rtl.css', array(), ultimatemember_version );
wp_register_style( 'um_default_css', $this->css_baseurl . 'um-old-default.css', array(), ultimatemember_version );
wp_register_style( 'um_modal', $this->css_baseurl . 'um-modal.css', array( 'um_crop' ), ultimatemember_version );
wp_register_style( 'um_responsive', $this->css_baseurl . 'um-responsive.css', array( 'um_profile', 'um_crop' ), ultimatemember_version );
wp_register_style( 'um_rtl', $this->css_baseurl . 'um.rtl.css', array(), UM_VERSION );
wp_register_style( 'um_default_css', $this->css_baseurl . 'um-old-default.css', array(), UM_VERSION );
wp_register_style( 'um_modal', $this->css_baseurl . 'um-modal.css', array( 'um_crop' ), UM_VERSION );
wp_register_style( 'um_responsive', $this->css_baseurl . 'um-responsive.css', array( 'um_profile', 'um_crop' ), UM_VERSION );
wp_register_style( 'um_styles', $this->css_baseurl . 'um-styles.css', array(), ultimatemember_version );
wp_register_style( 'um_styles', $this->css_baseurl . 'um-styles.css', array(), UM_VERSION );
wp_register_style( 'um_ui', $this->css_baseurl . 'jquery-ui.css', array(), ultimatemember_version );
wp_register_style( 'um_ui', $this->css_baseurl . 'jquery-ui.css', array(), UM_VERSION );
wp_register_style( 'um_members', $this->css_baseurl . 'um-members.css', array( 'um_ui' ), ultimatemember_version );
wp_register_style( 'um_members', $this->css_baseurl . 'um-members.css', array( 'um_ui' ), UM_VERSION );
if ( is_rtl() ) {
wp_register_style( 'um_members_rtl', $this->css_baseurl . 'um-members-rtl.css', array( 'um_members' ), ultimatemember_version );
wp_register_style( 'um_members_rtl', $this->css_baseurl . 'um-members-rtl.css', array( 'um_members' ), UM_VERSION );
}
wp_register_style( 'um_profile', $this->css_baseurl . 'um-profile.css', array(), ultimatemember_version );
wp_register_style( 'um_account', $this->css_baseurl . 'um-account.css', array(), ultimatemember_version );
wp_register_style( 'um_misc', $this->css_baseurl . 'um-misc.css', array(), ultimatemember_version );
wp_register_style( 'um_profile', $this->css_baseurl . 'um-profile.css', array(), UM_VERSION );
wp_register_style( 'um_account', $this->css_baseurl . 'um-account.css', array(), UM_VERSION );
wp_register_style( 'um_misc', $this->css_baseurl . 'um-misc.css', array(), UM_VERSION );
}
@@ -247,7 +247,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
$uploads = wp_upload_dir();
$upload_dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . 'ultimatemember' . DIRECTORY_SEPARATOR;
if ( file_exists( $upload_dir . 'um_old_settings.css' ) ) {
wp_register_style( 'um_old_css', um_url . '../../uploads/ultimatemember/um_old_settings.css' );
wp_register_style( 'um_old_css', UM_URL . '../../uploads/ultimatemember/um_old_settings.css' );
wp_enqueue_style( 'um_old_css' );
}
}
@@ -376,7 +376,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) {
// load a localized version for date/time
$locale = get_locale();
if ( $locale && ( file_exists( WP_LANG_DIR . '/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js' ) || file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) ) {
if ( $locale && ( file_exists( WP_LANG_DIR . '/plugins/ultimate-member/assets/js/pickadate/' . $locale . '.js' ) || file_exists( UM_PATH . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) ) {
wp_enqueue_script('um_datetime_locale' );
}
@@ -455,7 +455,7 @@ if ( ! class_exists( 'um\core\External_Integrations' ) ) {
//if there isn't template at theme folder get template file from plugin dir
if ( ! $template ) {
$path = ! empty( UM()->mail()->path_by_slug[ $template_name ] ) ? UM()->mail()->path_by_slug[ $template_name ] : um_path . 'templates/email';
$path = ! empty( UM()->mail()->path_by_slug[ $template_name ] ) ? UM()->mail()->path_by_slug[ $template_name ] : UM_PATH . 'templates/email';
$template = trailingslashit( $path ) . $template_name . '.php';
}
+2 -2
View File
@@ -27,8 +27,8 @@ if ( ! class_exists( 'um\core\FontIcons' ) ) {
$cached_option = get_option( 'um_cache_fonticons', array() );
if ( empty( $cached_option ) ) {
$files['ii'] = um_path . 'assets/css/um-fonticons-ii.css';
$files['fa'] = um_path . 'assets/css/um-fonticons-fa.css';
$files['ii'] = UM_PATH . 'assets/css/um-fonticons-ii.css';
$files['fa'] = UM_PATH . 'assets/css/um-fonticons-fa.css';
$array = array();
foreach ( $files as $c => $file ) {
+1 -1
View File
@@ -36,7 +36,7 @@ if ( ! class_exists( 'um\core\GDPR' ) ) {
if ( file_exists( $template_path ) ) {
require $template_path;
} else {
require um_path . 'templates/gdpr-register.php';
require UM_PATH . 'templates/gdpr-register.php';
}
}
}
+2 -2
View File
@@ -139,7 +139,7 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
// If there isn't template at theme folder, get template file from plugin dir
if ( ! $template ) {
$path = ! empty( $this->path_by_slug[ $template_name ] ) ? $this->path_by_slug[ $template_name ] : um_path . 'templates/email';
$path = ! empty( $this->path_by_slug[ $template_name ] ) ? $this->path_by_slug[ $template_name ] : UM_PATH . 'templates/email';
$template = trailingslashit( $path ) . $template_name . '.php';
}
@@ -562,7 +562,7 @@ if ( ! class_exists( 'um\core\Mail' ) ) {
$template_path = trailingslashit( get_stylesheet_directory() . '/ultimate-member/email' . $blog_id ) . $template_name_file . '.php';
break;
case 'plugin':
$path = ! empty( $this->path_by_slug[ $template_name ] ) ? $this->path_by_slug[ $template_name ] : um_path . 'templates/email';
$path = ! empty( $this->path_by_slug[ $template_name ] ) ? $this->path_by_slug[ $template_name ] : UM_PATH . 'templates/email';
$template_path = trailingslashit( $path ) . $template_name . '.php';
break;
}
+2 -2
View File
@@ -39,7 +39,7 @@ if ( ! class_exists( 'um\core\Modal' ) ) {
function load_modal_content() {
if ( ! is_admin() ) {
$modal_templates = glob( um_path . 'templates/modal/*.php' );
$modal_templates = glob( UM_PATH . 'templates/modal/*.php' );
if ( ! empty( $modal_templates ) ) {
foreach ( $modal_templates as $modal_content ) {
@@ -51,4 +51,4 @@ if ( ! class_exists( 'um\core\Modal' ) ) {
}
}
}
}
+3 -3
View File
@@ -328,7 +328,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
// Avoid Directory Traversal vulnerability by the checking the realpath.
// Templates can be situated only in the get_stylesheet_directory() or plugindir templates.
$real_file = wp_normalize_path( realpath( $file ) );
if ( 0 === strpos( $real_file, wp_normalize_path( um_path . "templates" . DIRECTORY_SEPARATOR ) ) || 0 === strpos( $real_file, wp_normalize_path( get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'ultimate-member' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR ) ) ) {
if ( 0 === strpos( $real_file, wp_normalize_path( UM_PATH . "templates" . DIRECTORY_SEPARATOR ) ) || 0 === strpos( $real_file, wp_normalize_path( get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'ultimate-member' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR ) ) ) {
include $file;
}
}
@@ -1003,7 +1003,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
*/
function template_exists($template) {
$file = um_path . 'templates/' . $template . '.php';
$file = UM_PATH . 'templates/' . $template . '.php';
$theme_file = get_stylesheet_directory() . '/ultimate-member/templates/' . $template . '.php';
if (file_exists($theme_file) || file_exists($file)) {
@@ -1041,7 +1041,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
$array[ $excluded ] = __( 'Default Template', 'ultimate-member' );
}
$paths[] = glob( um_path . 'templates/' . '*.php' );
$paths[] = glob( UM_PATH . 'templates/' . '*.php' );
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/' ) ) {
$paths[] = glob( get_stylesheet_directory() . '/ultimate-member/templates/' . '*.php' );
+2 -2
View File
@@ -28,7 +28,7 @@ if ( ! class_exists( 'Templates' ) ) {
* @return string
*/
function get_template( $slug ) {
$file_list = um_path . "templates/{$slug}.php";
$file_list = UM_PATH . "templates/{$slug}.php";
$theme_file = get_stylesheet_directory() . "/ultimate-member/templates/{$slug}.php";
if ( file_exists( $theme_file ) ) {
@@ -38,4 +38,4 @@ if ( ! class_exists( 'Templates' ) ) {
return $file_list;
}
}
}
}
+1 -1
View File
@@ -538,7 +538,7 @@ if ( ! class_exists( 'um\core\rest\API' ) ) {
case 'xml' :
require_once um_path . 'includes/lib/array2xml.php';
require_once UM_PATH . 'includes/lib/array2xml.php';
$xml = \Array2XML::createXML( 'um', $this->data );
echo $xml->saveXML();
+1 -1
View File
@@ -2131,7 +2131,7 @@ function um_get_default_avatar_uri() {
$uri = UM()->options()->get( 'default_avatar' );
$uri = !empty( $uri['url'] ) ? $uri['url'] : '';
if ( ! $uri ) {
$uri = um_url . 'assets/img/default_avatar.jpg';
$uri = UM_URL . 'assets/img/default_avatar.jpg';
}
return set_url_scheme( $uri );
+34 -34
View File
@@ -9,16 +9,16 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
if ( ! defined( 'um_path' ) ) {
define( 'um_path', plugin_dir_path( __FILE__ ) );
if ( ! defined( 'UM_PATH' ) ) {
define( 'UM_PATH', plugin_dir_path( __FILE__ ) );
}
if ( ! defined( 'um_url' ) ) {
define( 'um_url', plugin_dir_url( __FILE__ ) );
if ( ! defined( 'UM_URL' ) ) {
define( 'UM_URL', plugin_dir_url( __FILE__ ) );
}
if ( ! defined( 'um_plugin' ) ) {
define( 'um_plugin', plugin_basename( __FILE__ ) );
if ( ! defined( 'UM_PLUGIN' ) ) {
define( 'UM_PLUGIN', plugin_basename( __FILE__ ) );
}
//for delete Email options only for Core email notifications
@@ -87,14 +87,14 @@ if ( ! empty( $delete_options ) ) {
update_option( $wp_roles->role_key, $wp_roles->roles );
}
//remove user role meta
$role_keys = get_option( 'um_roles', array() );
if ( $role_keys ) {
foreach ( $role_keys as $role_key ) {
delete_option( 'um_role_' . $role_key . '_meta' );
}
$um_custom_role_users = get_users(
array(
'role__in' => $role_keys,
@@ -135,37 +135,37 @@ if ( ! empty( $delete_options ) ) {
global $wpdb;
$wpdb->query(
"DELETE
FROM {$wpdb->usermeta}
WHERE meta_key LIKE '_um%' OR
meta_key LIKE 'um%' OR
meta_key LIKE 'reviews%' OR
meta_key = 'submitted' OR
meta_key = 'account_status' OR
meta_key = 'password_rst_attempts' OR
meta_key = 'profile_photo' OR
meta_key = '_enable_new_follow' OR
meta_key = '_enable_new_friend' OR
meta_key = '_mylists' OR
meta_key = '_enable_new_pm' OR
meta_key = '_hidden_conversations' OR
meta_key = '_pm_blocked' OR
meta_key = '_notifications_prefs' OR
meta_key = '_profile_progress' OR
meta_key = '_completed' OR
meta_key = '_cannot_add_review' OR
meta_key = 'synced_profile_photo' OR
"DELETE
FROM {$wpdb->usermeta}
WHERE meta_key LIKE '_um%' OR
meta_key LIKE 'um%' OR
meta_key LIKE 'reviews%' OR
meta_key = 'submitted' OR
meta_key = 'account_status' OR
meta_key = 'password_rst_attempts' OR
meta_key = 'profile_photo' OR
meta_key = '_enable_new_follow' OR
meta_key = '_enable_new_friend' OR
meta_key = '_mylists' OR
meta_key = '_enable_new_pm' OR
meta_key = '_hidden_conversations' OR
meta_key = '_pm_blocked' OR
meta_key = '_notifications_prefs' OR
meta_key = '_profile_progress' OR
meta_key = '_completed' OR
meta_key = '_cannot_add_review' OR
meta_key = 'synced_profile_photo' OR
meta_key = 'full_name' OR
meta_key = '_reviews' OR
meta_key = '_reviews_compound' OR
meta_key = '_reviews_total' OR
meta_key = '_reviews' OR
meta_key = '_reviews_compound' OR
meta_key = '_reviews_total' OR
meta_key = '_reviews_avg'"
);
$wpdb->query(
"DELETE
FROM {$wpdb->postmeta}
WHERE meta_key LIKE '_um%' OR
"DELETE
FROM {$wpdb->postmeta}
WHERE meta_key LIKE '_um%' OR
meta_key LIKE 'um%'"
);