Update
This commit is contained in:
BIN
inc/.DS_Store
vendored
BIN
inc/.DS_Store
vendored
Binary file not shown.
@@ -573,6 +573,18 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
|
||||
'after_row' => '<hr>',
|
||||
];
|
||||
|
||||
$fields[] = [
|
||||
'name' => esc_html__( 'Login to show Price', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Require users login to show Price', 'opalestate-pro' ),
|
||||
'id' => 'enable_single_login_to_show_price',
|
||||
'type' => 'switch',
|
||||
'options' => [
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
'after_row' => '<hr>',
|
||||
];
|
||||
|
||||
$fields[] = [
|
||||
'name' => esc_html__( 'Show Author box', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Show Author box in the single property page.', 'opalestate-pro' ),
|
||||
@@ -605,6 +617,17 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
];
|
||||
|
||||
$fields[] = [
|
||||
'name' => esc_html__( 'Login to show Enquire form', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Require users login to show Enquire form', 'opalestate-pro' ),
|
||||
'id' => 'enable_single_login_to_enquire_form',
|
||||
'type' => 'switch',
|
||||
'options' => [
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
'after_row' => '<hr>',
|
||||
];
|
||||
|
||||
|
||||
@@ -1326,6 +1326,18 @@ function opalestate_is_require_login_to_show_author_box() {
|
||||
return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() );
|
||||
}
|
||||
|
||||
function opalestate_is_require_login_to_show_price() {
|
||||
$require = opalestate_get_option( 'enable_single_login_to_show_price', 'off' );
|
||||
|
||||
return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() );
|
||||
}
|
||||
|
||||
function opalestate_is_require_login_to_show_enquire_form() {
|
||||
$require = opalestate_get_option( 'enable_single_login_to_enquire_form', '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.
|
||||
|
||||
Reference in New Issue
Block a user