mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- Emails section;
- Override templates section; - updated checkboxes styles;
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
.um-form-table .um-forms-line[data-conditional] {
|
||||
display: none; }
|
||||
|
||||
.um-form-table .um-forms-line[data-field_type="checkbox"] td label, .um-form-table .um-forms-line[data-field_type="same_page_update"] td label {
|
||||
font-style: italic; }
|
||||
|
||||
.um-form-table .um-forms-line label .um-req {
|
||||
color: #a00;
|
||||
margin: 0 0 0 3px;
|
||||
@@ -68,10 +65,6 @@
|
||||
display: block;
|
||||
margin: 0 0 5px 0; }
|
||||
|
||||
.um-form-table .description {
|
||||
font-style: italic;
|
||||
clear: both; }
|
||||
|
||||
.um_admin_fonticon_wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -7,11 +7,6 @@
|
||||
.#{$prefix}forms-line
|
||||
&[data-conditional]
|
||||
display: none
|
||||
&[data-field_type="checkbox"],
|
||||
&[data-field_type="same_page_update"]
|
||||
td
|
||||
label
|
||||
font-style: italic
|
||||
label
|
||||
.#{$prefix}req
|
||||
color: $required-asterisk
|
||||
@@ -96,9 +91,9 @@
|
||||
width: 100%
|
||||
display: block
|
||||
margin: 0 0 5px 0
|
||||
.description
|
||||
font-style: italic
|
||||
clear: both
|
||||
//.description
|
||||
// font-style: italic
|
||||
// clear: both
|
||||
|
||||
.um_admin_fonticon_wrapper
|
||||
+flex( row, flex-start, center, nowrap )
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
width: 25%; }
|
||||
|
||||
.column-configure {
|
||||
width: 60px;
|
||||
text-align: center; }
|
||||
width: 10%;
|
||||
text-align: right; }
|
||||
|
||||
th.column-email.column-primary {
|
||||
padding-left: 48px; }
|
||||
@@ -35,16 +35,19 @@ th.column-email.column-primary {
|
||||
.um-form-table .um-forms-line td {
|
||||
padding-right: 0; }
|
||||
|
||||
#um-settings-template-versions .wp-list-table .column-core_version {
|
||||
width: 100px;
|
||||
text-align: center; }
|
||||
#um-settings-emails {
|
||||
margin: 15px 0; }
|
||||
|
||||
#um-settings-template-versions .wp-list-table .column-theme_version {
|
||||
width: 100px;
|
||||
text-align: center; }
|
||||
|
||||
#um-settings-template-versions .wp-list-table .column-status {
|
||||
width: 260px; }
|
||||
#um-settings-template-versions {
|
||||
margin: 15px 0; }
|
||||
#um-settings-template-versions .wp-list-table .column-core_version {
|
||||
width: 100px;
|
||||
text-align: center; }
|
||||
#um-settings-template-versions .wp-list-table .column-theme_version {
|
||||
width: 100px;
|
||||
text-align: center; }
|
||||
#um-settings-template-versions .wp-list-table .column-status {
|
||||
width: 260px; }
|
||||
|
||||
#um-settings-form {
|
||||
float: left;
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.um-settings-section .description{font-style:italic}.um-notification-status{margin-right:18px;font-size:28px;line-height:22px;color:#c74a4a;float:left;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.um-notification-status.um-notification-is-active{color:#7acf58}.um-email-configure span{line-height:24px}.um-long-field{width:100%}.um-medium-field{width:50%}.um-small-field{width:25%}.column-configure{width:60px;text-align:center}th.column-email.column-primary{padding-left:48px}.um-form-table .um-forms-line td{padding-right:0}#um-settings-template-versions .wp-list-table .column-core_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-theme_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-status{width:260px}#um-settings-form{float:left;width:100%;margin:0}#um-settings-form .subsubsub{float:left;width:100%}.um-settings-line .multi-checkbox-line{float:left;width:100%;clear:both;margin:0 0 10px 0;padding:0}.um-settings-line .multi-checkbox-column{float:left;margin:0;padding:0}.um-settings-line .multi-checkbox-column label{float:left;width:100%}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:240px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-expired a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-valid{background-color:#5abc55;color:#fff;border-color:#5abc55}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses~p.submit{clear:both}@media screen and (max-width:980px){.wrap-licenses .form-table tr{width:calc(50% - 15px);max-width:none}}@media screen and (max-width:782px){#um-settings-template-versions .wp-list-table .column-core_version,#um-settings-template-versions .wp-list-table .column-theme_version{width:auto;text-align:left}.wrap-licenses .form-table tr{width:100%;margin-right:0;max-width:none}.um-settings-line .multi-checkbox-column{width:100%!important}.um-settings-line .multi-checkbox-column label{line-height:30px!important}.um-medium-field{width:100%}.um-small-field{width:50%}}.um_setting_ajax_button_response.complete{color:#7acf58;font-style:italic}.wp-core-ui .button.um_license_activate,.wp-core-ui .button.um_license_deactivate,.wp-core-ui .button.um_license_reactivate{margin-top:5px}.um-media-upload .um-media-upload-url{margin-bottom:5px}
|
||||
.um-settings-section .description{font-style:italic}.um-notification-status{margin-right:18px;font-size:28px;line-height:22px;color:#c74a4a;float:left;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.um-notification-status.um-notification-is-active{color:#7acf58}.um-email-configure span{line-height:24px}.um-long-field{width:100%}.um-medium-field{width:50%}.um-small-field{width:25%}.column-configure{width:10%;text-align:right}th.column-email.column-primary{padding-left:48px}.um-form-table .um-forms-line td{padding-right:0}#um-settings-emails{margin:15px 0}#um-settings-template-versions{margin:15px 0}#um-settings-template-versions .wp-list-table .column-core_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-theme_version{width:100px;text-align:center}#um-settings-template-versions .wp-list-table .column-status{width:260px}#um-settings-form{float:left;width:100%;margin:0}#um-settings-form .subsubsub{float:left;width:100%}.um-settings-line .multi-checkbox-line{float:left;width:100%;clear:both;margin:0 0 10px 0;padding:0}.um-settings-line .multi-checkbox-column{float:left;margin:0;padding:0}.um-settings-line .multi-checkbox-column label{float:left;width:100%}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:240px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .edd-license-data[class*=edd-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .edd-license-data[class*=edd-license-] a{color:#444}.wrap-licenses .edd-license-data[class*=edd-license-] a:hover{text-decoration:none}.wrap-licenses .edd-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .edd-license-data.license-expires-soon-notice a{color:#fff}.wrap-licenses .edd-license-data.license-expires-soon-notice a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .edd-license-data.edd-license-expired a{color:#fff}.wrap-licenses .edd-license-data.edd-license-expired a:hover{text-decoration:none}.wrap-licenses .edd-license-data.edd-license-valid{background-color:#5abc55;color:#fff;border-color:#5abc55}.wrap-licenses .edd-license-data.edd-license-error,.wrap-licenses .edd-license-data.edd-license-invalid,.wrap-licenses .edd-license-data.edd-license-item_name_mismatch,.wrap-licenses .edd-license-data.edd-license-missing,.wrap-licenses .edd-license-data.edd-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .edd-license-data p{font-size:13px;margin-top:0}.wrap-licenses~p.submit{clear:both}@media screen and (max-width:980px){.wrap-licenses .form-table tr{width:calc(50% - 15px);max-width:none}}@media screen and (max-width:782px){#um-settings-template-versions .wp-list-table .column-core_version,#um-settings-template-versions .wp-list-table .column-theme_version{width:auto;text-align:left}.wrap-licenses .form-table tr{width:100%;margin-right:0;max-width:none}.um-settings-line .multi-checkbox-column{width:100%!important}.um-settings-line .multi-checkbox-column label{line-height:30px!important}.um-medium-field{width:100%}.um-small-field{width:50%}}.um_setting_ajax_button_response.complete{color:#7acf58;font-style:italic}.wp-core-ui .button.um_license_activate,.wp-core-ui .button.um_license_deactivate,.wp-core-ui .button.um_license_reactivate{margin-top:5px}.um-media-upload .um-media-upload-url{margin-bottom:5px}
|
||||
@@ -38,8 +38,8 @@
|
||||
width: 25%
|
||||
|
||||
.column-configure
|
||||
width: 60px
|
||||
text-align: center
|
||||
width: 10%
|
||||
text-align: right
|
||||
|
||||
th.column-email.column-primary
|
||||
padding-left: 48px
|
||||
@@ -50,7 +50,11 @@ th.column-email.column-primary
|
||||
td
|
||||
padding-right: 0
|
||||
|
||||
##{$prefix}settings-emails
|
||||
margin: 15px 0
|
||||
|
||||
##{$prefix}settings-template-versions
|
||||
margin: 15px 0
|
||||
.wp-list-table
|
||||
.column-core_version
|
||||
width: 100px
|
||||
|
||||
@@ -235,16 +235,18 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
|
||||
'description' => __( 'Scan your site to check for vulnerabilities prior to Ultimate Member version 2.6.7 and get recommendations to secure your site.', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'lock_register_forms',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Lock All Register Forms', 'ultimate-member' ),
|
||||
'description' => __( 'This prevents all users from registering with Ultimate Member on your site.', 'ultimate-member' ),
|
||||
'id' => 'lock_register_forms',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Lock All Register Forms', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Lock Forms', 'ultimate-member' ),
|
||||
'description' => __( 'This prevents all users from registering with Ultimate Member on your site.', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'display_login_form_notice',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display Login form notice to reset passwords', 'ultimate-member' ),
|
||||
'description' => __( 'Enforces users to reset their passwords( one-time ) and prevent from entering old password.', 'ultimate-member' ),
|
||||
'id' => 'display_login_form_notice',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display Login form notice to reset passwords', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable Login form notice', 'ultimate-member' ),
|
||||
'description' => __( 'Enforces users to reset their passwords (one-time) and prevent from entering old password.', 'ultimate-member' ),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -264,17 +266,19 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
|
||||
$secure_fields,
|
||||
array(
|
||||
array(
|
||||
'id' => 'secure_ban_admins_accounts',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable ban for administrative capabilities', 'ultimate-member' ),
|
||||
'description' => __( ' When someone tries to inject capabilities to the Account, Profile & Register forms submission, it will be banned.', 'ultimate-member' ),
|
||||
'id' => 'secure_ban_admins_accounts',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Administrative capabilities ban', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable ban for administrative capabilities', 'ultimate-member' ),
|
||||
'description' => __( ' When someone tries to inject capabilities to the Account, Profile & Register forms submission, it will be banned.', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'secure_notify_admins_banned_accounts',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Notify Administrators', 'ultimate-member' ),
|
||||
'description' => __( 'When enabled, All administrators will be notified when someone has suspicious activities in the Account, Profile & Register forms.', 'ultimate-member' ),
|
||||
'conditional' => array( 'secure_ban_admins_accounts', '=', 1 ),
|
||||
'id' => 'secure_notify_admins_banned_accounts',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Notify Administrators', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable notification', 'ultimate-member' ),
|
||||
'description' => __( 'When enabled, All administrators will be notified when someone has suspicious activities in the Account, Profile & Register forms.', 'ultimate-member' ),
|
||||
'conditional' => array( 'secure_ban_admins_accounts', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => 'secure_notify_admins_banned_accounts__interval',
|
||||
@@ -291,7 +295,7 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
|
||||
'id' => 'secure_allowed_redirect_hosts',
|
||||
'type' => 'textarea',
|
||||
'label' => __( 'Allowed hosts for safe redirect (one host per line)', 'ultimate-member' ),
|
||||
'description' => __( 'Extend allowed hosts for frontend pages redirects', 'ultimate-member' ),
|
||||
'description' => __( 'Extend allowed hosts for frontend pages redirects.', 'ultimate-member' ),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
@@ -168,7 +168,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) && ! in_array( $data['type'], array( 'same_page_update', 'checkbox' ), true ) ) {
|
||||
if ( ! empty( $data['description'] ) ) {
|
||||
$html .= '<p class="description">' . $data['description'] . '</p>';
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) && ! in_array( $data['type'], array( 'same_page_update', 'checkbox' ), true ) ) {
|
||||
if ( ! empty( $data['description'] ) ) {
|
||||
$html .= '<p class="description">' . $data['description'] . '</p>';
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) && ! in_array( $data['type'], array( 'same_page_update', 'checkbox' ), true ) ) {
|
||||
if ( ! empty( $data['description'] ) ) {
|
||||
$html .= '<p class="description">' . $data['description'] . '</p>';
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) && ! in_array( $data['type'], array( 'same_page_update', 'checkbox' ), true ) ) {
|
||||
if ( ! empty( $data['description'] ) ) {
|
||||
$html .= '<div class="clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) && ! in_array( $data['type'], array( 'same_page_update', 'checkbox' ), true ) ) {
|
||||
if ( ! empty( $data['description'] ) ) {
|
||||
$html .= '<div class="clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
}
|
||||
|
||||
if ( ! empty( $data['description'] ) && ! in_array( $data['type'], array( 'same_page_update', 'checkbox' ), true ) ) {
|
||||
if ( ! empty( $data['description'] ) ) {
|
||||
$html .= '<div class="clear"></div><p class="description">' . $data['description'] . '</p>';
|
||||
}
|
||||
|
||||
@@ -963,11 +963,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
$value = $this->get_field_value( $field_data );
|
||||
|
||||
$description = ! empty( $field_data['description'] ) ? $field_data['description'] : '';
|
||||
$checkbox_label = ! empty( $field_data['checkbox_label'] ) ? $field_data['checkbox_label'] : '';
|
||||
|
||||
$field_html = "<input type=\"checkbox\" $id_attr $class_attr $name_attr $data_attr " . checked( $value, true, false ) . " value=\"1\" " . disabled( ! empty( $field_data['disabled'] ), true, false ) . " />";
|
||||
if ( '' !== $description ) {
|
||||
$field_html = "<label>$field_html $description</label>";
|
||||
if ( '' !== $checkbox_label ) {
|
||||
$field_html = "<label>$field_html $checkbox_label</label>";
|
||||
}
|
||||
$html = "<input type=\"hidden\" $id_attr_hidden $name_attr value=\"0\" " . disabled( ! empty( $field_data['disabled'] ), true, false ) . " />{$field_html}";
|
||||
return apply_filters( 'um_admin_render_checkbox_field_html', $html, $field_data );
|
||||
@@ -993,7 +993,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
$class_attr = ' class="um-forms-field ' . esc_attr( $class ) . '" ';
|
||||
|
||||
$data = array(
|
||||
'field_id' => $field_data['id']
|
||||
'field_id' => $field_data['id'],
|
||||
);
|
||||
|
||||
if ( ! empty( $field_data['data'] ) ) {
|
||||
@@ -1015,11 +1015,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
|
||||
$value = $this->get_field_value( $field_data );
|
||||
|
||||
$description = ! empty( $field_data['description'] ) ? $field_data['description'] : '';
|
||||
$checkbox_label = ! empty( $field_data['checkbox_label'] ) ? $field_data['checkbox_label'] : '';
|
||||
|
||||
$field_html = "<input type=\"checkbox\" $id_attr $class_attr $name_attr $data_attr " . checked( $value, true, false ) . " value=\"1\" " . disabled( ! empty( $field_data['disabled'] ), true, false ) . " />";
|
||||
if ( '' !== $description ) {
|
||||
$field_html = "<label>$field_html $description</label>";
|
||||
if ( '' !== $checkbox_label ) {
|
||||
$field_html = "<label>$field_html $checkbox_label</label>";
|
||||
}
|
||||
$html = "<input type=\"hidden\" $id_attr_hidden $name_attr value=\"0\" " . disabled( ! empty( $field_data['disabled'] ), true, false ) . " />{$field_html}";
|
||||
|
||||
@@ -1749,51 +1749,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Forms' ) ) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $field_data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render_form_section( $field_data ) {
|
||||
$html = '<h3>' . esc_html( $field_data['title'] ) . '</h3>';
|
||||
if ( ! empty( $field_data['content'] ) ) {
|
||||
$html .= '<div id="um_' . esc_attr( $field_data['id'] ) . '_description"><p>' . wp_kses( $field_data['content'] , UM()->get_allowed_html( 'admin_notice' ) ) . '</p></div>';
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function render_override_templates( $field_data ) {
|
||||
$um_check_version = get_transient( 'um_check_template_versions' );
|
||||
|
||||
$check_url = add_query_arg(
|
||||
array(
|
||||
'um_adm_action' => 'check_templates_version',
|
||||
'_wpnonce' => wp_create_nonce( 'check_templates_version' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<p class="description" style="margin: 20px 0 0 0;">
|
||||
<a href="<?php echo esc_url( $check_url ); ?>" class="button" style="margin-right: 10px;">
|
||||
<?php esc_html_e( 'Re-check templates', 'ultimate-member' ); ?>
|
||||
</a>
|
||||
<?php
|
||||
if ( false !== $um_check_version ) {
|
||||
// translators: %s: Last checking templates time.
|
||||
echo esc_html( sprintf( __( 'Last update: %s. You could re-check changes manually.', 'ultimate-member' ), wp_date( get_option( 'date_format', 'F j, Y' ) . ' ' . get_option( 'time_format', 'g:i a' ), $um_check_version ) ) );
|
||||
} else {
|
||||
esc_html_e( 'Templates haven\'t check yet. You could check changes manually.', 'ultimate-member' );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
ob_start();
|
||||
include_once UM_PATH . 'includes/admin/core/list-tables/version-template-list-table.php';
|
||||
$html = ob_get_clean();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get field value
|
||||
*
|
||||
|
||||
@@ -57,7 +57,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Menu' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( empty( $settings_struct['fields'] ) && empty( $settings_struct['sections'] ) ) {
|
||||
if ( empty( $settings_struct['fields'] ) && empty( $settings_struct['sections'] ) && empty( $settings_struct['form_sections'] ) ) {
|
||||
wp_safe_redirect( add_query_arg( array( 'page' => 'um_options' ), admin_url( 'admin.php' ) ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -42,13 +42,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
//init settings structure
|
||||
add_action( 'admin_init', array( &$this, 'init_variables' ), 9 );
|
||||
|
||||
//settings structure handlers
|
||||
// settings structure handlers
|
||||
add_action( 'um_settings_page_before_email__content', array( $this, 'settings_before_email_tab' ) );
|
||||
add_filter( 'um_settings_section_custom_fields', array( $this, 'email_section_custom_fields' ), 10, 2 );
|
||||
|
||||
add_filter( 'um_settings_form_section_advanced_override_templates_override_templates_custom_content', array( $this, 'settings_override_templates_tab' ) );
|
||||
|
||||
//custom content for licenses tab
|
||||
add_filter( 'um_settings_section_licenses__custom_content', array( $this, 'settings_licenses_tab' ), 10, 3 );
|
||||
add_filter( 'um_settings_section_advanced_override_templates_custom_content', array( $this, 'settings_override_templates_tab' ) );
|
||||
|
||||
// @todo remove since 2.9.0
|
||||
add_filter( 'um_settings_section_install_info__custom_content', array( $this, 'settings_install_info' ) );
|
||||
@@ -636,10 +637,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
$latest_truncate = get_option( 'um_member_directory_truncated', false );
|
||||
|
||||
$same_page_update = array(
|
||||
'id' => 'member_directory_own_table',
|
||||
'type' => 'same_page_update',
|
||||
'label' => __( 'Enable custom table for usermeta', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to enable the use of a custom table for user metadata. Improved performance for member directory searches.', 'ultimate-member' ),
|
||||
'id' => 'member_directory_own_table',
|
||||
'type' => 'same_page_update',
|
||||
'label' => __( 'Custom usermeta table', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable custom table for usermeta', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to enable the use of a custom table for user metadata. Improved performance for member directory searches.', 'ultimate-member' ),
|
||||
);
|
||||
|
||||
if ( empty( $latest_update ) || ( ! empty( $latest_truncate ) && $latest_truncate > $latest_update ) ) {
|
||||
@@ -1142,22 +1144,25 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'size' => 'medium',
|
||||
),
|
||||
array(
|
||||
'id' => 'author_redirect',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Automatically redirect author page to their profile?', 'ultimate-member' ),
|
||||
'description' => __( 'If enabled, author pages will automatically redirect to the user\'s profile page', 'ultimate-member' ),
|
||||
'id' => 'author_redirect',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Hide author pages', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable automatically redirect author page to their profile', 'ultimate-member' ),
|
||||
'description' => __( 'If enabled, author pages will automatically redirect to the user\'s profile page', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'members_page',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable Members Directory', 'ultimate-member' ),
|
||||
'description' => __( 'Control whether to enable or disable member directories on this site', 'ultimate-member' ),
|
||||
'id' => 'members_page',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Members Directory', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable Members Directory', 'ultimate-member' ),
|
||||
'description' => __( 'Control whether to enable or disable member directories on this site', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'use_gravatars',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Use Gravatar', 'ultimate-member' ),
|
||||
'description' => __( 'Do you want to use Gravatar instead of the default plugin profile photo (If the user did not upload a custom profile photo/avatar)?', 'ultimate-member' ),
|
||||
'id' => 'use_gravatars',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Use Gravatar', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable Gravatar', 'ultimate-member' ),
|
||||
'description' => __( 'Do you want to use Gravatar instead of the default plugin profile photo (If the user did not upload a custom profile photo/avatar)?', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'use_um_gravatar_default_builtin_image',
|
||||
@@ -1178,17 +1183,19 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'size' => 'medium',
|
||||
),
|
||||
array(
|
||||
'id' => 'use_um_gravatar_default_image',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Use Default plugin avatar as Gravatar\'s Default avatar', 'ultimate-member' ),
|
||||
'description' => __( 'Do you want to use the plugin default avatar instead of the gravatar default photo (If the user did not upload a custom profile photo / avatar)', 'ultimate-member' ),
|
||||
'conditional' => array( 'use_um_gravatar_default_builtin_image', '=', 'default' ),
|
||||
'id' => 'use_um_gravatar_default_image',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Replace Gravatar\'s Default avatar', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Set Default plugin avatar as Gravatar\'s Default avatar', 'ultimate-member' ),
|
||||
'description' => __( 'Do you want to use the plugin default avatar instead of the gravatar default photo (If the user did not upload a custom profile photo/avatar)', 'ultimate-member' ),
|
||||
'conditional' => array( 'use_um_gravatar_default_builtin_image', '=', 'default' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'delete_comments',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Deleting user comments after deleting a user', 'ultimate-member' ),
|
||||
'description' => __( 'Do you want to delete a user\'s comments when that user deletes themself or is removed from the admin dashboard from the site?', 'ultimate-member' ),
|
||||
'id' => 'delete_comments',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Delete user comments', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable deleting user comments after deleting a user', 'ultimate-member' ),
|
||||
'description' => __( 'Do you want to delete a user\'s comments when that user deletes themself or is removed from the admin dashboard from the site?', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1197,16 +1204,18 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'description' => __( 'Password & Security settings.', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'toggle_password',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show/hide password button', 'ultimate-member' ),
|
||||
'description' => __( 'Enable visibility for show/hide password button for the password field-type.', 'ultimate-member' ),
|
||||
'id' => 'toggle_password',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Toggle Password Visibility', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable password show/hide button', 'ultimate-member' ),
|
||||
'description' => __( 'Enable visibility for show/hide password button for the password field-type.', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'require_strongpass',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Require Strong Passwords', 'ultimate-member' ),
|
||||
'description' => __( 'Enable this option to apply strong password rules to all password fields (user registration, password reset and password change).', 'ultimate-member' ),
|
||||
'id' => 'require_strongpass',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Require Strong Passwords', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable strong passwords', 'ultimate-member' ),
|
||||
'description' => __( 'Enable this option to apply strong password rules to all password fields (user registration, password reset and password change).', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'password_min_chars',
|
||||
@@ -1401,31 +1410,44 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
),
|
||||
),
|
||||
'email' => array(
|
||||
'title' => __( 'Email', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'admin_email',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Admin E-mail Address', 'ultimate-member' ),
|
||||
'tooltip' => __( 'e.g. admin@companyname.com', 'ultimate-member' ),
|
||||
'title' => __( 'Email', 'ultimate-member' ),
|
||||
'form_sections' => array(
|
||||
'email_sender' => array(
|
||||
'title' => __( 'Email sender options', 'ultimate-member' ),
|
||||
'description' => __( 'How the sender appears in outgoing Ultimate Member emails.', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'admin_email',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Admin E-mail Address', 'ultimate-member' ),
|
||||
'description' => __( 'e.g. admin@companyname.com', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'mail_from',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Mail appears from', 'ultimate-member' ),
|
||||
'description' => __( 'e.g. Site Name', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'mail_from_addr',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Mail appears from address', 'ultimate-member' ),
|
||||
'description' => __( 'e.g. admin@companyname.com', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => 'mail_from',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Mail appears from', 'ultimate-member' ),
|
||||
'tooltip' => __( 'e.g. Site Name', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'mail_from_addr',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Mail appears from address', 'ultimate-member' ),
|
||||
'tooltip' => __( 'e.g. admin@companyname.com', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'email_html',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Use HTML for E-mails?', 'ultimate-member' ),
|
||||
'tooltip' => __( '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' ),
|
||||
'email_template' => array(
|
||||
'title' => __( 'Email template', 'ultimate-member' ),
|
||||
'description' => __( 'Section to customize email templates settings.', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'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' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1840,15 +1862,17 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'title' => __( 'General', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'form_asterisk',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show an asterisk for required fields', 'ultimate-member' ),
|
||||
'id' => 'form_asterisk',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Required fields\' asterisk', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Show an asterisk for required fields', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'um_profile_object_cache_stop',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Disable Cache User Profile', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to disable Ultimate Member user\'s cache.', 'ultimate-member' ),
|
||||
'id' => 'um_profile_object_cache_stop',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Cache User Profile', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Disable user data cache', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to disable Ultimate Member user\'s cache.', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'rest_api_version',
|
||||
@@ -1861,25 +1885,25 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => 'uninstall_on_delete',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Remove Data on Uninstall?', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like Ultimate Member to completely remove all of its data when the plugin/extensions are deleted.', 'ultimate-member' ),
|
||||
'id' => 'uninstall_on_delete',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Remove Data on Uninstall?', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable flushing data', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like Ultimate Member to completely remove all of its data when the plugin/extensions are deleted.', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
'override_templates' => array(
|
||||
'title' => __( 'Override templates', 'ultimate-member' ),
|
||||
'form_sections' => array(
|
||||
array(
|
||||
'id' => 'override_templates_options',
|
||||
'type' => 'form_section',
|
||||
'override_templates' => array(
|
||||
'title' => __( 'Override templates', 'ultimate-member' ),
|
||||
// translators: %s: Link to the docs article.
|
||||
'description' => sprintf( __( 'You may get more details about overriding templates <a href="%s" target="_blank">here</a>.', 'ultimate-member' ), 'https://docs.ultimatemember.com/article/1516-templates-map' ), /** @noinspection HtmlUnknownTarget */
|
||||
'description' => sprintf( __( 'You can find a list of template file changes with each release. You can check the latest templates and their statuses, and see if they\'re outdated or updated. You may get more details about overriding templates <a href="%s" target="_blank">here</a>.', 'ultimate-member' ), 'https://docs.ultimatemember.com/article/1516-templates-map' ), /** @noinspection HtmlUnknownTarget */
|
||||
'fields' => array(
|
||||
array(
|
||||
'type' => 'override_templates',
|
||||
'id' => 'override_templates_list_table',
|
||||
'type' => 'override_templates_list_table',
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1893,10 +1917,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'description' => __( 'Start using new features that are being progressively rolled out to improve the users management experience.', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'enable_blocks',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable Gutenberg Blocks', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to use Ultimate Member blocks in Gutenberg editor. Important some themes have the conflicts with Gutenberg editor.', 'ultimate-member' ),
|
||||
'id' => 'enable_blocks',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Gutenberg Blocks', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Enable Gutenberg Blocks', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to use Ultimate Member blocks in Gutenberg editor. Important some themes have the conflicts with Gutenberg editor.', 'ultimate-member' ),
|
||||
),
|
||||
$same_page_update,
|
||||
),
|
||||
@@ -1906,10 +1931,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'description' => __( 'These features are either experimental or incomplete, enable them at your own risk!', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'disable_legacy_fonicons',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Disable legacy fonticons', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to disable legacy Ultimate Member fonticons used outdated versions of FontAwesome and Ionicons libraries.', 'ultimate-member' ),
|
||||
'id' => 'disable_legacy_fonicons',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Legacy fonticons', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Disable legacy fonticons', 'ultimate-member' ),
|
||||
'description' => __( 'Check this box if you would like to disable legacy Ultimate Member fonticons used outdated versions of FontAwesome and Ionicons libraries.', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1920,10 +1946,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
// backward compatibility option leave it disabled for better security and ability to exclude posts/terms pre-query
|
||||
// otherwise we're filtering only results and restricted posts/terms can be visible
|
||||
array(
|
||||
'id' => 'disable_restriction_pre_queries',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Disable pre-queries for restriction content logic', 'ultimate-member' ),
|
||||
'description' => __( 'Please enable this option only in the cases when you have big or unnecessary queries on your site with active restriction logic. If you want to exclude posts only from the results queries instead of pre_get_posts and fully-hidden post logic also please enable this option. It activates the restriction content logic until 2.2.x version without latest security enhancements.', 'ultimate-member' ),
|
||||
'id' => 'disable_restriction_pre_queries',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Restriction content pre-queries', 'ultimate-member' ),
|
||||
'checkbox_label' => __( 'Disable pre-queries for restriction content logic', 'ultimate-member' ),
|
||||
'description' => __( 'Please enable this option only in the cases when you have big or unnecessary queries on your site with active restriction logic. If you want to exclude posts only from the results queries instead of pre_get_posts and fully-hidden post logic also please enable this option. It activates the restriction content logic until 2.2.x version without latest security enhancements.', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -2125,7 +2152,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $tab['fields'] ) || ! empty( $tab['sections'] ) ) {
|
||||
if ( ! empty( $tab['fields'] ) || ! empty( $tab['sections'] ) || ! empty( $tab['form_sections'] ) ) {
|
||||
$menu_tabs[ $slug ] = $tab['title'];
|
||||
}
|
||||
}
|
||||
@@ -3037,7 +3064,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function settings_override_templates_tab() {
|
||||
public function settings_override_templates_tab( $content ) {
|
||||
$um_check_version = get_transient( 'um_check_template_versions' );
|
||||
|
||||
$check_url = add_query_arg(
|
||||
@@ -3049,7 +3076,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<p class="description" style="margin: 20px 0 0 0;">
|
||||
<p>
|
||||
<a href="<?php echo esc_url( $check_url ); ?>" class="button" style="margin-right: 10px;">
|
||||
<?php esc_html_e( 'Re-check templates', 'ultimate-member' ); ?>
|
||||
</a>
|
||||
@@ -3062,18 +3089,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<p class="description" style="margin: 20px 0 0 0;">
|
||||
<?php
|
||||
/** @noinspection HtmlUnknownTarget */
|
||||
// translators: %s: Link to the docs article.
|
||||
echo wp_kses( sprintf( __( 'You may get more details about overriding templates <a href="%s" target="_blank">here</a>.', 'ultimate-member' ), 'https://docs.ultimatemember.com/article/1516-templates-map' ), UM()->get_allowed_html( 'admin_notice' ) );
|
||||
?>
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
include_once UM_PATH . 'includes/admin/core/list-tables/version-template-list-table.php';
|
||||
|
||||
return ob_get_clean();
|
||||
$content = ob_get_clean();
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3086,14 +3108,15 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
public function settings_install_info() {
|
||||
ob_start();
|
||||
?>
|
||||
<p class="description" style="margin: 20px 0 0 0;">
|
||||
<h2 class="title"><?php esc_html_e( 'Install Info', 'ultimate-member' ); ?></h2>
|
||||
<p>
|
||||
<?php
|
||||
/** @noinspection HtmlUnknownTarget */
|
||||
// translators: %s: Link to the Site Health > Info.
|
||||
echo wp_kses( sprintf( __( 'This settings tab is deprecated. And it will be fully removed since 2.9.0 version. Please get the installation info from <a href="%s">there</a>.', 'ultimate-member' ), add_query_arg( 'tab', 'debug', admin_url( 'site-health.php' ) ) ), UM()->get_allowed_html( 'admin_notice' ) );
|
||||
?>
|
||||
</p>
|
||||
<p class="description" style="margin: 20px 0 0 0;">
|
||||
<p>
|
||||
<?php
|
||||
/** @noinspection HtmlUnknownTarget */
|
||||
// translators: %s: Link to the Site Health article.
|
||||
@@ -3293,7 +3316,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
* @return string
|
||||
*/
|
||||
public function render_settings_section( $section_fields, $current_tab, $current_subtab ) {
|
||||
ob_start();
|
||||
$settings_section = '';
|
||||
|
||||
if ( ! empty( $section_fields['form_sections'] ) ) {
|
||||
foreach ( $section_fields['form_sections'] as $section_key => $form_section_fields ) {
|
||||
@@ -3301,6 +3324,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$custom_form_section_content = apply_filters( "um_settings_form_section_{$current_tab}_{$current_subtab}_{$section_key}_custom_content", false );
|
||||
|
||||
ob_start();
|
||||
if ( ! empty( $form_section_fields['title'] ) ) {
|
||||
?>
|
||||
<h2 class="title"><?php echo esc_html( $form_section_fields['title'] ); ?></h2>
|
||||
@@ -3313,13 +3339,19 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
<?php
|
||||
}
|
||||
|
||||
UM()->admin_forms_settings(
|
||||
array(
|
||||
'class' => 'um_options-' . $current_tab . '-' . $current_subtab . '-' . $section_key . ' um-third-column',
|
||||
'prefix_id' => 'um_options',
|
||||
'fields' => $form_section_fields['fields'],
|
||||
)
|
||||
)->render_form();
|
||||
if ( false === $custom_form_section_content ) {
|
||||
UM()->admin_forms_settings(
|
||||
array(
|
||||
'class' => 'um_options-' . $current_tab . '-' . $current_subtab . '-' . $section_key . ' um-third-column',
|
||||
'prefix_id' => 'um_options',
|
||||
'fields' => $form_section_fields['fields'],
|
||||
)
|
||||
)->render_form();
|
||||
} else {
|
||||
echo $custom_form_section_content;
|
||||
}
|
||||
|
||||
$settings_section .= ob_get_clean();
|
||||
}
|
||||
} else {
|
||||
$settings_structure = $this->settings_structure[ $current_tab ];
|
||||
@@ -3335,6 +3367,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
$section_description = array_key_exists( 'description', $settings_structure ) ? $settings_structure['description'] : '';
|
||||
}
|
||||
|
||||
ob_start();
|
||||
|
||||
if ( ! empty( $section_title ) ) {
|
||||
?>
|
||||
<h2 class="title"><?php echo esc_html( $section_title ); ?></h2>
|
||||
@@ -3354,9 +3388,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'fields' => $section_fields,
|
||||
)
|
||||
)->render_form();
|
||||
|
||||
$settings_section .= ob_get_clean();
|
||||
}
|
||||
|
||||
return ob_get_clean();
|
||||
return $settings_section;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -99,6 +99,15 @@ class UM_Emails_List_Table extends WP_List_Table {
|
||||
$this->_column_headers = array( $columns, $hidden, $sortable );
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the table navigation above or below the table
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @param string $which
|
||||
*/
|
||||
protected function display_tablenav( $which ) {
|
||||
// Stop displaying tablenav.
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object $item
|
||||
@@ -221,12 +230,14 @@ class UM_Emails_List_Table extends WP_List_Table {
|
||||
function column_email( $item ) {
|
||||
$active = UM()->options()->get( $item['key'] . '_on' );
|
||||
|
||||
$icon = ! empty( $active ) ? 'um-notification-is-active dashicons-yes' : 'dashicons-no-alt';
|
||||
$link = add_query_arg( array( 'email' => $item['key'] ) );
|
||||
$text = '<span class="dashicons um-notification-status ' . esc_attr( $icon ) . '"></span><a href="' . esc_url( $link ) . '"><strong>' . $item['title'] . '</strong></a>';
|
||||
$icon = ! empty( $active ) ? 'um-notification-is-active dashicons-yes' : 'dashicons-no-alt';
|
||||
$icon_title = ! empty( $active ) ? __( 'Enabled', 'ultimate-member' ) : __( 'Disabled', 'ultimate-member' );
|
||||
|
||||
$link = add_query_arg( array( 'email' => $item['key'] ), remove_query_arg( 'paged' ) );
|
||||
$text = '<span class="dashicons um-notification-status ' . esc_attr( $icon ) . '" title="' . esc_attr( $icon_title ) . '"></span><a href="' . esc_url( $link ) . '"><strong>' . esc_html( $item['title'] ) . '</strong></a>';
|
||||
|
||||
if ( ! empty( $item['description'] ) ) {
|
||||
$text .= ' <span class="um_tooltip dashicons dashicons-editor-help" title="' . esc_attr__( $item['description'], 'ultimate-member' ) . '"></span>';
|
||||
$text .= ' <span class="um_tooltip dashicons dashicons-editor-help" title="' . esc_attr( $item['description'] ) . '"></span>';
|
||||
}
|
||||
|
||||
return $text;
|
||||
@@ -239,11 +250,11 @@ class UM_Emails_List_Table extends WP_List_Table {
|
||||
* @return string
|
||||
*/
|
||||
function column_recipients( $item ) {
|
||||
if ( $item['recipient'] == 'admin' ) {
|
||||
if ( 'admin' === $item['recipient'] ) {
|
||||
return UM()->options()->get( 'admin_email' );
|
||||
} else {
|
||||
return __( 'Member', 'ultimate-member' );
|
||||
}
|
||||
|
||||
return __( 'Member', 'ultimate-member' );
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +264,8 @@ class UM_Emails_List_Table extends WP_List_Table {
|
||||
* @return string
|
||||
*/
|
||||
function column_configure( $item ) {
|
||||
return '<a class="button um-email-configure" href="' . add_query_arg( array( 'email' => $item['key'] ) ) . '" title="' . esc_attr__( 'Edit template', 'ultimate-member' ) . '"><span class="dashicons dashicons-admin-generic"></span></a>';
|
||||
$edit_link = add_query_arg( array( 'email' => $item['key'] ), remove_query_arg( 'paged' ) );
|
||||
return '<a class="button um-email-configure" href="' . esc_url( $edit_link ) . '" title="' . esc_attr__( 'Manage', 'ultimate-member' ) . '">' . esc_html__( 'Manage', 'ultimate-member' ) . '</a>';
|
||||
}
|
||||
|
||||
|
||||
@@ -276,13 +288,13 @@ class UM_Emails_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
$ListTable = new UM_Emails_List_Table( array(
|
||||
'singular' => __( 'Email Notification', 'ultimate-member' ),
|
||||
'plural' => __( 'Email Notifications', 'ultimate-member' ),
|
||||
'ajax' => false
|
||||
'singular' => __( 'Email Notification', 'ultimate-member' ),
|
||||
'plural' => __( 'Email Notifications', 'ultimate-member' ),
|
||||
'ajax' => false,
|
||||
));
|
||||
|
||||
$per_page = 20;
|
||||
$paged = $ListTable->get_pagenum();
|
||||
$per_page = 999;
|
||||
$paged = $ListTable->get_pagenum();
|
||||
|
||||
/**
|
||||
* UM hook
|
||||
@@ -306,9 +318,9 @@ $paged = $ListTable->get_pagenum();
|
||||
* ?>
|
||||
*/
|
||||
$columns = apply_filters( 'um_email_templates_columns', array(
|
||||
'email' => __( 'Email', 'ultimate-member' ),
|
||||
'recipients' => __( 'Recipient(s)', 'ultimate-member' ),
|
||||
'configure' => '',
|
||||
'email' => __( 'Email', 'ultimate-member' ),
|
||||
'recipients' => __( 'Recipient(s)', 'ultimate-member' ),
|
||||
'configure' => '',
|
||||
) );
|
||||
|
||||
$ListTable->set_columns( $columns );
|
||||
@@ -317,18 +329,21 @@ $emails = UM()->config()->email_notifications;
|
||||
|
||||
$ListTable->prepare_items();
|
||||
$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 ) ); ?>
|
||||
$ListTable->wpc_set_pagination_args( array( 'total_items' => count( $emails ), 'per_page' => $per_page ) );
|
||||
?>
|
||||
|
||||
<p class="description" style="margin: 20px 0 0 0;">
|
||||
<?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' ), UM()->get_allowed_html( 'admin_notice' ) );
|
||||
?>
|
||||
<h2 class="title"><?php esc_html_e( 'Email notifications', 'ultimate-member' ); ?></h2>
|
||||
<p>
|
||||
<?php esc_html_e( 'Email notifications sent from Ultimate Member are listed below. Click on an email to configure it.', 'ultimate-member' ); ?>
|
||||
<br />
|
||||
<?php esc_html_e( 'To ensure your website\'s notifications arrive in your and your customers\' inboxes, we recommend connecting your email address to your domain and setting up a dedicated SMTP server.', 'ultimate-member' ); ?>
|
||||
<?php 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' ), UM()->get_allowed_html( 'admin_notice' ) ); ?>
|
||||
</p>
|
||||
|
||||
<div class="clear"></div>
|
||||
<form action="" method="get" name="um-settings-emails" id="um-settings-emails">
|
||||
<input type="hidden" name="page" value="um_options" />
|
||||
<input type="hidden" name="tab" value="email" />
|
||||
|
||||
<?php $ListTable->display(); ?>
|
||||
</form>
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -163,6 +163,16 @@ class UM_Versions_List_Table extends WP_List_Table {
|
||||
$icon = 1 === $item['status_code'] ? 'um-notification-is-active dashicons-yes' : 'dashicons-no-alt';
|
||||
return $item['status'] . ' <span class="dashicons um-notification-status ' . esc_attr( $icon ) . '"></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the table navigation above or below the table
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @param string $which
|
||||
*/
|
||||
protected function display_tablenav( $which ) {
|
||||
// Stop displaying tablenav.
|
||||
}
|
||||
}
|
||||
|
||||
$list_table = new UM_Versions_List_Table(
|
||||
|
||||
Reference in New Issue
Block a user