数据没有完全取消序列化,并且没有正确地制作为一个不必要使用的多维数组wp\\u parse\\u args()不必要地使用了get\\u option()。
function nls_tml_default_settings() {
$nlstml = array(
\'enable_css\' => 1,
\'login_type\' => \'default\',
\'active_modules\' => array(
\'custom-passwords/custom-passwords.php\',
\'custom-user-links/custom-user-links.php\',
\'recaptcha/recaptcha.php\',
\'security/security.php\',
\'themed-profiles/themed-profiles.php\',
\'user-moderation/user-moderation.php\',
),
\'version\' => \'6.4.10\',
);
update_option( \'theme_my_login\', $nlstml );
$nlsrecap = array(
\'public_key\' => \'sitekey\',
\'private_key\' => \'secretkey\',
\'theme\' => \'light\',
);
update_option( \'theme_my_login_recaptcha\', $nlsrecap );
$nlssecurity = array(
\'private_site\' => \'\',
\'private_login\' => 1,
\'failed_login\' => array(
\'threshold\' => 5,
\'threshold_duration\' => 1,
\'threshold_duration_unit\' => \'hour\',
\'lockout_duration\' => 24,
\'lockout_duration_unit\' => \'hour\',
),
);
update_option( \'theme_my_login_security\', $nlssecurity );
$nlsprofiles = array(
\'administrator\' => array(
\'theme_profile\' => 1,
\'restrict_admin\' => \'\',
),
\'editor\' => array(
\'theme_profile\' => 1,
\'restrict_admin\' => 1,
),
\'author\' => array(
\'theme_profile\' => 1,
\'restrict_admin\' => 1,
),
\'contributor\' => array(
\'theme_profile\' => 1,
\'restrict_admin\' => 1,
),
\'subscriber\' => array(
\'theme_profile\' => 1,
\'restrict_admin\' => 1,
),
\'wpseo_manager\' => array(
\'theme_profile\' => 1,
\'restrict_admin\' => 1,
),
\'wpseo_editor\' => array(
\'theme_profile\' => 1,
\'restrict_admin\' => 1,
),
);
update_option( \'theme_my_login_themed_profiles\', $nlsprofiles );
$nlsmoderation = array(
\'type\' => \'admin\',
);
update_option( \'theme_my_login_moderation\', $nlsmoderation );
}
register\\u activation\\u hook(WP\\u PLUGIN\\u DIR./主题我的登录/主题我的登录.php”,“nls\\u tml\\u default\\u settings”);