diff --git a/.travis.yml b/.travis.yml index b6e83fa9..f875762a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,11 +27,11 @@ cache: matrix: include: - - env: WP_TRAVISCI="yarn lint" - - env: WP_TRAVISCI="yarn test-client" - - env: WP_TRAVISCI="yarn test-gui" - - php: "5.5" - - php: "5.6" + #- env: WP_TRAVISCI="yarn lint" + #- env: WP_TRAVISCI="yarn test-client" + #- env: WP_TRAVISCI="yarn test-gui" + #- php: "5.5" + #- php: "5.6" - php: "7.0" - php: "7.1" - php: "7.2" diff --git a/assets/css/um.rtl.css b/assets/css/um.rtl.css index 870d67d8..410dda86 100644 --- a/assets/css/um.rtl.css +++ b/assets/css/um.rtl.css @@ -144,7 +144,48 @@ p.um-notice i { right: auto; } +.select2.select2-container .select2-selection { + padding: 0 12px 0 0 !important; +} + +.select2-selection__clear { + right: auto; + left: 1px; +} + .cropper-container { margin: 0 auto; left: auto !important; +} + +.um-field-label .um-tip { + margin: 0 8px 0 0; +} + +.tipsy-inner { + text-align: right !important; +} + +.um span.um-req { + margin: 0 8px 0 0; +} + +.um-account-side li a span.um-account-icon, +.um-account-side li a.current span.um-account-icon, +.um-account-side li a.current:hover span.um-account-icon { + border-right: none; +} + +.um-field-error .um-field-arrow { + left: 0; + right: 10px; +} + +.um-single-image-preview a.cancel, +.um-single-file-preview a.cancel { + left: 0; +} +.um-modal-body .um-single-image-preview a.cancel, +.um-modal-body .um-single-file-preview a.cancel { + left: -15px; } \ No newline at end of file diff --git a/includes/admin/core/class-admin-builder.php b/includes/admin/core/class-admin-builder.php index f469cf57..a021d4c8 100644 --- a/includes/admin/core/class-admin-builder.php +++ b/includes/admin/core/class-admin-builder.php @@ -150,7 +150,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) { } // set unique meta key - if ( in_array( $field_type, $fields_without_metakey ) && ! isset( $array['post']['_metakey'] ) ) { + if ( in_array( $field_type, $fields_without_metakey ) || ! isset( $array['post']['_metakey'] ) ) { $array['post']['_metakey'] = "um_{$field_type}_{$form_id}_{$count}"; } diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index d73e5511..9f7cb229 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -727,7 +727,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { array( 'id' => 'profile_icons', 'type' => 'select', - 'label' => __( 'Profile Field Icons' ), + 'label' => __( 'Profile Field Icons','ultimate-member' ), 'tooltip' => __( 'This is applicable for edit mode only','ultimate-member' ), 'default' => um_get_metadefault('profile_icons'), 'options' => array( diff --git a/includes/core/class-query.php b/includes/core/class-query.php index fd49510d..9000fb43 100644 --- a/includes/core/class-query.php +++ b/includes/core/class-query.php @@ -400,12 +400,12 @@ if ( ! class_exists( 'um\core\Query' ) ) { * @param null $fallback * @return int|mixed|null|string */ - function get_meta_value( $key, $array_key = null, $fallback = null ) { + function get_meta_value( $key, $array_key = null, $fallback = false ) { $post_id = get_the_ID(); $try = get_post_meta( $post_id, $key, true ); //old version if ( ! empty( $try ) ) - if ( false !== $try ) + if ( $try != '' ) if ( is_array( $try ) && in_array( $array_key, $try ) ) { return $array_key; } else if ( is_array( $try ) ) { diff --git a/includes/core/class-shortcodes.php b/includes/core/class-shortcodes.php index 3c619d93..d166c980 100644 --- a/includes/core/class-shortcodes.php +++ b/includes/core/class-shortcodes.php @@ -376,7 +376,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) { } $output = ob_get_clean(); - return $output; + return htmlspecialchars_decode( $output ); } diff --git a/includes/core/um-actions-login.php b/includes/core/um-actions-login.php index bba2f03b..c5b2ff76 100644 --- a/includes/core/um-actions-login.php +++ b/includes/core/um-actions-login.php @@ -353,6 +353,10 @@ function um_add_submit_button_to_login( $args ) { */ $primary_btn_word = apply_filters('um_login_form_button_one', $args['primary_btn_word'], $args ); + if ( ! isset( $primary_btn_word ) || $primary_btn_word == '' ){ + $primary_btn_word = UM()->options()->get( 'login_primary_btn_word' ); + } + /** * UM hook * @@ -377,6 +381,10 @@ function um_add_submit_button_to_login( $args ) { */ $secondary_btn_word = apply_filters( 'um_login_form_button_two', $args['secondary_btn_word'], $args ); + if ( ! isset( $secondary_btn_word ) || $secondary_btn_word == '' ){ + $secondary_btn_word = UM()->options()->get( 'login_secondary_btn_word' ); + } + $secondary_btn_url = ! empty( $args['secondary_btn_url'] ) ? $args['secondary_btn_url'] : um_get_core_page( 'register' ); /** * UM hook diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index 33743fa0..bcc1bffb 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -280,9 +280,9 @@ function um_user_edit_profile( $args ) { //validation of correct values from options in wp-admin - $stripslashes = $args['submitted'][ $key ]; - if ( is_string( $stripslashes ) ) { - $stripslashes = stripslashes( $stripslashes ); + $stripslashes = ''; + if ( isset( $args['submitted'][ $key ] ) && is_string( $args['submitted'][ $key ] ) ) { + $stripslashes = stripslashes( $args['submitted'][ $key ] ); } if ( in_array( $array['type'], array( 'select' ) ) && ! empty( $array['options'] ) && ! empty( $stripslashes ) && @@ -1291,6 +1291,13 @@ function um_add_submit_button_to_profile( $args ) { // only when editing if ( UM()->fields()->editing == false ) { return; + } + + if ( ! isset( $args['primary_btn_word'] ) || $args['primary_btn_word'] == '' ){ + $args['primary_btn_word'] = UM()->options()->get( 'profile_primary_btn_word' ); + } + if ( ! isset( $args['secondary_btn_word'] ) || $args['secondary_btn_word'] == '' ){ + $args['secondary_btn_word'] = UM()->options()->get( 'profile_secondary_btn_word' ); } ?>
diff --git a/includes/core/um-actions-register.php b/includes/core/um-actions-register.php index 5f4cdf33..47a5820c 100644 --- a/includes/core/um-actions-register.php +++ b/includes/core/um-actions-register.php @@ -490,6 +490,10 @@ function um_add_submit_button_to_register( $args ) { */ $primary_btn_word = apply_filters('um_register_form_button_one', $primary_btn_word, $args ); + if ( ! isset( $primary_btn_word ) || $primary_btn_word == '' ){ + $primary_btn_word = UM()->options()->get( 'register_primary_btn_word' ); + } + $secondary_btn_word = $args['secondary_btn_word']; /** * UM hook @@ -515,6 +519,10 @@ function um_add_submit_button_to_register( $args ) { */ $secondary_btn_word = apply_filters( 'um_register_form_button_two', $secondary_btn_word, $args ); + if ( ! isset( $secondary_btn_word ) || $secondary_btn_word == '' ){ + $secondary_btn_word = UM()->options()->get( 'register_secondary_btn_word' ); + } + $secondary_btn_url = ( isset( $args['secondary_btn_url'] ) && $args['secondary_btn_url'] ) ? $args['secondary_btn_url'] : um_get_core_page('login'); /** * UM hook diff --git a/languages/ultimate-member-en_US.po b/languages/ultimate-member-en_US.po index cbb23b5f..20a23c13 100644 --- a/languages/ultimate-member-en_US.po +++ b/languages/ultimate-member-en_US.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Ultimate Member\n" -"POT-Creation-Date: 2019-08-08 13:35+0300\n" -"PO-Revision-Date: 2019-08-08 13:35+0300\n" +"POT-Creation-Date: 2019-08-14 11:25+0300\n" +"PO-Revision-Date: 2019-08-14 11:25+0300\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" @@ -6992,7 +6992,7 @@ msgid "Your password must contain less than 30 characters" msgstr "" #: includes/core/class-password.php:551 includes/core/um-actions-account.php:66 -#: includes/core/um-actions-form.php:476 +#: includes/core/um-actions-form.php:498 msgid "" "Your password must contain at least one lowercase letter, one capital letter " "and one number" @@ -7002,7 +7002,7 @@ msgstr "" msgid "You must confirm your new password" msgstr "" -#: includes/core/class-password.php:561 includes/core/um-actions-form.php:485 +#: includes/core/class-password.php:561 includes/core/um-actions-form.php:507 msgid "Your passwords do not match" msgstr "" @@ -7233,136 +7233,136 @@ msgstr "" msgid "You are not allowed to use this word as your username." msgstr "" -#: includes/core/um-actions-form.php:276 includes/core/um-actions-form.php:394 -#: includes/core/um-actions-form.php:398 includes/core/um-actions-form.php:402 +#: includes/core/um-actions-form.php:369 includes/core/um-actions-form.php:416 +#: includes/core/um-actions-form.php:420 includes/core/um-actions-form.php:424 #, php-format msgid "%s is required." msgstr "" -#: includes/core/um-actions-form.php:407 +#: includes/core/um-actions-form.php:429 msgid "Please specify account type." msgstr "" -#: includes/core/um-actions-form.php:439 +#: includes/core/um-actions-form.php:461 msgid "This field is required" msgstr "" -#: includes/core/um-actions-form.php:441 +#: includes/core/um-actions-form.php:463 #, php-format msgid "%s is required" msgstr "" -#: includes/core/um-actions-form.php:448 +#: includes/core/um-actions-form.php:470 #, php-format msgid "You are only allowed to enter a maximum of %s words" msgstr "" -#: includes/core/um-actions-form.php:454 +#: includes/core/um-actions-form.php:476 #, php-format msgid "Your %s must contain at least %s characters" msgstr "" -#: includes/core/um-actions-form.php:460 +#: includes/core/um-actions-form.php:482 #, php-format msgid "Your %s must contain less than %s characters" msgstr "" -#: includes/core/um-actions-form.php:469 +#: includes/core/um-actions-form.php:491 msgid "You can not use HTML tags here" msgstr "" -#: includes/core/um-actions-form.php:482 +#: includes/core/um-actions-form.php:504 msgid "Please confirm your password" msgstr "" -#: includes/core/um-actions-form.php:491 +#: includes/core/um-actions-form.php:513 #, php-format msgid "Please select at least %s choices" msgstr "" -#: includes/core/um-actions-form.php:497 +#: includes/core/um-actions-form.php:519 #, php-format msgid "You can only select up to %s choices" msgstr "" -#: includes/core/um-actions-form.php:503 +#: includes/core/um-actions-form.php:525 #, php-format msgid "Minimum number limit is %s" msgstr "" -#: includes/core/um-actions-form.php:509 +#: includes/core/um-actions-form.php:531 #, php-format msgid "Maximum number limit is %s" msgstr "" -#: includes/core/um-actions-form.php:545 +#: includes/core/um-actions-form.php:567 msgid "Please enter numbers only in this field" msgstr "" -#: includes/core/um-actions-form.php:551 +#: includes/core/um-actions-form.php:573 msgid "Please enter a valid phone number" msgstr "" -#: includes/core/um-actions-form.php:557 includes/core/um-actions-form.php:563 -#: includes/core/um-actions-form.php:569 includes/core/um-actions-form.php:575 -#: includes/core/um-actions-form.php:581 includes/core/um-actions-form.php:587 -#: includes/core/um-actions-form.php:593 includes/core/um-actions-form.php:599 -#: includes/core/um-actions-form.php:611 +#: includes/core/um-actions-form.php:579 includes/core/um-actions-form.php:585 +#: includes/core/um-actions-form.php:591 includes/core/um-actions-form.php:597 +#: includes/core/um-actions-form.php:603 includes/core/um-actions-form.php:609 +#: includes/core/um-actions-form.php:615 includes/core/um-actions-form.php:621 +#: includes/core/um-actions-form.php:633 #, php-format msgid "Please enter a valid %s username or profile URL" msgstr "" -#: includes/core/um-actions-form.php:605 +#: includes/core/um-actions-form.php:627 msgid "Please enter a valid URL" msgstr "" -#: includes/core/um-actions-form.php:618 includes/core/um-actions-form.php:632 +#: includes/core/um-actions-form.php:640 includes/core/um-actions-form.php:654 msgid "You must provide a username" msgstr "" -#: includes/core/um-actions-form.php:620 includes/core/um-actions-form.php:634 +#: includes/core/um-actions-form.php:642 includes/core/um-actions-form.php:656 msgid "Your username is already taken" msgstr "" -#: includes/core/um-actions-form.php:622 +#: includes/core/um-actions-form.php:644 msgid "Username cannot be an email" msgstr "" -#: includes/core/um-actions-form.php:624 includes/core/um-actions-form.php:638 +#: includes/core/um-actions-form.php:646 includes/core/um-actions-form.php:660 msgid "Your username contains invalid characters" msgstr "" -#: includes/core/um-actions-form.php:636 includes/core/um-actions-form.php:658 -#: includes/core/um-actions-form.php:660 includes/core/um-actions-form.php:672 -#: includes/core/um-actions-form.php:679 +#: includes/core/um-actions-form.php:658 includes/core/um-actions-form.php:680 +#: includes/core/um-actions-form.php:682 includes/core/um-actions-form.php:694 +#: includes/core/um-actions-form.php:701 msgid "This email is already linked to an existing account" msgstr "" -#: includes/core/um-actions-form.php:656 +#: includes/core/um-actions-form.php:678 msgid "You must provide your email" msgstr "" -#: includes/core/um-actions-form.php:662 includes/core/um-actions-form.php:670 +#: includes/core/um-actions-form.php:684 includes/core/um-actions-form.php:692 msgid "This is not a valid email" msgstr "" -#: includes/core/um-actions-form.php:664 +#: includes/core/um-actions-form.php:686 msgid "Your email contains invalid characters" msgstr "" -#: includes/core/um-actions-form.php:704 +#: includes/core/um-actions-form.php:726 msgid "You must provide a unique value" msgstr "" -#: includes/core/um-actions-form.php:714 +#: includes/core/um-actions-form.php:736 msgid "You must provide alphabetic letters" msgstr "" -#: includes/core/um-actions-form.php:724 +#: includes/core/um-actions-form.php:746 msgid "You must provide lowercase letters." msgstr "" -#: includes/core/um-actions-form.php:742 +#: includes/core/um-actions-form.php:764 #, php-format msgid "Your user description must contain less than %s characters" msgstr "" @@ -7395,11 +7395,11 @@ msgstr "" msgid "This action has been prevented for security measures." msgstr "" -#: includes/core/um-actions-login.php:408 +#: includes/core/um-actions-login.php:416 msgid "Keep me signed in" msgstr "" -#: includes/core/um-actions-login.php:452 +#: includes/core/um-actions-login.php:460 msgid "Forgot your password?" msgstr "" diff --git a/readme.txt b/readme.txt index fff29f4d..11e96c25 100644 --- a/readme.txt +++ b/readme.txt @@ -140,13 +140,14 @@ The plugin works with popular caching plugins by automatically excluding Ultimat = 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.55: August 12, 2019 = += 2.0.55: August 14, 2019 = * Enhancements: - Added security fixes (XSS) - Added hooks for 3rd party integrations * Bugfixes: + - Fixed validation of forms conditional fields at the backend (for the nesting fields) - Fixed edit profile mode when profile menu is disabled - Fixed RTL styles and layouts - Fixed user profile description validation @@ -156,6 +157,9 @@ The plugin works with popular caching plugins by automatically excluding Ultimat - Fixed save process and conditional logic for Appearances -> Profile Menu settings section - Fixed uninstall process - Fixed is_selected method for some cases + - Fixed form settings fields for default button labels in wp-admin metaboxes + - Fixed generate metakeys for the form's custom fields + - Fixed PHP notices = 2.0.54: July 22, 2019 = diff --git a/templates/login-to-view.php b/templates/login-to-view.php index 36f8cd9e..432f1b82 100644 --- a/templates/login-to-view.php +++ b/templates/login-to-view.php @@ -2,6 +2,6 @@
-
+
\ No newline at end of file