diff --git a/includes/admin/class-admin.php b/includes/admin/class-admin.php index 91ff1609..dd5382f3 100644 --- a/includes/admin/class-admin.php +++ b/includes/admin/class-admin.php @@ -93,7 +93,6 @@ if ( ! class_exists( 'um\admin\Admin' ) ) { $this->secure(); } - function init_variables() { $this->role_meta = apply_filters( 'um_role_meta_map', diff --git a/includes/common/class-init.php b/includes/common/class-init.php index b33146f1..aa777765 100644 --- a/includes/common/class-init.php +++ b/includes/common/class-init.php @@ -23,6 +23,7 @@ if ( ! class_exists( 'um\common\Init' ) ) { $this->cpt()->hooks(); $this->screen(); $this->secure()->hooks(); + $this->site_health(); } /** @@ -60,5 +61,17 @@ if ( ! class_exists( 'um\common\Init' ) ) { } return UM()->classes['um\common\secure']; } + + /** + * @since 2.6.8 + * + * @return Site_Health + */ + public function site_health() { + if ( empty( UM()->classes['um\common\site_health'] ) ) { + UM()->classes['um\common\site_health'] = new Site_Health(); + } + return UM()->classes['um\common\site_health']; + } } } diff --git a/includes/common/class-site-health.php b/includes/common/class-site-health.php new file mode 100644 index 00000000..59892b33 --- /dev/null +++ b/includes/common/class-site-health.php @@ -0,0 +1,42 @@ +options()->get( 'um_force_utf8_strings' ) ) { return $changes; } diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index 0ec70389..72193f57 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -2662,9 +2662,13 @@ function um_force_utf8_string( $value ) { if ( is_array( $value ) ) { $arr_value = array(); foreach ( $value as $key => $v ) { + if ( ! function_exists( 'utf8_decode' ) ) { + continue; + } + $utf8_decoded_value = utf8_decode( $v ); - if ( mb_check_encoding( $utf8_decoded_value, 'UTF-8' ) ) { + if ( function_exists( 'mb_check_encoding' ) && mb_check_encoding( $utf8_decoded_value, 'UTF-8' ) ) { array_push( $arr_value, $utf8_decoded_value ); } else { array_push( $arr_value, $v ); @@ -2674,11 +2678,12 @@ function um_force_utf8_string( $value ) { return $arr_value; } else { + if ( function_exists( 'utf8_decode' ) ) { + $utf8_decoded_value = utf8_decode( $value ); - $utf8_decoded_value = utf8_decode( $value ); - - if (mb_check_encoding( $utf8_decoded_value, 'UTF-8' )) { - return $utf8_decoded_value; + if ( function_exists( 'mb_check_encoding' ) && mb_check_encoding( $utf8_decoded_value, 'UTF-8' ) ) { + return $utf8_decoded_value; + } } } diff --git a/readme.txt b/readme.txt index 460d4b37..8792cfe8 100644 --- a/readme.txt +++ b/readme.txt @@ -141,6 +141,10 @@ The plugin does not restrict access to the wp-login.php page when active, so tha No, you do not need to use our plugin’s login or registration pages and can use another plugin or the default WordPress methods for user registration and login. += Are additional PHP modules necessary for the plugin to work correctly? = + +No specific extensions are needed. But we highly recommended keep active these PHP modules: `mbstring`, `json`, `dom`, `exif`, `gd`, `fileinfo`, `curl`, `iconv`. wp-admin > Tools > Site Health page has a summary about your installation and required modules. All major extensions are listed [here](https://make.wordpress.org/hosting/handbook/server-environment/#php-extensions). + == Screenshots == 1. Screenshot 1 @@ -162,6 +166,16 @@ No, you do not need to use our plugin’s login or registration pages and can us 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.6.8: July 12, 2023 = + +* Enhancements: + + - Added: Secure settings. [Read more](https://docs.ultimatemember.com/article/1869-security-feature) + +* Bugfixes: + + - Fixed: Using some specific functions which cannot exist if PHP modules are disabled + = 2.6.7: July 1, 2023 = * Bugfixes: