diff --git a/includes/admin/class-secure.php b/includes/admin/class-secure.php index d9d56af0..30bb4ff2 100644 --- a/includes/admin/class-secure.php +++ b/includes/admin/class-secure.php @@ -182,7 +182,6 @@ if ( ! class_exists( 'um\admin\Secure' ) ) { */ public function add_settings( $settings ) { $nonce = wp_create_nonce( 'um-secure-expire-session-nonce' ); - $count_users = count_users(); $banned_capabilities = array(); $banned_admin_capabilities = UM()->common()->secure()->get_banned_capabilities_list(); @@ -245,7 +244,10 @@ if ( ! class_exists( 'um\admin\Secure' ) ) { ), ); - $count_users_exclude_me = $count_users['total_users'] - 1; + global $wpdb; + $count_users = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->users}" ); + + $count_users_exclude_me = $count_users - 1; if ( $count_users_exclude_me > 0 ) { $secure_fields[] = array( 'id' => 'force_reset_passwords', diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 487add7e..f4912f3e 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -1513,24 +1513,24 @@ if ( ! class_exists( 'um\core\Fields' ) ) { return ''; } - /** * Get field label * - * @param string $key + * @param string $key Field meta key * * @return string */ - function get_label( $key ) { - $label = ''; + public function get_label( $key ) { + $label = ''; + $fields = UM()->builtin()->all_user_fields; + $field_data = array_key_exists( $key, $fields ) ? $fields[ $key ] : array(); - $fields = UM()->builtin()->all_user_fields; - if ( isset( $fields[ $key ]['label'] ) ) { - $label = stripslashes( $fields[ $key ]['label'] ); + if ( array_key_exists( 'label', $field_data ) ) { + $label = stripslashes( $field_data['label'] ); } - if ( empty( $label ) && isset( $fields[ $key ]['title'] ) ) { - $label = stripslashes( $fields[ $key ]['title'] ); + if ( empty( $label ) && array_key_exists( 'title', $field_data ) ) { + $label = stripslashes( $field_data['title'] ); } /** @@ -1556,13 +1556,11 @@ if ( ! class_exists( 'um\core\Fields' ) ) { * } * add_filter( 'um_change_field_label', 'my_change_field_label', 10, 3 ); */ - $label = apply_filters( 'um_change_field_label', $label, $key, $fields[ $key ] ); + $label = apply_filters( 'um_change_field_label', $label, $key, $field_data ); - $label = sprintf( __( '%s', 'ultimate-member' ), $label ); - return $label; + return sprintf( __( '%s', 'ultimate-member' ), $label ); } - /** * Get field title * @@ -2830,6 +2828,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) { */ $textarea_settings = apply_filters( 'um_form_fields_textarea_settings', $textarea_settings, $data ); + $field_value = empty( $field_value ) ? '' : $field_value; + // turn on the output buffer ob_start(); diff --git a/includes/core/um-filters-fields.php b/includes/core/um-filters-fields.php index 8576e68a..745831f2 100644 --- a/includes/core/um-filters-fields.php +++ b/includes/core/um-filters-fields.php @@ -456,7 +456,7 @@ function um_profile_field_filter_hook__( $value, $data, $type = '' ) { $value = '' . esc_html( $alt ) . ''; } else { // check $value is oEmbed - if ( 'oembed' === $data['type'] ) { + if ( array_key_exists( 'type', $data ) && 'oembed' === $data['type'] ) { return $value; } diff --git a/readme.txt b/readme.txt index f18d1ee2..dce9b041 100644 --- a/readme.txt +++ b/readme.txt @@ -10,13 +10,13 @@ Stable tag: 2.8.6 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.txt -The #1 plugin for front-end user profiles, user registration & login forms, member directories, content restriction, user roles and more. +Membership & community plugin with user profiles, registration & login, member directories, content restriction, user roles and much more. == Description == -= Best User Profile & Membership Plugin for WordPress = += User Profile & Membership Plugin for WordPress = -Ultimate Member is the #1 user profile & membership plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is perfect for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. +The ultimate user profile & membership plugin for WordPress. The plugin makes it a breeze for users to sign-up and become members of your website. The plugin allows you to add beautiful user profiles to your site and is designed for creating advanced online communities and membership sites. Lightweight and highly extendible, Ultimate Member will enable you to create almost any type of site where users can join and become members with absolute ease. = Features of the plugin include: = @@ -166,6 +166,10 @@ No specific extensions are needed. But we highly recommended keep active these P IMPORTANT: PLEASE UPDATE THE PLUGIN TO AT LEAST VERSION 2.6.7 IMMEDIATELY. VERSION 2.6.7 PATCHES SECURITY PRIVILEGE ESCALATION VULNERABILITY. PLEASE SEE [THIS ARTICLE](https://docs.ultimatemember.com/article/1866-security-incident-update-and-recommended-actions) FOR MORE INFORMATION += 2.8.7 2024-06-xx = + + + = 2.8.6 2024-05-22 = **Enhancements** diff --git a/ultimate-member.php b/ultimate-member.php index c24ef586..ea2c7aa5 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -3,7 +3,7 @@ * Plugin Name: Ultimate Member * Plugin URI: http://ultimatemember.com/ * Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress - * Version: 2.8.7 + * Version: 2.8.7-alpha * Author: Ultimate Member * Author URI: http://ultimatemember.com/ * Text Domain: ultimate-member