Merge pull request #1249 from ultimatemember/fix/translators

Translators
This commit is contained in:
Mykyta Synelnikov
2023-07-13 14:01:38 +03:00
committed by GitHub
28 changed files with 287 additions and 109 deletions
+5 -4
View File
@@ -171,8 +171,8 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
global $wpdb;
$metadata = $wpdb->get_results( $wpdb->prepare(
"SELECT meta_key, meta_value
FROM {$wpdb->usermeta}
"SELECT meta_key, meta_value
FROM {$wpdb->usermeta}
WHERE user_id = %d",
$user_id
), ARRAY_A );
@@ -295,7 +295,8 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
if ( $deleted ) {
$items_removed = true;
} else {
$messages[] = sprintf( __( 'Your %s was unable to be removed at this time.', 'ultimate-member' ), $metadata['name'] );
// translators: %s: metadata name.
$messages[] = sprintf( __( 'Your %s was unable to be removed at this time.', 'ultimate-member' ), $metadata['name'] );
$items_retained = true;
}
}
@@ -313,4 +314,4 @@ if ( ! class_exists( 'um\admin\core\Admin_GDPR' ) ) {
}
}
}
+3 -1
View File
@@ -69,7 +69,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
ob_start();
printf( __( 'If you like Ultimate Member please consider leaving a %s review. It will help us to grow the plugin and make it more popular. Thank you.', 'ultimate-member' ), $link ) ?>
// translators: %s: Review link.
echo wp_kses( sprintf( __( 'If you like Ultimate Member please consider leaving a %s review. It will help us to grow the plugin and make it more popular. Thank you.', 'ultimate-member' ), $link ), JB()->get_allowed_html( 'admin_notice' ) );
?>
<script type="text/javascript">
jQuery( 'a.um-admin-rating-link' ).click(function() {
@@ -1092,6 +1092,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$where = array( 'ID' => $post_id );
if ( empty( $_POST['post_title'] ) ) {
// translators: %s: Directory id.
$_POST['post_title'] = sprintf( __( 'Directory #%s', 'ultimate-member' ), $post_id );
}
@@ -1188,6 +1189,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
$where = array( 'ID' => $post_id );
if ( empty( $_POST['post_title'] ) ) {
// translators: %s: Form id.
$_POST['post_title'] = sprintf( __( 'Form #%s', 'ultimate-member' ), $post_id );
}
$wpdb->update( $wpdb->posts, array( 'post_title' => sanitize_text_field( $_POST['post_title'] ) ), $where );
+81 -34
View File
@@ -246,11 +246,16 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
'strong' => array(),
);
$this->add_notice( 'lock_registration', array(
'class' => 'info',
'message' => '<p>' . wp_kses( sprintf( __( 'The <strong>"Membership - Anyone can register"</strong> option on the general settings <a href="%s">page</a> is enabled. This means users can register via the standard WordPress wp-login.php page. If you do not want users to be able to register via this page and only register via the Ultimate Member registration form, you should deactivate this option. You can dismiss this notice if you wish to keep the wp-login.php registration page open.', 'ultimate-member' ), admin_url( 'options-general.php' ) . '#users_can_register' ), $allowed_html ) . '</p>',
'dismissible' => true,
), 10 );
$this->add_notice(
'lock_registration',
array(
'class' => 'info',
// translators: %s: Setting link.
'message' => '<p>' . wp_kses( sprintf( __( 'The <strong>"Membership - Anyone can register"</strong> option on the general settings <a href="%s">page</a> is enabled. This means users can register via the standard WordPress wp-login.php page. If you do not want users to be able to register via this page and only register via the Ultimate Member registration form, you should deactivate this option. You can dismiss this notice if you wish to keep the wp-login.php registration page open.', 'ultimate-member' ), admin_url( 'options-general.php' ) . '#users_can_register' ), $allowed_html ) . '</p>',
'dismissible' => true,
),
10
);
}
/**
@@ -356,10 +361,15 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
return;
}
$this->add_notice( 'old_extensions', array(
'class' => 'error',
'message' => '<p>' . sprintf( __( '<strong>%s %s</strong> requires 2.0 extensions. You have pre 2.0 extensions installed on your site. <br /> Please update %s extensions to latest versions. For more info see this <a href="%s" target="_blank">doc</a>.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, 'https://docs.ultimatemember.com/article/201-how-to-update-your-site' ) . '</p>',
), 0 );
$this->add_notice(
'old_extensions',
array(
'class' => 'error',
// translators: %1$s is a plugin name; %2$s is a plugin version; %3$s is a plugin name; %4$s is a doc link.
'message' => '<p>' . sprintf( __( '<strong>%1$s %2$s</strong> requires 2.0 extensions. You have pre 2.0 extensions installed on your site. <br /> Please update %3$s extensions to latest versions. For more info see this <a href="%4$s" target="_blank">doc</a>.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, 'https://docs.ultimatemember.com/article/201-how-to-update-your-site' ) . '</p>',
),
0
);
}
@@ -379,7 +389,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
ob_start(); ?>
<p>
<?php printf( __( '%s needs to create several pages (User Profiles, Account, Registration, Login, Password Reset, Logout, Member Directory) to function correctly.', 'ultimate-member' ), ultimatemember_plugin_name ); ?>
<?php
// translators: %s: Plugin name.
echo wp_kses( sprintf( __( '%s needs to create several pages (User Profiles, Account, Registration, Login, Password Reset, Logout, Member Directory) to function correctly.', 'ultimate-member' ), ultimatemember_plugin_name ), JB()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<p>
@@ -427,14 +440,19 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
/**
* EXIF library notice
*/
function exif_extension_notice() {
public function exif_extension_notice() {
$hide_exif_notice = get_option( 'um_hide_exif_notice' );
if ( ! extension_loaded( 'exif' ) && ! $hide_exif_notice ) {
$this->add_notice( 'exif_disabled', array(
'class' => 'updated',
'message' => '<p>' . sprintf(__( 'Exif is not enabled on your server. Mobile photo uploads will not be rotated correctly until you enable the exif extension. <a href="%s">Hide this notice</a>', 'ultimate-member' ), add_query_arg('um_adm_action', 'um_hide_exif_notice') ) . '</p>',
), 10 );
$this->add_notice(
'exif_disabled',
array(
'class' => 'updated',
// translators: %s: query args.
'message' => '<p>' . sprintf( __( 'Exif is not enabled on your server. Mobile photo uploads will not be rotated correctly until you enable the exif extension. <a href="%s">Hide this notice</a>', 'ultimate-member' ), add_query_arg( 'um_adm_action', 'um_hide_exif_notice' ) ) . '</p>',
),
10
);
}
}
@@ -520,10 +538,15 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
}
if ( $invalid_folder ) {
$this->add_notice( 'invalid_dir', array(
'class' => 'error',
'message' => '<p>' . sprintf( __( 'You have installed <strong>%s</strong> with wrong folder name. Correct folder name is <strong>"ultimate-member"</strong>.', 'ultimate-member' ), ultimatemember_plugin_name ) . '</p>',
), 1 );
$this->add_notice(
'invalid_dir',
array(
'class' => 'error',
// translators: %s: Plugin name.
'message' => '<p>' . sprintf( __( 'You have installed <strong>%s</strong> with wrong folder name. Correct folder name is <strong>"ultimate-member"</strong>.', 'ultimate-member' ), ultimatemember_plugin_name ) . '</p>',
),
1
);
}
}
@@ -550,17 +573,27 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
}
if ( ! empty( $arr_inactive_license_keys ) ) {
$this->add_notice( 'license_key', array(
'class' => 'error',
'message' => '<p>' . sprintf( __( 'There are %d inactive %s license keys for this site. This site is not authorized to get plugin updates. You can active this site on <a href="%s">www.ultimatemember.com</a>.', 'ultimate-member' ), count( $arr_inactive_license_keys ) , ultimatemember_plugin_name, UM()->store_url ) . '</p>',
), 3 );
$this->add_notice(
'license_key',
array(
'class' => 'error',
// translators: %1$s is a inactive license number; %2$s is a plugin name; %3$s is a store link.
'message' => '<p>' . sprintf( __( 'There are %1$s inactive %2$s license keys for this site. This site is not authorized to get plugin updates. You can active this site on <a href="%3$s">www.ultimatemember.com</a>.', 'ultimate-member' ), count( $arr_inactive_license_keys ), ultimatemember_plugin_name, UM()->store_url ) . '</p>',
),
3
);
}
if ( $invalid_license ) {
$this->add_notice( 'license_key', array(
'class' => 'error',
'message' => '<p>' . sprintf( __( 'You have %d invalid or expired license keys for %s. Please go to the <a href="%s">Licenses page</a> to correct this issue.', 'ultimate-member' ), $invalid_license, ultimatemember_plugin_name, add_query_arg( array('page'=>'um_options', 'tab' => 'licenses'), admin_url( 'admin.php' ) ) ) . '</p>',
), 3 );
$this->add_notice(
'license_key',
array(
'class' => 'error',
// translators: %1$s is a invalid license; %2$s is a plugin name; %3$s is a license link.
'message' => '<p>' . sprintf( __( 'You have %1$s invalid or expired license keys for %2$s. Please go to the <a href="%3$s">Licenses page</a> to correct this issue.', 'ultimate-member' ), $invalid_license, ultimatemember_plugin_name, add_query_arg( array( 'page' => 'um_options', 'tab' => 'licenses' ), admin_url( 'admin.php' ) ) ) . '</p>',
),
3
);
}
}
@@ -573,7 +606,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
ob_start(); ?>
<p>
<?php printf( __( '<strong>%s version %s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%s %s</strong>.<br />Please visit <a href="%s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ); ?>
<?php
// translators: %1$s is a plugin name; %2$s is a plugin version; %3$s is a plugin name; %4$s is a plugin version; %5$s is a upgrade link.
echo wp_kses( sprintf( __( '<strong>%1$s version %2$s</strong> needs to be updated to work correctly.<br />It is necessary to update the structure of the database and options that are associated with <strong>%3$s %4$s</strong>.<br />Please visit <a href="%5$s">"Upgrade"</a> page and run the upgrade process.', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version, ultimatemember_plugin_name, ultimatemember_version, $url ), JB()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<p>
@@ -595,10 +631,15 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
'message' => '<p>' . __( 'Settings successfully upgraded', 'ultimate-member' ) . '</p>',
), 4 );
} else {
$this->add_notice( 'upgrade', array(
'class' => 'updated',
'message' => '<p>' . sprintf( __( '<strong>%s %s</strong> Successfully Upgraded', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version ) . '</p>',
), 4 );
$this->add_notice(
'upgrade',
array(
'class' => 'updated',
// translators: %1$s is a plugin name title; %2$s is a plugin version.
'message' => '<p>' . sprintf( __( '<strong>%1$s %2$s</strong> Successfully Upgraded', 'ultimate-member' ), ultimatemember_plugin_name, ultimatemember_version ) . '</p>',
),
4
);
}
}
}
@@ -624,7 +665,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
<div id="um_start_review_notice">
<p>
<?php printf( __( 'Hey there! It\'s been one month since you installed %s. How have you found the plugin so far?', 'ultimate-member' ), ultimatemember_plugin_name ) ?>
<?php
// translators: %s: plugin name.
echo wp_kses( sprintf( __( 'Hey there! It\'s been one month since you installed %s. How have you found the plugin so far?', 'ultimate-member' ), ultimatemember_plugin_name ), JB()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<p>
<a href="javascript:void(0);" id="um_add_review_love"><?php _e( 'I love it!', 'ultimate-member' ) ?></a>&nbsp;|&nbsp;
@@ -678,7 +722,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
ob_start(); ?>
<p>
<?php printf( __( '<strong>%s</strong> future plans! Detailed future list is <a href="%s" target="_blank">here</a>', 'ultimate-member' ), ultimatemember_plugin_name, '#' ); ?>
<?php
// translators: %1$s is a plugin name; %2$s is a #.
echo wp_kses( sprintf( __( '<strong>%1$s</strong> future plans! Detailed future list is <a href="%2$s" target="_blank">here</a>', 'ultimate-member' ), ultimatemember_plugin_name, '#' ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<?php $message = ob_get_clean();
+28 -10
View File
@@ -245,7 +245,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$from = ( absint( $_POST['page'] ) * $per_page ) - $per_page + 1;
$to = absint( $_POST['page'] ) * $per_page;
// translators: %1$s is a metadata from name; %2$s is a metadata to.
wp_send_json_success( array( 'message' => sprintf( __( 'Metadata from %1$s to %2$s was upgraded successfully...', 'ultimate-member' ), $from, $to ) ) );
} else {
do_action( 'um_same_page_update_ajax_action', $cb_func );
@@ -2752,9 +2752,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
case 'expired' :
$class = 'expired';
$class = 'expired';
$messages[] = sprintf(
__( 'Your license key expired on %s. Please <a href="%s" target="_blank">renew your license key</a>.', 'ultimate-member' ),
// translators: %1$s is a expiry date; %2$s is a renew link.
__( 'Your license key expired on %1$s. Please <a href="%2$s" target="_blank">renew your license key</a>.', 'ultimate-member' ),
date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
'https://ultimatemember.com/checkout/?edd_license_key=' . $value . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
);
@@ -2767,6 +2768,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$messages[] = sprintf(
// translators: %s: support link name.
__( 'Your license key has been disabled. Please <a href="%s" target="_blank">contact support</a> for more information.', 'ultimate-member' ),
'https://ultimatemember.com/support?utm_campaign=admin&utm_source=licenses&utm_medium=revoked'
);
@@ -2779,6 +2781,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$messages[] = sprintf(
// translators: %s: account page.
__( 'Invalid license. Please <a href="%s" target="_blank">visit your account page</a> and verify it.', 'ultimate-member' ),
'https://ultimatemember.com/account?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
);
@@ -2792,7 +2795,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$messages[] = sprintf(
__( 'Your %s is not active for this URL. Please <a href="%s" target="_blank">visit your account page</a> to manage your license key URLs.', 'ultimate-member' ),
// translators: %1$s is a item name title; %2$s is a account page.
__( 'Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank">visit your account page</a> to manage your license key URLs.', 'ultimate-member' ),
$field_data['item_name'],
'https://ultimatemember.com/account?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
);
@@ -2804,6 +2808,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
case 'item_name_mismatch' :
$class = 'error';
// translators: %s: item name.
$messages[] = sprintf( __( 'This appears to be an invalid license key for %s.', 'ultimate-member' ), $field_data['item_name'] );
$license_status = 'license-' . $class . '-notice';
@@ -2813,6 +2818,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
case 'no_activations_left':
$class = 'error';
// translators: %s: account link.
$messages[] = sprintf( __( 'Your license key has reached its activation limit. <a href="%s">View possible upgrades</a> now.', 'ultimate-member' ), 'https://ultimatemember.com/account' );
$license_status = 'license-' . $class . '-notice';
@@ -2831,7 +2837,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$error = ! empty( $license->error ) ? $license->error : __( 'unknown_error', 'ultimate-member' );
$messages[] = sprintf( __( 'There was an error with this license key: %s. Please <a href="%s">contact our support team</a>.', 'ultimate-member' ), $error, 'https://ultimatemember.com/support' );
// translators: %1$s is an error; %2$s is a support link.
$messages[] = sprintf( __( 'There was an error with this license key: %1$s. Please <a href="%2$s">contact our support team</a>.', 'ultimate-member' ), $error, 'https://ultimatemember.com/support' );
$license_status = 'license-' . $class . '-notice';
break;
@@ -2839,7 +2846,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
} else {
$class = 'error';
$error = ! empty( $license->error ) ? $license->error : __( 'unknown_error', 'ultimate-member' );
$messages[] = sprintf( __( 'There was an error with this license key: %s. Please <a href="%s">contact our support team</a>.', 'ultimate-member' ), $error, 'https://ultimatemember.com/support' );
// translators: %1$s is an error; %2$s is a support link.
$messages[] = sprintf( __( 'There was an error with this license key: %1$s. Please <a href="%2$s">contact our support team</a>.', 'ultimate-member' ), $error, 'https://ultimatemember.com/support' );
$license_status = 'license-' . $class . '-notice';
}
@@ -2852,7 +2860,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$error = ! empty( $errors[0] ) ? $errors[0] : __( 'unknown_error', 'ultimate-member' );
$errors_data = ! empty( $errors_data[0][0] ) ? ', ' . $errors_data[0][0] : '';
$messages[] = sprintf( __( 'There was an error with this license key: %s%s. Please <a href="%s">contact our support team</a>.', 'ultimate-member' ), $error, $errors_data, 'https://ultimatemember.com/support' );
// translators: %1$s is an error; %2$s is a error data; %3$s is a support link.
$messages[] = sprintf( __( 'There was an error with this license key: %1$s%2$s. Please <a href="%3$s">contact our support team</a>.', 'ultimate-member' ), $error, $errors_data, 'https://ultimatemember.com/support' );
$license_status = 'license-' . $class . '-notice';
@@ -2864,7 +2873,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'expired';
$messages[] = sprintf(
__( 'Your license key expired on %s. Please <a href="%s" target="_blank">renew your license key</a>.', 'ultimate-member' ),
// translators: %1$s is a expiry date; %2$s is a renew link.
__( 'Your license key expired on %1$s. Please <a href="%2$s" target="_blank">renew your license key</a>.', 'ultimate-member' ),
date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
'https://ultimatemember.com/checkout/?edd_license_key=' . $value . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
);
@@ -2877,6 +2887,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$messages[] = sprintf(
// translators: %s: support link name.
__( 'Your license key has been disabled. Please <a href="%s" target="_blank">contact support</a> for more information.', 'ultimate-member' ),
'https://ultimatemember.com/support?utm_campaign=admin&utm_source=licenses&utm_medium=revoked'
);
@@ -2889,6 +2900,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$messages[] = sprintf(
// translators: %s: account page.
__( 'Invalid license. Please <a href="%s" target="_blank">visit your account page</a> and verify it.', 'ultimate-member' ),
'https://ultimatemember.com/account?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
);
@@ -2902,7 +2914,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'error';
$messages[] = sprintf(
__( 'Your %s is not active for this URL. Please <a href="%s" target="_blank">visit your account page</a> to manage your license key URLs.', 'ultimate-member' ),
// translators: %1$s is a item name title; %2$s is a account page.
__( 'Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank">visit your account page</a> to manage your license key URLs.', 'ultimate-member' ),
$field_data['item_name'],
'https://ultimatemember.com/account?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
);
@@ -2914,6 +2927,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
case 'item_name_mismatch' :
$class = 'error';
// translators: %s: item name.
$messages[] = sprintf( __( 'This appears to be an invalid license key for %s.', 'ultimate-member' ), $field_data['item_name'] );
$license_status = 'license-' . $class . '-notice';
@@ -2923,6 +2937,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
case 'no_activations_left':
$class = 'error';
// translators: %s: account link.
$messages[] = sprintf( __( 'Your license key has reached its activation limit. <a href="%s">View possible upgrades</a> now.', 'ultimate-member' ), 'https://ultimatemember.com/account' );
$license_status = 'license-' . $class . '-notice';
@@ -2954,7 +2969,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
} elseif( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {
$messages[] = sprintf(
__( 'Your license key expires soon! It expires on %s. <a href="%s" target="_blank">Renew your license key</a>.', 'ultimate-member' ),
// translators: %1$s is a expiry date; %2$s is a renew link.
__( 'Your license key expires soon! It expires on %1$s. <a href="%2$s" target="_blank">Renew your license key</a>.', 'ultimate-member' ),
date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
'https://ultimatemember.com/checkout/?edd_license_key=' . $value . '&utm_campaign=admin&utm_source=licenses&utm_medium=renew'
);
@@ -2964,6 +2980,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
} else {
$messages[] = sprintf(
// translators: %s: expiry date.
__( 'Your license key expires on %s.', 'ultimate-member' ),
date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) )
);
@@ -2982,6 +2999,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
$class = 'empty';
$messages[] = sprintf(
// translators: %s: item name.
__( 'To receive updates, please enter your valid %s license key.', 'ultimate-member' ),
$field_data['item_name']
);
+16 -3
View File
@@ -134,7 +134,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
</style>
<span class="um_plugin_upgrade_notice">
<?php printf( __( '%s is a major update, and we highly recommend creating a full backup of your site before updating.', 'ultimate-member' ), $args['new_version'] ); ?>
<?php
// translators: %s: new version.
echo wp_kses( sprintf( __( '%s is a major update, and we highly recommend creating a full backup of your site before updating.', 'ultimate-member' ), $args['new_version'] ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</span>
<?php ob_get_flush();
@@ -251,8 +254,18 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
$um_last_version_upgrade = get_option( 'um_last_version_upgrade', __( 'empty', 'ultimate-member' ) ); ?>
<div class="wrap">
<h2><?php printf( __( '%s - Upgrade Process', 'ultimate-member' ), ultimatemember_plugin_name ) ?></h2>
<p><?php printf( __( 'You have installed <strong>%s</strong> version. Your latest DB version is <strong>%s</strong>. 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 ) ?></p>
<h2>
<?php
// translators: %s: plugin name.
echo wp_kses( sprintf( __( '%s - Upgrade Process', 'ultimate-member' ), ultimatemember_plugin_name ), JB()->get_allowed_html( 'admin_notice' ) );
?>
</h2>
<p>
<?php
// translators: %1$s is a plugin version; %2$s is a last version upgrade.
echo wp_kses( sprintf( __( 'You have installed <strong>%1$s</strong> version. Your latest DB version is <strong>%2$s</strong>. 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' ) );
?>
</p>
<p><?php _e( 'After clicking the <strong>"Run"</strong> button, the update process will start. All information will be displayed in the <strong>"Upgrade Log"</strong> field.', 'ultimate-member' ); ?></p>
<p><?php _e( 'If the update was successful, you will see a corresponding message. Otherwise, contact technical support if the update failed.', 'ultimate-member' ); ?></p>
<h4><?php _e( 'Upgrade Log', 'ultimate-member' ) ?></h4>
@@ -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 ) ); ?>
<p class="description" style="margin: 20px 0 0 0;">
<?php printf( __( 'You may get more details about email notifications customization <a href="%s">here</a>', 'ultimate-member' ),
'https://docs.ultimatemember.com/article/1335-email-templates'
); ?>
<?php
// translators: %s: doc link.
echo wp_kses( sprintf( __( 'You may get more details about email notifications customization <a href="%s">here</a>', 'ultimate-member' ), 'https://docs.ultimatemember.com/article/1335-email-templates' ), JB()->get_allowed_html( 'admin_notice' ) );
?>
</p>
<form action="" method="get" name="um-settings-emails" id="um-settings-emails">
@@ -330,4 +331,4 @@ $ListTable->wpc_set_pagination_args( array( 'total_items' => count( $emails ), '
<input type="hidden" name="tab" value="email" />
<?php $ListTable->display(); ?>
</form>
</form>
@@ -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();
}
@@ -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 ) ) );
}
+4 -3
View File
@@ -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 ) ) );
}