diff --git a/includes/admin/core/class-admin-upgrade.php b/includes/admin/core/class-admin-upgrade.php index ae30e70b..c0d1423c 100644 --- a/includes/admin/core/class-admin-upgrade.php +++ b/includes/admin/core/class-admin-upgrade.php @@ -134,7 +134,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) { - + get_allowed_html( 'admin_notice' ) ); + ?>
%s version. Your latest DB version is %s. We recommend creating a backup of your site before running the update process. Do not exit the page before the update process has complete.', 'ultimate-member' ), ultimatemember_version, $um_last_version_upgrade ) ?>
++ %1$s version. Your latest DB version is %2$s. We recommend creating a backup of your site before running the update process. Do not exit the page before the update process has complete.', 'ultimate-member' ), ultimatemember_version, $um_last_version_upgrade ), JB()->get_allowed_html( 'admin_notice' ) ); + ?> +
"Run" button, the update process will start. All information will be displayed in the "Upgrade Log" field.', 'ultimate-member' ); ?>
diff --git a/includes/admin/core/list-tables/emails-list-table.php b/includes/admin/core/list-tables/emails-list-table.php index a23242ff..ebef371c 100644 --- a/includes/admin/core/list-tables/emails-list-table.php +++ b/includes/admin/core/list-tables/emails-list-table.php @@ -320,9 +320,10 @@ $ListTable->items = array_slice( $emails, ( $paged - 1 ) * $per_page, $per_page $ListTable->wpc_set_pagination_args( array( 'total_items' => count( $emails ), 'per_page' => $per_page ) ); ?>- here', 'ultimate-member' ), - 'https://docs.ultimatemember.com/article/1335-email-templates' - ); ?> + here', 'ultimate-member' ), 'https://docs.ultimatemember.com/article/1335-email-templates' ), JB()->get_allowed_html( 'admin_notice' ) ); + ?>
\ No newline at end of file + diff --git a/includes/admin/core/packages/2.0-beta1/functions.php b/includes/admin/core/packages/2.0-beta1/functions.php index 2c998794..830b6fdc 100644 --- a/includes/admin/core/packages/2.0-beta1/functions.php +++ b/includes/admin/core/packages/2.0-beta1/functions.php @@ -84,9 +84,10 @@ function um_upgrade_update_users_per_page20beta1() { } $from = ( absint( $_POST['page'] ) * $users_per_page ) - $users_per_page + 1; - $to = absint( $_POST['page'] ) * $users_per_page; + $to = absint( $_POST['page'] ) * $users_per_page; - wp_send_json_success( array( 'message' => sprintf( __( 'Users from %s to %s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); + // translators: %1$s is a from; %2$s is a to. + wp_send_json_success( array( 'message' => sprintf( __( 'Users from %1$s to %2$s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); } else { wp_send_json_error(); } @@ -213,9 +214,10 @@ function um_upgrade_update_forum_per_page20beta1() { } $from = ( absint( $_POST['page'] ) * $posts_per_page ) - $posts_per_page + 1; - $to = absint( $_POST['page'] ) * $posts_per_page; + $to = absint( $_POST['page'] ) * $posts_per_page; - wp_send_json_success( array( 'message' => sprintf( __( 'Forums from %s to %s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); + // translators: %1$s is a from; %2$s is a to. + wp_send_json_success( array( 'message' => sprintf( __( 'Forums from %1$s to %2$s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); } else { wp_send_json_error(); } @@ -300,9 +302,10 @@ function um_upgrade_update_products_per_page20beta1() { } $from = ( absint( $_POST['page'] ) * $posts_per_page ) - $posts_per_page + 1; - $to = absint( $_POST['page'] ) * $posts_per_page; + $to = absint( $_POST['page'] ) * $posts_per_page; - wp_send_json_success( array( 'message' => sprintf( __( 'Woocommerce Products from %s to %s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); + // translators: %1$s is a from; %2$s is a to. + wp_send_json_success( array( 'message' => sprintf( __( 'Woocommerce Products from %1$s to %2$s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); } else { wp_send_json_error(); } diff --git a/includes/admin/core/packages/2.1.3-beta3/functions.php b/includes/admin/core/packages/2.1.3-beta3/functions.php index 66cffd7f..9609ce10 100644 --- a/includes/admin/core/packages/2.1.3-beta3/functions.php +++ b/includes/admin/core/packages/2.1.3-beta3/functions.php @@ -46,7 +46,7 @@ function um_upgrade_metadata_per_user213beta3() { um.meta_value as meta_value FROM {$wpdb->users} u LEFT JOIN {$wpdb->usermeta} um ON ( um.user_id = u.ID AND um.meta_key IN( 'account_status','hide_in_members','synced_gravatar_hashed_id','synced_profile_photo','profile_photo','cover_photo','_um_verified' ) ) - WHERE u.ID >= %d AND + WHERE u.ID >= %d AND u.ID <= %d", $min_max['MinID'], $min_max['MaxID'] @@ -113,9 +113,10 @@ function um_upgrade_metadata_per_user213beta3() { } $from = ( absint( $_POST['page'] ) * $per_page ) - $per_page + 1; - $to = absint( $_POST['page'] ) * $per_page; + $to = absint( $_POST['page'] ) * $per_page; - wp_send_json_success( array( 'message' => sprintf( __( 'Metadata from %s to %s users were upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); + // translators: %1$s is a from; %2$s is a to. + wp_send_json_success( array( 'message' => sprintf( __( 'Metadata from %1$s to %2$s users were upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); } diff --git a/includes/admin/core/packages/2.3.0/functions.php b/includes/admin/core/packages/2.3.0/functions.php index 51f0b60d..308c1a93 100644 --- a/includes/admin/core/packages/2.3.0/functions.php +++ b/includes/admin/core/packages/2.3.0/functions.php @@ -103,7 +103,7 @@ function um_upgrade_usermeta_part230() { $wpdb->prepare( "SELECT user_id, meta_key, - meta_value + meta_value FROM {$wpdb->usermeta} WHERE meta_key IN( '" . implode( "','", $fields_for_upgrade ) . "' ) LIMIT %d, %d", @@ -127,9 +127,10 @@ function um_upgrade_usermeta_part230() { } $from = ( absint( $_POST['page'] ) * $per_page ) - $per_page + 1; - $to = absint( $_POST['page'] ) * $per_page; + $to = absint( $_POST['page'] ) * $per_page; - wp_send_json_success( array( 'message' => sprintf( __( 'Metadata from %s to %s row were upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); + // translators: %1$s is a from; %2$s is a to. + wp_send_json_success( array( 'message' => sprintf( __( 'Metadata from %1$s to %2$s row were upgraded successfully...', 'ultimate-member' ), $from, $to ) ) ); } diff --git a/includes/admin/templates/dashboard/cache.php b/includes/admin/templates/dashboard/cache.php index 364417ac..a2241443 100644 --- a/includes/admin/templates/dashboard/cache.php +++ b/includes/admin/templates/dashboard/cache.php @@ -5,8 +5,8 @@ global $wpdb; $count = $wpdb->get_var( - "SELECT COUNT( option_id ) - FROM {$wpdb->options} + "SELECT COUNT( option_id ) + FROM {$wpdb->options} WHERE option_name LIKE 'um_cache_userdata_%'" ); ?> @@ -15,7 +15,10 @@ $count = $wpdb->get_var(
-
+
diff --git a/includes/admin/templates/dashboard/purge.php b/includes/admin/templates/dashboard/purge.php
index 6e54fbae..c3fa8c62 100644
--- a/includes/admin/templates/dashboard/purge.php
+++ b/includes/admin/templates/dashboard/purge.php
@@ -1,10 +1,14 @@
-dir_size( 'temp' ) > 0.1 ) { ?>
- %s MB by purging your temp upload directory.', 'ultimate-member' ), $this->dir_size( 'temp' ) ); ?>
+ %s MB by purging your temp upload directory.', 'ultimate-member' ), $this->dir_size( 'temp' ) ), JB()->get_allowed_html( 'admin_notice' ) );
+ ?>
@@ -19,4 +23,4 @@ if ( $this->dir_size( 'temp' ) > 0.1 ) { ?>
clean. There is nothing to purge.', 'ultimate-member' ); ?>
-
+ get_allowed_html( 'admin_notice' ) );
+ ?>
@@ -33,8 +36,11 @@
-
+ get_allowed_html( 'admin_notice' ) );
+ ?>
-
' . $emo . '' . sprintf( __( 'Your profile is looking a little empty. Why not add some information!', 'ultimate-member' ), esc_url( $edit_url ) ) . '
'; } else { $output .= '' . $emo . '' . __( 'This user has not added any information to their profile yet.', 'ultimate-member' ) . '
'; diff --git a/includes/core/class-member-directory.php b/includes/core/class-member-directory.php index de3c1335..032cc862 100644 --- a/includes/core/class-member-directory.php +++ b/includes/core/class-member-directory.php @@ -343,6 +343,7 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { } if ( isset( $data['type'] ) && in_array( $data['type'], $this->sorting_supported_fields ) ) { + // translators: %s: title. if ( isset( $data['title'] ) && array_search( sprintf( __( '%s DESC', 'ultimate-member' ), $data['title'] ), $this->sort_fields ) !== false ) { $data['title'] = $data['title'] . ' (' . $key . ')'; } @@ -352,7 +353,9 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) { continue; } + // translators: %s: title. $this->sort_fields[ $key . '_desc' ] = sprintf( __( '%s DESC', 'ultimate-member' ), $title ); + // translators: %s: title. $this->sort_fields[ $key . '_asc' ] = sprintf( __( '%s ASC', 'ultimate-member' ), $title ); } } diff --git a/includes/core/class-password.php b/includes/core/class-password.php index 1b3e5ee4..8c2f2167 100644 --- a/includes/core/class-password.php +++ b/includes/core/class-password.php @@ -517,10 +517,12 @@ if ( ! class_exists( 'um\core\Password' ) ) { $user_email = um_user( 'user_email' ); if ( mb_strlen( wp_unslash( $args['user_password'] ) ) < $min_length ) { + // translators: %s: min length. UM()->form()->add_error( 'user_password', sprintf( __( 'Your password must contain at least %d characters', 'ultimate-member' ), $min_length ) ); } if ( mb_strlen( wp_unslash( $args['user_password'] ) ) > $max_length ) { + // translators: %s: max length. UM()->form()->add_error( 'user_password', sprintf( __( 'Your password must contain less than %d characters', 'ultimate-member' ), $max_length ) ); } diff --git a/includes/core/class-uploader.php b/includes/core/class-uploader.php index 49cea88c..892ff986 100644 --- a/includes/core/class-uploader.php +++ b/includes/core/class-uploader.php @@ -791,8 +791,10 @@ if ( ! class_exists( 'um\core\Uploader' ) ) { } elseif ( isset( $data['max_file_size'] ) && ( $image_info['size'] > $data['max_file_size'] ) ) { $error = $data['max_file_size_error']; } elseif ( isset( $data['min_width'] ) && ( $image_info['width'] < $data['min_width'] ) ) { + // translators: %s: min widdth. $error = sprintf( __( 'Your photo is too small. It must be at least %spx wide.', 'ultimate-member' ), $data['min_width'] ); } elseif ( isset( $data['min_height'] ) && ( $image_info['height'] < $data['min_height'] ) ) { + // translators: %s: min height. $error = sprintf( __( 'Your photo is too small. It must be at least %spx high.', 'ultimate-member' ), $data['min_height'] ); } diff --git a/includes/core/um-actions-form.php b/includes/core/um-actions-form.php index ab08f406..39eca33e 100644 --- a/includes/core/um-actions-form.php +++ b/includes/core/um-actions-form.php @@ -503,7 +503,9 @@ function um_submit_form_errors_hook_( $submitted_data, $form_data ) { } } } catch ( Exception $e ) { + // translators: %s: title. UM()->form()->add_error( $key, sprintf( __( '%s - wrong conditions.', 'ultimate-member' ), $array['title'] ) ); + // translators: %s: title. $notice = '