mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- strict typing with UM settings;
This commit is contained in:
@@ -104,7 +104,7 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
wp_register_script( 'um_admin_blocks_shortcodes', $js_url . 'admin/block-renderer' . $suffix . '.js', array( 'wp-i18n', 'wp-blocks', 'wp-components' ), UM_VERSION, true );
|
||||
wp_set_script_translations( 'um_admin_blocks_shortcodes', 'ultimate-member' );
|
||||
|
||||
$notifications_enabled = 0;
|
||||
$notifications_enabled = false;
|
||||
if ( false !== UM()->account()->is_notifications_tab_visible() ) {
|
||||
$notifications_enabled = UM()->options()->get( 'account_tab_notifications' );
|
||||
}
|
||||
@@ -112,7 +112,7 @@ final class Enqueue extends \um\common\Enqueue {
|
||||
$um_account_settings = array(
|
||||
'general' => array(
|
||||
'label' => __( 'General', 'ultimate-member' ),
|
||||
'enabled' => 1,
|
||||
'enabled' => true,
|
||||
),
|
||||
'password' => array(
|
||||
'label' => __( 'Password', 'ultimate-member' ),
|
||||
|
||||
@@ -513,7 +513,7 @@ class Site_Health {
|
||||
'value' => UM()->options()->get( 'enable_reset_password_limit' ) ? $labels['yes'] : $labels['no'],
|
||||
),
|
||||
);
|
||||
if ( 1 === absint( UM()->options()->get( 'enable_reset_password_limit' ) ) ) {
|
||||
if ( UM()->options()->get( 'enable_reset_password_limit' ) ) {
|
||||
$access_other_settings['um-reset_password_limit_number'] = array(
|
||||
'label' => __( 'Reset Password Limit ', 'ultimate-member' ),
|
||||
'value' => UM()->options()->get( 'reset_password_limit_number' ),
|
||||
|
||||
@@ -786,6 +786,9 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'use_um_gravatar_default_image' => array(
|
||||
'sanitize' => 'bool',
|
||||
),
|
||||
'delete_comments' => array(
|
||||
'sanitize' => 'bool',
|
||||
),
|
||||
'toggle_password' => array(
|
||||
'sanitize' => 'bool',
|
||||
),
|
||||
@@ -1416,7 +1419,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'args' => array(
|
||||
'textarea_rows' => 6,
|
||||
),
|
||||
'conditional' => array( 'account_tab_delete', '=', '1' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'delete_account_no_pass_required_text',
|
||||
@@ -1426,7 +1428,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'args' => array(
|
||||
'textarea_rows' => 6,
|
||||
),
|
||||
'conditional' => array( 'account_tab_delete', '=', '0' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user