diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index 89e1719c..44676b87 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -1121,11 +1121,11 @@ if ( ! class_exists( 'Admin_Settings' ) ) { ) ), array( - 'id' => 'allow_tracking', + 'id' => 'um_allow_tracking', 'type' => 'checkbox', 'label' => __( 'Allow Tracking','ultimate-member' ), - 'value' => UM()->um_get_option( 'allow_tracking' ), - 'default' => UM()->um_get_default( 'allow_tracking' ), + 'value' => UM()->um_get_option( 'um_allow_tracking' ), + 'default' => UM()->um_get_default( 'um_allow_tracking' ), ), array( 'id' => 'uninstall_on_delete', diff --git a/includes/admin/core/class-admin-upgrade.php b/includes/admin/core/class-admin-upgrade.php index 7bfcb0de..884e423b 100644 --- a/includes/admin/core/class-admin-upgrade.php +++ b/includes/admin/core/class-admin-upgrade.php @@ -56,17 +56,17 @@ if ( ! class_exists( 'Admin_Upgrade' ) ) { function set_update_versions() { $update_versions = array(); $handle = opendir( $this->packages_dir ); - while ( false !== ( $filename = readdir( $handle ) ) ) { + if ( $handle ) { + while ( false !== ( $filename = readdir( $handle ) ) ) { + if ( $filename != '.' && $filename != '..' ) + $update_versions[] = preg_replace( '/(.*?)\.php/i', '$1', $filename ); + } + closedir( $handle ); - if ( $filename != '.' && $filename != '..' ) - $update_versions[] = preg_replace( '/(.*?)\.php/i', '$1', $filename ); + usort( $update_versions, array( &$this, 'version_compare_sort' ) ); - } - closedir( $handle ); - - usort( $update_versions, array( &$this, 'version_compare_sort' ) ); - - $this->update_versions = $update_versions; + $this->update_versions = $update_versions; + } } diff --git a/includes/core/um-actions-wpadmin.php b/includes/core/um-actions-wpadmin.php index 03b7c3c4..dbf8dba2 100644 --- a/includes/core/um-actions-wpadmin.php +++ b/includes/core/um-actions-wpadmin.php @@ -120,7 +120,7 @@ return $content; } - add_filter( 'show_admin_bar' , 'um_control_admin_bar'); + add_filter( 'show_admin_bar' , 'um_control_admin_bar', 9999, 1 ); /*** *** @fix permission for admin bar diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index 4bd94cc6..85b25b21 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -1388,7 +1388,7 @@ function um_get_default_avatar_uri() { $uri = um_get_option( 'default_avatar' ); $uri = !empty( $uri['url'] ) ? $uri['url'] : ''; - if (!$uri) { + if ( ! $uri ) { $uri = um_url . 'assets/img/default_avatar.jpg'; } else {