- changed "e-mail" to "email";

- changed texts for admin notices;
- added a few links to docs;
This commit is contained in:
Mykyta Synelnikov
2024-02-16 15:12:21 +02:00
parent 555c56211f
commit e1f550afb5
26 changed files with 111 additions and 55 deletions
+5 -5
View File
@@ -348,7 +348,7 @@ class Site_Health {
}
$account_settings['um-account_email'] = array(
'label' => __( 'Allow users to change e-mail', 'ultimate-member' ),
'label' => __( 'Allow users to change email', 'ultimate-member' ),
'value' => UM()->options()->get( 'account_email' ) ? $labels['yes'] : $labels['no'],
);
@@ -543,7 +543,7 @@ class Site_Health {
// Email settings
$email_settings = array(
'um-admin_email' => array(
'label' => __( 'Admin E-mail Address', 'ultimate-member' ),
'label' => __( 'Admin Email Address', 'ultimate-member' ),
'value' => UM()->options()->get( 'admin_email' ),
),
'um-mail_from' => array(
@@ -555,7 +555,7 @@ class Site_Health {
'value' => UM()->options()->get( 'mail_from_addr' ),
),
'um-email_html' => array(
'label' => __( 'Use HTML for E-mails?', 'ultimate-member' ),
'label' => __( 'Use HTML for Emails?', 'ultimate-member' ),
'value' => UM()->options()->get( 'email_html' ) ? $labels['yes'] : $labels['no'],
),
);
@@ -1420,7 +1420,7 @@ class Site_Health {
$info[ 'ultimate-member-' . $key ]['fields'],
array(
'um-url_email_activate' => array(
'label' => __( 'URL redirect after e-mail activation', 'ultimate-member' ),
'label' => __( 'URL redirect after email activation', 'ultimate-member' ),
'value' => $rolemeta['_um_url_email_activate'],
),
)
@@ -1846,7 +1846,7 @@ class Site_Health {
'first_name' => __( 'First Name', 'ultimate-member' ),
'last_name' => __( 'Last Name', 'ultimate-member' ),
'nickname' => __( 'Nickname', 'ultimate-member' ),
'secondary_user_email' => __( 'Secondary E-mail Address', 'ultimate-member' ),
'secondary_user_email' => __( 'Secondary Email Address', 'ultimate-member' ),
'description' => __( 'Biography', 'ultimate-member' ),
'phone_number' => __( 'Phone Number', 'ultimate-member' ),
'mobile_number' => __( 'Mobile Number', 'ultimate-member' ),
+19
View File
@@ -1852,5 +1852,24 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
return $value;
}
public function render_external_link( $data ) {
$defaults = array(
'url' => '',
'html' => '',
);
$data = wp_parse_args( $data, $defaults );
if ( empty( $data['url'] ) || empty( $data['html'] ) ) {
return '';
}
ob_start();
?>
<a target="_blank" href="<?php echo esc_url( $data['url'] ); ?>">
<?php echo esc_html( $data['html'] ); ?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" class="um-external-link-icon" aria-hidden="true" focusable="false"><path d="M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"></path></svg>
</a>
<?php
return ob_get_clean();
}
}
}
+1 -1
View File
@@ -779,7 +779,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Notices' ) ) {
<p>
<?php
// translators: %s child-theme article link.
echo wp_kses( sprintf( __( 'We highly recommend using a <a href="%s">child-theme</a> for Ultimate Member customization, which hasn\'t dependencies with the official themes repo, so your custom files cannot be rewritten after a theme upgrade.<br />Otherwise, the customization files may be deleted after every theme upgrade.', 'ultimate-member' ), 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ), UM()->get_allowed_html( 'admin_notice' ) );
echo wp_kses( sprintf( __( 'We recommend using a <a href="%s">child-theme</a> for Ultimate Member customization. Unlike official theme repositories, child themes don\'t have dependencies that could lead to your custom files being overwritten during a theme upgrade.<br />Without a child theme, your customization files may be deleted after every theme update.', 'ultimate-member' ), 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ), UM()->get_allowed_html( 'admin_notice' ) );
?>
</p>
+6 -6
View File
@@ -1099,7 +1099,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'sections' => array(
'' => array(
'title' => __( 'Pages', 'ultimate-member' ),
'description' => __( 'This section enables you to assign a page to one of the core elements necessary for the plugin\'s proper function. The plugin automatically creates and configures the required pages upon installation.<br />You only need to use this tab if you accidentally deleted pages that were automatically created during the initial plugin activation.', 'ultimate-member' ),
'description' => sprintf( __( 'This section enables you to assign a page to one of the core elements necessary for the plugin\'s proper function. The plugin automatically creates and configures the required pages upon installation.<br />You only need to use this tab if you accidentally deleted pages that were automatically created during the initial plugin activation. <a href="%s" target="_blank">Learn more about manually creating pages</a>.', 'ultimate-member' ), 'https://docs.ultimatemember.com/article/1903-creating-plugin-core-pages-manually' ),
'fields' => $general_pages_fields,
),
'users' => array(
@@ -1562,7 +1562,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'id' => 'blocked_emails',
'type' => 'textarea',
'label' => __( 'Blocked Email Addresses (Enter one email per line)', 'ultimate-member' ),
'description' => __( 'This will block the specified e-mail addresses from being able to sign up or sign in to your site. To block an entire domain, use something like `*@domain.com`.', 'ultimate-member' ),
'description' => __( 'This will block the specified email addresses from being able to sign up or sign in to your site. To block an entire domain, use something like `*@domain.com`.', 'ultimate-member' ),
),
array(
'id' => 'blocked_words',
@@ -1586,7 +1586,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
array(
'id' => 'admin_email',
'type' => 'text',
'label' => __( 'Admin E-mail Address', 'ultimate-member' ),
'label' => __( 'Admin Email Address', 'ultimate-member' ),
'description' => __( 'e.g. admin@companyname.com.', 'ultimate-member' ),
),
array(
@@ -1611,8 +1611,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'id' => 'email_html',
'type' => 'checkbox',
'label' => __( 'Content type', 'ultimate-member' ),
'checkbox_label' => __( 'Enable HTML for E-mails', 'ultimate-member' ),
'description' => __( 'If you plan use e-mails with HTML, please make sure that this option is enabled. Otherwise, HTML will be displayed as plain text.', 'ultimate-member' ),
'checkbox_label' => __( 'Enable HTML for Emails', 'ultimate-member' ),
'description' => __( 'If you plan use emails with HTML, please make sure that this option is enabled. Otherwise, HTML will be displayed as plain text.', 'ultimate-member' ),
),
),
),
@@ -2193,7 +2193,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
'form_sections' => array(
'developers' => array(
'title' => __( 'Developers', 'ultimate-member' ),
'description' => __( 'This section allows you to manage settings that will be more developer-friendly. If you are not a developer, edit these settings at your own risk.', 'ultimate-member' ),
'description' => __( 'This section is designed to modify settings that are tailored for developers. If you are not a developer, please be cautious when changing these settings.', 'ultimate-member' ),
'fields' => array(
array(
'id' => 'allowed_choice_callbacks',
+2 -2
View File
@@ -247,7 +247,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
'label' => __( 'Put as Pending Review', 'ultimate-member' )
),
'um_resend_activation' => array(
'label' => __( 'Resend Activation E-mail', 'ultimate-member' )
'label' => __( 'Resend Activation Email', 'ultimate-member' )
),
'um_deactivate' => array(
'label' => __( 'Deactivate', 'ultimate-member' )
@@ -407,7 +407,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Users' ) ) {
$status = array(
'approved' => __( 'Approved', 'ultimate-member' ),
'awaiting_admin_review' => __( 'Pending review', 'ultimate-member' ),
'awaiting_email_confirmation' => __( 'Waiting e-mail confirmation', 'ultimate-member' ),
'awaiting_email_confirmation' => __( 'Waiting email confirmation', 'ultimate-member' ),
'inactive' => __( 'Inactive', 'ultimate-member' ),
'rejected' => __( 'Rejected', 'ultimate-member' ),
);
+1 -1
View File
@@ -70,7 +70,7 @@
</td>
<td class="last t">
<a href="<?php echo esc_url( admin_url( 'users.php?um_status=awaiting_email_confirmation' ) ); ?>" class="warning">
<?php _e( 'Awaiting E-mail Confirmation', 'ultimate-member' ); ?>
<?php _e( 'Awaiting Email Confirmation', 'ultimate-member' ); ?>
</a>
</td>
</tr>
+14 -4
View File
@@ -1,12 +1,14 @@
<?php if ( ! defined( 'ABSPATH' ) ) {
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$role = $object['data']; ?>
$role = $object['data'];
?>
<div class="um-admin-metabox">
<?php
UM()->admin_forms(
$form = UM()->admin_forms(
array(
'class' => 'um-role-publish um-top-label',
'prefix_id' => 'role',
@@ -20,7 +22,8 @@ $role = $object['data']; ?>
),
),
)
)->render_form();
);
$form->render_form();
?>
</div>
@@ -31,3 +34,10 @@ $role = $object['data']; ?>
<div class="clear"></div>
</div>
</div>
<?php
echo $form->render_external_link(
array(
'html' => __( 'Learn more about role priorities', 'ultimate-member' ),
'url' => 'https://docs.ultimatemember.com/article/1494-how-to-set-role-priority-for-user-roles',
)
);
+2 -2
View File
@@ -76,8 +76,8 @@
array(
'id' => '_um_url_email_activate',
'type' => 'text',
'label' => __( 'URL redirect after e-mail activation', 'ultimate-member' ),
'tooltip' => __( 'If you want users to go to a specific page other than login page after e-mail activation, enter the URL here.', 'ultimate-member' ),
'label' => __( 'URL redirect after email activation', 'ultimate-member' ),
'tooltip' => __( 'If you want users to go to a specific page other than login page after email activation, enter the URL here.', 'ultimate-member' ),
'value' => ! empty( $role['_um_url_email_activate'] ) ? __( $role['_um_url_email_activate'], 'ultimate-member' ) : '',
'conditional' => array( '_um_status', '=', 'checkmail' ),
),