Added: Require login to show Author box, Search field settings.

This commit is contained in:
Hoang Huu
2020-02-20 10:39:15 +07:00
parent 0c1b3b7ef1
commit 103f4954aa
11 changed files with 227 additions and 140 deletions

View File

@@ -1292,6 +1292,11 @@ function opalestate_is_enable_areasize_field() {
return 'on' == opalestate_get_option( 'opalestate_ppt_areasize_opt', 'on' );
}
function opalestate_is_require_login_to_show_author_box() {
$require = opalestate_get_option( 'enable_single_login_to_show_author_box', 'off' );
return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() );
}
/**
* Clean variables using sanitize_text_field. Arrays are cleaned recursively.
* Non-scalar values are ignored.