重构:去除冗余条件语句

This commit is contained in:
sunxiyuan 2020-10-07 10:37:33 +08:00
parent 54ef93833f
commit baa486cff9

View file

@ -35,12 +35,10 @@ class WP_CHINA_YES {
/**
* 初始化设置项
*/
if (empty(get_option('wpapi')) || empty(get_option('super_admin')) || empty(get_option('super_gravatar')) || empty(get_option('super_googlefonts'))) {
update_option("wpapi", get_option('wpapi') ?: '2');
update_option("super_admin", get_option('super_admin') ?: '1');
update_option("super_gravatar", get_option('super_gravatar') ?: '1');
update_option("super_googlefonts", get_option('super_googlefonts') ?: '2');
}
update_option("wpapi", get_option('wpapi') ?: '2');
update_option("super_admin", get_option('super_admin') ?: '1');
update_option("super_gravatar", get_option('super_gravatar') ?: '1');
update_option("super_googlefonts", get_option('super_googlefonts') ?: '2');
/**