diff --git a/README.md b/README.md index f7a14c46..c78512ef 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Ultimate Member is the #1 user profile & membership plugin for WordPress. The pl | Latest Version |Requires at least|Stable Tag| | :------------: |:------------:|:------------:| -| 2.0.9 | WordPress 4.9 or higher| 2.0.9 | +| 2.0.10 | WordPress 4.9 or higher| 2.0.10 | Features of the plugin include: @@ -48,7 +48,7 @@ GNU Version 2 or Any Later Version Releases ==================== -[Official Release Version: 2.0.9](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.9). +[Official Release Version: 2.0.10](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.10). [Official Release Version: 1.3.88](https://github.com/ultimatemember/ultimatemember/releases). diff --git a/includes/admin/core/class-admin-notices.php b/includes/admin/core/class-admin-notices.php index 4da9df5e..ce698225 100644 --- a/includes/admin/core/class-admin-notices.php +++ b/includes/admin/core/class-admin-notices.php @@ -540,7 +540,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) { ob_start(); ?>

- %s version %s needs to be updated for correct working.
It is necessary to update the structure of the database and options that are associated with %s %s.
Please visit "Upgrade" page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ); ?> + %s version %s needs to be updated to work correctly.
It is necessary to update the structure of the database and options that are associated with %s %s.
Please visit "Upgrade" page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ); ?>

diff --git a/includes/admin/core/packages/2.0.10/functions.php b/includes/admin/core/packages/2.0.10/functions.php new file mode 100644 index 00000000..be32d0b3 --- /dev/null +++ b/includes/admin/core/packages/2.0.10/functions.php @@ -0,0 +1,18 @@ + __( 'Styles was upgraded successfully', 'ultimate-member' ) ) ); +} + + +function um_upgrade_cache2010() { + um_maybe_unset_time_limit(); + + UM()->user()->remove_cache_all_users(); + + update_option( 'um_last_version_upgrade', '2.0.10' ); + + wp_send_json_success( array( 'message' => __( 'Users cache was cleared successfully', 'ultimate-member' ) ) ); +} \ No newline at end of file diff --git a/includes/admin/core/packages/2.0.10/hooks.php b/includes/admin/core/packages/2.0.10/hooks.php new file mode 100644 index 00000000..1242dd6b --- /dev/null +++ b/includes/admin/core/packages/2.0.10/hooks.php @@ -0,0 +1,6 @@ + 'styles2010', + 'cache2010' => 'cache2010', +); \ No newline at end of file diff --git a/includes/admin/core/packages/2.0.10/init.php b/includes/admin/core/packages/2.0.10/init.php new file mode 100644 index 00000000..c5b4d295 --- /dev/null +++ b/includes/admin/core/packages/2.0.10/init.php @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/includes/admin/core/packages/2.0.10/styles.php b/includes/admin/core/packages/2.0.10/styles.php new file mode 100644 index 00000000..70dc35e8 --- /dev/null +++ b/includes/admin/core/packages/2.0.10/styles.php @@ -0,0 +1,89 @@ +options()->get( 'custom_css' ); +$enable_css = UM()->options()->get( 'enable_custom_css' ); + +if ( ! empty( $enable_css ) && ! empty( $custom_css ) ) { + $css .= $custom_css; +} + +$forms_query = new WP_Query; +$registration_forms = $forms_query->query( array( + 'post_type' => 'um_form', + 'meta_query' => array( + array( + 'key' => '_um_mode', + 'value' => 'register' + ), + ), + 'posts_per_page' => -1, + 'fields' => 'ids' +) ); + +$forms_query = new WP_Query; +$login_forms = $forms_query->query( array( + 'post_type' => 'um_form', + 'meta_query' => array( + array( + 'key' => '_um_mode', + 'value' => 'login' + ) + ), + 'posts_per_page' => -1, + 'fields' => 'ids' +) ); + +$forms_query = new WP_Query; +$profile_forms = $forms_query->query( array( + 'post_type' => 'um_form', + 'meta_query' => array( + array( + 'key' => '_um_mode', + 'value' => 'profile' + ) + ), + 'posts_per_page' => -1, + 'fields' => 'ids' +) ); + + +foreach ( $registration_forms as $form_id ) { + $register_custom_css = get_post_meta( $form_id, '_um_register_custom_css', true ); + if ( ! empty( $register_custom_css ) ) { + $css .= ' + /* registration form ID=' . $form_id . ' */ + ' . $register_custom_css; + } +} + + +foreach ( $login_forms as $form_id ) { + $login_custom_css = get_post_meta( $form_id, '_um_login_custom_css', true ); + if ( ! empty( $login_custom_css ) ) { + $css .= ' + /* login form ID=' . $form_id . ' */ + ' . $login_custom_css; + } +} + + +foreach ( $profile_forms as $form_id ) { + $profile_custom_css = get_post_meta( $form_id, '_um_profile_custom_css', true ); + if ( ! empty( $profile_custom_css ) ) { + $css .= ' + /* profile form ID=' . $form_id . ' */ + ' . $profile_custom_css; + } +} + + +if ( ! empty( $css ) ) { + $uploads = wp_upload_dir(); + $upload_dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . 'ultimatemember' . DIRECTORY_SEPARATOR; + if ( file_exists( $upload_dir. 'um_old_settings.css' ) ) { + $css_doc_file = fopen( $upload_dir. 'um_old_settings.css', 'a' ); + fwrite( $css_doc_file, "\r\n" . $css ); + fclose( $css_doc_file ); + } +} \ No newline at end of file diff --git a/includes/core/class-shortcodes.php b/includes/core/class-shortcodes.php index 28ef2e5b..98c78253 100644 --- a/includes/core/class-shortcodes.php +++ b/includes/core/class-shortcodes.php @@ -510,8 +510,11 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) { extract($args, EXTR_SKIP); - if ( 'register' == $mode && is_user_logged_in() ) { - return __( 'You are already registered', 'ultimate-member' ); + //not display on admin preview + if ( empty( $_POST['act_id'] ) || $_POST['act_id'] != 'um_admin_preview_form' ) { + if ( 'register' == $mode && is_user_logged_in() ) { + return __( 'You are already registered', 'ultimate-member' ); + } } // for profiles only diff --git a/readme.txt b/readme.txt index cdc8cf08..d56e18cc 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ Donate link: Tags: community, member, membership, user-profile, user-registration Requires at least: 4.1 Tested up to: 4.9 -Stable tag: 2.0.9 +Stable tag: 2.0.10 License: GNU Version 2 or Any Later Version License URI: http://www.gnu.org/licenses/gpl-3.0.txt @@ -129,6 +129,17 @@ The plugin works with popular caching plugins by automatically excluding Ultimat == Changelog == += Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin = + += 2.0.10: April 17, 2018 = + +* Bugfixes: + - Fixed Profile Form field privacy + - Fixed conditional menu logic for 2 different nav menu hooks + - Fixed registration form preview on wp-admin screen + - Restored old CSS settings to "um_old_settings.css" + - Clean user's cache + = 2.0.9: April 15, 2018 = * Bugfixes: diff --git a/ultimate-member.php b/ultimate-member.php index ee4c886e..55414d92 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.0.9 +Version: 2.0.10 Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member