mirror of
https://github.com/WenPai-org/wp-china-yes.git
synced 2025-08-04 20:19:53 +08:00
重构:去除冗余条件语句
This commit is contained in:
parent
54ef93833f
commit
baa486cff9
1 changed files with 4 additions and 6 deletions
|
@ -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');
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue