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

@ -23,6 +23,7 @@ jQuery( document ).ready( function ( $ ) {
$( '.cmb2-id-' + res + '-options-value' ).show(); $( '.cmb2-id-' + res + '-options-value' ).show();
$( '.cmb2-id-' + res + '-min-range' ).hide(); $( '.cmb2-id-' + res + '-min-range' ).hide();
$( '.cmb2-id-' + res + '-max-range' ).hide(); $( '.cmb2-id-' + res + '-max-range' ).hide();
$( '.cmb2-id-' + res + '-unit-thousand' ).hide();
$( '.cmb2-id-' + res + '-default-text' ).hide(); $( '.cmb2-id-' + res + '-default-text' ).hide();
} }
@ -33,6 +34,7 @@ jQuery( document ).ready( function ( $ ) {
$( '.cmb2-id-' + res + '-default-text' ).show(); $( '.cmb2-id-' + res + '-default-text' ).show();
$( '.cmb2-id-' + res + '-min-range' ).hide(); $( '.cmb2-id-' + res + '-min-range' ).hide();
$( '.cmb2-id-' + res + '-max-range' ).hide(); $( '.cmb2-id-' + res + '-max-range' ).hide();
$( '.cmb2-id-' + res + '-unit-thousand' ).hide();
$( '.cmb2-id-' + res + '-options-value' ).hide(); $( '.cmb2-id-' + res + '-options-value' ).hide();
} }
@ -43,6 +45,7 @@ jQuery( document ).ready( function ( $ ) {
$( '.cmb2-id-' + res + '-options-value' ).hide(); $( '.cmb2-id-' + res + '-options-value' ).hide();
$( '.cmb2-id-' + res + '-min-range' ).show(); $( '.cmb2-id-' + res + '-min-range' ).show();
$( '.cmb2-id-' + res + '-max-range' ).show(); $( '.cmb2-id-' + res + '-max-range' ).show();
$( '.cmb2-id-' + res + '-unit-thousand' ).show();
$( '.cmb2-id-' + res + '-default-text' ).hide(); $( '.cmb2-id-' + res + '-default-text' ).hide();
} }
} }
@ -58,16 +61,19 @@ jQuery( document ).ready( function ( $ ) {
$( '.cmb2-id-' + res + '-options-value' ).hide(); $( '.cmb2-id-' + res + '-options-value' ).hide();
$( '.cmb2-id-' + res + '-min-range' ).show(); $( '.cmb2-id-' + res + '-min-range' ).show();
$( '.cmb2-id-' + res + '-max-range' ).show(); $( '.cmb2-id-' + res + '-max-range' ).show();
$( '.cmb2-id-' + res + '-unit-thousand' ).show();
$( '.cmb2-id-' + res + '-default-text' ).hide(); $( '.cmb2-id-' + res + '-default-text' ).hide();
} else if ( val == 'text' ) { } else if ( val == 'text' ) {
$( '.cmb2-id-' + res + '-default-text' ).show(); $( '.cmb2-id-' + res + '-default-text' ).show();
$( '.cmb2-id-' + res + '-options-value' ).hide(); $( '.cmb2-id-' + res + '-options-value' ).hide();
$( '.cmb2-id-' + res + '-min-range' ).hide(); $( '.cmb2-id-' + res + '-min-range' ).hide();
$( '.cmb2-id-' + res + '-max-range' ).hide(); $( '.cmb2-id-' + res + '-max-range' ).hide();
$( '.cmb2-id-' + res + '-unit-thousand' ).hide();
} else { } else {
$( '.cmb2-id-' + res + '-options-value' ).show(); $( '.cmb2-id-' + res + '-options-value' ).show();
$( '.cmb2-id-' + res + '-min-range' ).hide(); $( '.cmb2-id-' + res + '-min-range' ).hide();
$( '.cmb2-id-' + res + '-max-range' ).hide(); $( '.cmb2-id-' + res + '-max-range' ).hide();
$( '.cmb2-id-' + res + '-unit-thousand' ).hide();
$( '.cmb2-id-' + res + '-default-text' ).hide(); $( '.cmb2-id-' + res + '-default-text' ).hide();
} }
} ); } );

View File

@ -1,3 +1,7 @@
= 1.3.3 - 2020-02-20 =
* Added - Required login to show Author box
* Added - Search field settings.
= 1.3.2 - 2020-02-15 = = 1.3.2 - 2020-02-15 =
* Fixes - Hotfix single property settings. * Fixes - Hotfix single property settings.

View File

@ -280,19 +280,27 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
} }
$fields[] = [ $fields[] = [
'name' => esc_html__( 'Search type ', 'opalestate-pro' ) . $meta['name'], 'name' => $meta['name'],
'options' => [ 'desc' => '',
'type' => 'opalestate_title',
'id' => 'opalestate_title_search_field_' . $meta['id'],
'before_row' => '<hr>',
];
$fields[] = [
'name' => esc_html__( 'Field type', 'opalestate-pro' ),
'options' => [
'select' => esc_html__( 'Select', 'opalestate-pro' ), 'select' => esc_html__( 'Select', 'opalestate-pro' ),
'range' => esc_html__( 'Range', 'opalestate-pro' ), 'range' => esc_html__( 'Range', 'opalestate-pro' ),
'text' => esc_html__( 'Text', 'opalestate-pro' ), 'text' => esc_html__( 'Text', 'opalestate-pro' ),
], ],
'id' => $meta['id'] . '_search_type', 'id' => $meta['id'] . '_search_type',
'type' => 'radio_inline', 'type' => 'radio_inline',
'default' => 'select', 'default' => 'select',
]; ];
$fields[] = [ $fields[] = [
'name' => esc_html__( 'Options select ', 'opalestate-pro' ) . $meta['name'], 'name' => esc_html__( 'Options', 'opalestate-pro' ),
'description' => esc_html__( 'Options value select. Use "," to separate values.', 'opalestate-pro' ), 'description' => esc_html__( 'Options value select. Use "," to separate values.', 'opalestate-pro' ),
'id' => $meta['id'] . '_options_value', 'id' => $meta['id'] . '_options_value',
'type' => 'text', 'type' => 'text',
@ -300,7 +308,7 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
]; ];
$fields[] = [ $fields[] = [
'name' => esc_html__( 'Min range ', 'opalestate-pro' ) . $meta['name'], 'name' => esc_html__( 'Min range', 'opalestate-pro' ),
'description' => esc_html__( 'Min range', 'opalestate-pro' ), 'description' => esc_html__( 'Min range', 'opalestate-pro' ),
'id' => $meta['id'] . '_min_range', 'id' => $meta['id'] . '_min_range',
'type' => 'text', 'type' => 'text',
@ -308,7 +316,7 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
]; ];
$fields[] = [ $fields[] = [
'name' => esc_html__( 'Max range ', 'opalestate-pro' ) . $meta['name'], 'name' => esc_html__( 'Max range', 'opalestate-pro' ),
'description' => esc_html__( 'Max range', 'opalestate-pro' ), 'description' => esc_html__( 'Max range', 'opalestate-pro' ),
'id' => $meta['id'] . '_max_range', 'id' => $meta['id'] . '_max_range',
'type' => 'text', 'type' => 'text',
@ -316,7 +324,14 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
]; ];
$fields[] = [ $fields[] = [
'name' => esc_html__( 'Default text ', 'opalestate-pro' ) . $meta['name'], 'name' => esc_html__( 'Unit thousand', 'opalestate-pro' ),
'description' => esc_html__( 'Unit thousand', 'opalestate-pro' ),
'id' => $meta['id'] . '_unit_thousand',
'type' => 'text',
];
$fields[] = [
'name' => esc_html__( 'Default text', 'opalestate-pro' ),
'description' => esc_html__( 'Default text value', 'opalestate-pro' ), 'description' => esc_html__( 'Default text value', 'opalestate-pro' ),
'id' => $meta['id'] . '_default_text', 'id' => $meta['id'] . '_default_text',
'type' => 'text', 'type' => 'text',
@ -491,6 +506,17 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab {
], ],
]; ];
$fields[] = [
'name' => esc_html__( 'Login to show Author box', 'opalestate-pro' ),
'desc' => esc_html__( 'Require users login to show Author box', 'opalestate-pro' ),
'id' => 'enable_single_login_to_show_author_box',
'type' => 'switch',
'options' => [
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
],
];
$fields[] = [ $fields[] = [
'name' => esc_html__( 'Show Enquire form', 'opalestate-pro' ), 'name' => esc_html__( 'Show Enquire form', 'opalestate-pro' ),
'desc' => esc_html__( 'Show Enquire form in the single property page.', 'opalestate-pro' ), 'desc' => esc_html__( 'Show Enquire form in the single property page.', 'opalestate-pro' ),

View File

@ -42,19 +42,20 @@ function opalestate_property_render_field_template( $field, $label, $type = 'sel
break; break;
default: default:
$setting_search_type = 'opalestate_ppt_' . $field . '_search_type'; $setting_search_type = 'opalestate_ppt_' . $field . '_search_type';
$setting_search_type_options = 'opalestate_ppt_' . $field . '_options_value'; $setting_search_type_options = 'opalestate_ppt_' . $field . '_options_value';
$setting_search_min_range = 'opalestate_ppt_' . $field . '_min_range'; $setting_search_min_range = 'opalestate_ppt_' . $field . '_min_range';
$setting_search_max_range = 'opalestate_ppt_' . $field . '_max_range'; $setting_search_max_range = 'opalestate_ppt_' . $field . '_max_range';
$setting_search_default_text = 'opalestate_ppt_' . $field . '_default_text'; $setting_search_unit_thousand = 'opalestate_ppt_' . $field . '_unit_thousand';
$setting_search_default_text = 'opalestate_ppt_' . $field . '_default_text';
$display_type_search = opalestate_options( $setting_search_type, 'select' ); $display_type_search = opalestate_options( $setting_search_type, 'select' );
if ( $display_type_search == 'select' ) { if ( $display_type_search == 'select' ) {
$option_values = (array) explode( ',', opalestate_options( $setting_search_type_options, '1,2,3,4,5,6,7,8,9,10' ) ); $option_values = (array) explode( ',', opalestate_options( $setting_search_type_options, '1,2,3,4,5,6,7,8,9,10' ) );
$template = '<label class="opalestate-label opalestate-label--' . sanitize_html_class( $label ) . '">' . esc_html( $label ) . '</label>'; $template = '<label class="opalestate-label opalestate-label--' . sanitize_html_class( $label ) . '">' . esc_html( $label ) . '</label>';
$template .= '<select class="form-control" name="info[%s]"><option value="">%s</option>'; $template .= '<select class="form-control" name="info[%s]"><option value="">%s</option>';
foreach ( $option_values as $value ) { foreach ( $option_values as $value ) {
$selected = $value == $qvalue ? 'selected="selected"' : ''; $selected = $value == $qvalue ? 'selected="selected"' : '';
@ -66,8 +67,8 @@ function opalestate_property_render_field_template( $field, $label, $type = 'sel
} elseif ( $display_type_search == 'text' ) { } elseif ( $display_type_search == 'text' ) {
$option_values = opalestate_options( $setting_search_default_text, '' ); $option_values = opalestate_options( $setting_search_default_text, '' );
$qvalue = $qvalue ? $qvalue : $option_values; $qvalue = $qvalue ? $qvalue : $option_values;
$template = '<label class="opalestate-label opalestate-label--' . sanitize_html_class( $label ) . '">' . esc_html( $label ) . '</label>'; $template = '<label class="opalestate-label opalestate-label--' . sanitize_html_class( $label ) . '">' . esc_html( $label ) . '</label>';
$template .= '<input class="form-control" type="text" name="info[%s]" value="%s"/>'; $template .= '<input class="form-control" type="text" name="info[%s]" value="%s"/>';
$template = sprintf( $template, $field, $qvalue ); $template = sprintf( $template, $field, $qvalue );
} elseif ( $display_type_search == 'range' ) { } elseif ( $display_type_search == 'range' ) {
@ -78,12 +79,13 @@ function opalestate_property_render_field_template( $field, $label, $type = 'sel
$search_max = (int) isset( $_GET[ $max_name ] ) ? $_GET[ $max_name ] : opalestate_options( $setting_search_max_range, 1000 ); $search_max = (int) isset( $_GET[ $max_name ] ) ? $_GET[ $max_name ] : opalestate_options( $setting_search_max_range, 1000 );
$data = [ $data = [
'id' => $field, 'id' => $field,
'unit' => '', 'unit' => '',
'ranger_min' => opalestate_options( $setting_search_min_range, 0 ), 'ranger_min' => opalestate_options( $setting_search_min_range, 0 ),
'ranger_max' => opalestate_options( $setting_search_max_range, 1000 ), 'ranger_max' => opalestate_options( $setting_search_max_range, 1000 ),
'input_min' => $search_min, 'input_min' => $search_min,
'input_max' => $search_max, 'input_max' => $search_max,
'unit_thousand' => apply_filters( 'opalestate_search_range_unit_thousand', opalestate_options( $setting_search_unit_thousand ), $field ),
]; ];
ob_start(); ob_start();
@ -117,8 +119,8 @@ function opalestate_property_render_field_template( $field, $label, $type = 'sel
* Render area size field. * Render area size field.
*/ */
function opalestate_property_areasize_field_template( $template = '' ) { function opalestate_property_areasize_field_template( $template = '' ) {
$search_min = isset( $_GET['min_area'] ) ? sanitize_text_field( $_GET['min_area'] ) : opalestate_options( 'search_min_area', 0 ); $search_min = isset( $_GET['min_area'] ) ? sanitize_text_field( $_GET['min_area'] ) : opalestate_options( 'search_min_area', 0 );
$search_max = isset( $_GET['max_area'] ) ? sanitize_text_field( $_GET['max_area'] ) : opalestate_options( 'search_max_area', 1000 ); $search_max = isset( $_GET['max_area'] ) ? sanitize_text_field( $_GET['max_area'] ) : opalestate_options( 'search_max_area', 1000 );
$measurement_units = opalestate_get_measurement_units(); $measurement_units = opalestate_get_measurement_units();
$unit = opalestate_options( 'measurement_unit', 'sqft' ); $unit = opalestate_options( 'measurement_unit', 'sqft' );
if ( isset( $measurement_units[ $unit ] ) ) { if ( isset( $measurement_units[ $unit ] ) ) {

View File

@ -1292,6 +1292,11 @@ function opalestate_is_enable_areasize_field() {
return 'on' == opalestate_get_option( 'opalestate_ppt_areasize_opt', 'on' ); 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. * Clean variables using sanitize_text_field. Arrays are cleaned recursively.
* Non-scalar values are ignored. * Non-scalar values are ignored.

View File

@ -3,7 +3,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Opal Estate Pro\n" "Project-Id-Version: Opal Estate Pro\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-14 02:38+0000\n" "POT-Creation-Date: 2020-02-20 03:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: \n" "Language-Team: \n"
@ -19,11 +19,11 @@ msgstr ""
msgid "Cheatin&#8217; huh?" msgid "Cheatin&#8217; huh?"
msgstr "" msgstr ""
#: inc/function-search-fields.php:91 #: inc/function-search-fields.php:93
msgid ": " msgid ": "
msgstr "" msgstr ""
#: inc/function-search-fields.php:138 #: inc/function-search-fields.php:140
#: templates/search-box/search-form-v3.php:64 #: templates/search-box/search-form-v3.php:64
#: templates/search-box/search-form-v2.php:47 #: templates/search-box/search-form-v2.php:47
msgid "Area" msgid "Area"
@ -113,21 +113,21 @@ msgstr ""
#: inc/admin/settings/property.php:65 inc/admin/settings/property.php:123 #: inc/admin/settings/property.php:65 inc/admin/settings/property.php:123
#: inc/admin/settings/property.php:134 inc/admin/settings/property.php:171 #: inc/admin/settings/property.php:134 inc/admin/settings/property.php:171
#: inc/admin/settings/property.php:248 inc/admin/settings/property.php:259 #: inc/admin/settings/property.php:248 inc/admin/settings/property.php:259
#: inc/admin/settings/property.php:343 inc/admin/settings/property.php:355 #: inc/admin/settings/property.php:358 inc/admin/settings/property.php:370
#: inc/admin/settings/property.php:366 inc/admin/settings/property.php:377 #: inc/admin/settings/property.php:381 inc/admin/settings/property.php:392
#: inc/admin/settings/property.php:388 inc/admin/settings/property.php:399 #: inc/admin/settings/property.php:403 inc/admin/settings/property.php:414
#: inc/admin/settings/property.php:410 inc/admin/settings/property.php:421 #: inc/admin/settings/property.php:425 inc/admin/settings/property.php:436
#: inc/admin/settings/property.php:432 inc/admin/settings/property.php:443 #: inc/admin/settings/property.php:447 inc/admin/settings/property.php:458
#: inc/admin/settings/property.php:454 inc/admin/settings/property.php:465 #: inc/admin/settings/property.php:469 inc/admin/settings/property.php:480
#: inc/admin/settings/property.php:489 inc/admin/settings/property.php:500 #: inc/admin/settings/property.php:504 inc/admin/settings/property.php:515
#: inc/admin/settings/property.php:511 inc/admin/settings/general.php:50 #: inc/admin/settings/property.php:526 inc/admin/settings/property.php:537
#: inc/admin/settings/general.php:60 inc/admin/settings/pages.php:102 #: inc/admin/settings/general.php:50 inc/admin/settings/general.php:60
#: inc/admin/settings/pages.php:113 inc/admin/settings/pages.php:124 #: inc/admin/settings/pages.php:102 inc/admin/settings/pages.php:113
#: inc/admin/settings/pages.php:135 inc/admin/settings/pages.php:146 #: inc/admin/settings/pages.php:124 inc/admin/settings/pages.php:135
#: inc/admin/settings/pages.php:158 inc/admin/settings/pages.php:168 #: inc/admin/settings/pages.php:146 inc/admin/settings/pages.php:158
#: inc/admin/settings/pages.php:179 inc/admin/settings/pages.php:190 #: inc/admin/settings/pages.php:168 inc/admin/settings/pages.php:179
#: inc/admin/rating/class-rating.php:69 inc/admin/rating/class-rating.php:79 #: inc/admin/settings/pages.php:190 inc/admin/rating/class-rating.php:69
#: inc/admin/rating/class-rating.php:89 #: inc/admin/rating/class-rating.php:79 inc/admin/rating/class-rating.php:89
#: inc/vendors/elementor/widgets/opalestate-agent-collection.php:171 #: inc/vendors/elementor/widgets/opalestate-agent-collection.php:171
#: inc/vendors/elementor/widgets/opalestate-agency-collection.php:171 #: inc/vendors/elementor/widgets/opalestate-agency-collection.php:171
msgid "Enable" msgid "Enable"
@ -153,21 +153,21 @@ msgstr ""
#: inc/admin/settings/property.php:66 inc/admin/settings/property.php:124 #: inc/admin/settings/property.php:66 inc/admin/settings/property.php:124
#: inc/admin/settings/property.php:135 inc/admin/settings/property.php:172 #: inc/admin/settings/property.php:135 inc/admin/settings/property.php:172
#: inc/admin/settings/property.php:247 inc/admin/settings/property.php:258 #: inc/admin/settings/property.php:247 inc/admin/settings/property.php:258
#: inc/admin/settings/property.php:344 inc/admin/settings/property.php:356 #: inc/admin/settings/property.php:359 inc/admin/settings/property.php:371
#: inc/admin/settings/property.php:367 inc/admin/settings/property.php:378 #: inc/admin/settings/property.php:382 inc/admin/settings/property.php:393
#: inc/admin/settings/property.php:389 inc/admin/settings/property.php:400 #: inc/admin/settings/property.php:404 inc/admin/settings/property.php:415
#: inc/admin/settings/property.php:411 inc/admin/settings/property.php:422 #: inc/admin/settings/property.php:426 inc/admin/settings/property.php:437
#: inc/admin/settings/property.php:433 inc/admin/settings/property.php:444 #: inc/admin/settings/property.php:448 inc/admin/settings/property.php:459
#: inc/admin/settings/property.php:455 inc/admin/settings/property.php:466 #: inc/admin/settings/property.php:470 inc/admin/settings/property.php:481
#: inc/admin/settings/property.php:490 inc/admin/settings/property.php:501 #: inc/admin/settings/property.php:505 inc/admin/settings/property.php:516
#: inc/admin/settings/property.php:512 inc/admin/settings/general.php:51 #: inc/admin/settings/property.php:527 inc/admin/settings/property.php:538
#: inc/admin/settings/general.php:61 inc/admin/settings/pages.php:103 #: inc/admin/settings/general.php:51 inc/admin/settings/general.php:61
#: inc/admin/settings/pages.php:114 inc/admin/settings/pages.php:125 #: inc/admin/settings/pages.php:103 inc/admin/settings/pages.php:114
#: inc/admin/settings/pages.php:136 inc/admin/settings/pages.php:147 #: inc/admin/settings/pages.php:125 inc/admin/settings/pages.php:136
#: inc/admin/settings/pages.php:159 inc/admin/settings/pages.php:169 #: inc/admin/settings/pages.php:147 inc/admin/settings/pages.php:159
#: inc/admin/settings/pages.php:180 inc/admin/settings/pages.php:191 #: inc/admin/settings/pages.php:169 inc/admin/settings/pages.php:180
#: inc/admin/rating/class-rating.php:70 inc/admin/rating/class-rating.php:80 #: inc/admin/settings/pages.php:191 inc/admin/rating/class-rating.php:70
#: inc/admin/rating/class-rating.php:90 #: inc/admin/rating/class-rating.php:80 inc/admin/rating/class-rating.php:90
msgid "Disable" msgid "Disable"
msgstr "" msgstr ""
@ -1257,11 +1257,11 @@ msgstr ""
msgid "Expired" msgid "Expired"
msgstr "" msgstr ""
#: inc/mixes-functions.php:1341 #: inc/mixes-functions.php:1346
msgid "Single Property Sidebar" msgid "Single Property Sidebar"
msgstr "" msgstr ""
#: inc/mixes-functions.php:1343 #: inc/mixes-functions.php:1348
msgid "Add widgets here to appear in your single property sidebar area." msgid "Add widgets here to appear in your single property sidebar area."
msgstr "" msgstr ""
@ -4778,6 +4778,9 @@ msgstr ""
#: templates/user/my-account-popup.php:4 templates/user/my-account.php:4 #: templates/user/my-account-popup.php:4 templates/user/my-account.php:4
#: templates/user/login-form.php:16 templates/user/login-form.php:51 #: templates/user/login-form.php:16 templates/user/login-form.php:51
#: templates/single-property/author-v3.php:60
#: templates/single-property/author-v2.php:69
#: templates/single-property/author.php:62
#: inc/vendors/elementor/widgets/opalestate-account-button.php:533 #: inc/vendors/elementor/widgets/opalestate-account-button.php:533
#: inc/vendors/elementor/widgets/opalestate-account-button.php:534 #: inc/vendors/elementor/widgets/opalestate-account-button.php:534
msgid "Login" msgid "Login"
@ -4994,6 +4997,12 @@ msgstr ""
msgid "Download" msgid "Download"
msgstr "" msgstr ""
#: templates/single-property/author-v3.php:58
#: templates/single-property/author-v2.php:67
#: templates/single-property/author.php:60
msgid "You need to login to see host information."
msgstr ""
#. %s: Name of current post #. %s: Name of current post
#: templates/single-property/content.php:6 #: templates/single-property/content.php:6
#, php-format #, php-format
@ -5724,195 +5733,199 @@ msgstr ""
msgid "Setting type fields search" msgid "Setting type fields search"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:283 #: inc/admin/settings/property.php:291
msgid "Search type " msgid "Field type"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:285 #: inc/admin/settings/property.php:293
msgid "Select" msgid "Select"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:286 #: inc/admin/settings/property.php:294
msgid "Range" msgid "Range"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:287 #: inc/admin/settings/property.php:295
msgid "Text" msgid "Text"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:295
msgid "Options select "
msgstr ""
#: inc/admin/settings/property.php:296
msgid "Options value select. Use \",\" to separate values."
msgstr ""
#: inc/admin/settings/property.php:303 #: inc/admin/settings/property.php:303
msgid "Min range " msgid "Options"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:304 #: inc/admin/settings/property.php:304
msgid "Options value select. Use \",\" to separate values."
msgstr ""
#: inc/admin/settings/property.php:311 inc/admin/settings/property.php:312
msgid "Min range" msgid "Min range"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:311 #: inc/admin/settings/property.php:319 inc/admin/settings/property.php:320
msgid "Max range "
msgstr ""
#: inc/admin/settings/property.php:312
msgid "Max range" msgid "Max range"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:319 #: inc/admin/settings/property.php:327 inc/admin/settings/property.php:328
msgid "Default text " msgid "Unit thousand"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:320 #: inc/admin/settings/property.php:334
msgid "Default text"
msgstr ""
#: inc/admin/settings/property.php:335
msgid "Default text value" msgid "Default text value"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:338 #: inc/admin/settings/property.php:353
msgid "Enable Request Viewing" msgid "Enable Request Viewing"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:339 #: inc/admin/settings/property.php:354
msgid "Enable Request Viewing feature in the single property page." msgid "Enable Request Viewing feature in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:350 #: inc/admin/settings/property.php:365
msgid "Show Amenities tab" msgid "Show Amenities tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:351 #: inc/admin/settings/property.php:366
msgid "Show Amenities tab in the single property page." msgid "Show Amenities tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:361 #: inc/admin/settings/property.php:376
msgid "Show Facilities tab" msgid "Show Facilities tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:362 #: inc/admin/settings/property.php:377
msgid "Show Facilities tab in the single property page." msgid "Show Facilities tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:372 #: inc/admin/settings/property.php:387
msgid "Show Attachments tab" msgid "Show Attachments tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:373 #: inc/admin/settings/property.php:388
msgid "Show Attachments tab in the single property page." msgid "Show Attachments tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:383 #: inc/admin/settings/property.php:398
msgid "Show Video tab" msgid "Show Video tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:384 #: inc/admin/settings/property.php:399
msgid "Show Video tab in the single property page." msgid "Show Video tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:394 #: inc/admin/settings/property.php:409
msgid "Show Virtual Tour tab" msgid "Show Virtual Tour tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:395 #: inc/admin/settings/property.php:410
msgid "Show Virtual Tour tab in the single property page." msgid "Show Virtual Tour tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:405 #: inc/admin/settings/property.php:420
msgid "Show Map tab" msgid "Show Map tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:406 #: inc/admin/settings/property.php:421
msgid "Show Map tab in the single property page." msgid "Show Map tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:416 #: inc/admin/settings/property.php:431
msgid "Show Nearby tab" msgid "Show Nearby tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:417 #: inc/admin/settings/property.php:432
msgid "Show Nearby tab in the single property page." msgid "Show Nearby tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:427 #: inc/admin/settings/property.php:442
msgid "Show Walk Scores tab" msgid "Show Walk Scores tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:428 #: inc/admin/settings/property.php:443
msgid "Show Walk Scores tab in the single property page." msgid "Show Walk Scores tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:438 #: inc/admin/settings/property.php:453
msgid "Show Apartments tab" msgid "Show Apartments tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:439 #: inc/admin/settings/property.php:454
msgid "Show Apartments tab in the single property page." msgid "Show Apartments tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:449 #: inc/admin/settings/property.php:464
msgid "Show Floor Plans tab" msgid "Show Floor Plans tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:450 #: inc/admin/settings/property.php:465
msgid "Show Floor Plans tab in the single property page." msgid "Show Floor Plans tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:460 #: inc/admin/settings/property.php:475
msgid "Show Views Statistics tab" msgid "Show Views Statistics tab"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:461 #: inc/admin/settings/property.php:476
msgid "Show Views Statistics tab in the single property page." msgid "Show Views Statistics tab in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:471 #: inc/admin/settings/property.php:486
msgid "Views Statistics time limit (days)" msgid "Views Statistics time limit (days)"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:472 #: inc/admin/settings/property.php:487
msgid "The number of days will be saved to the database." msgid "The number of days will be saved to the database."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:484 #: inc/admin/settings/property.php:499
msgid "Show Author box" msgid "Show Author box"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:485 #: inc/admin/settings/property.php:500
msgid "Show Author box in the single property page." msgid "Show Author box in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:495 #: inc/admin/settings/property.php:510
msgid "Login to show Author box"
msgstr ""
#: inc/admin/settings/property.php:511
msgid "Require users login to show Author box"
msgstr ""
#: inc/admin/settings/property.php:521
msgid "Show Enquire form" msgid "Show Enquire form"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:496 #: inc/admin/settings/property.php:522
msgid "Show Enquire form in the single property page." msgid "Show Enquire form in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:506 #: inc/admin/settings/property.php:532
msgid "Show Mortgage Calculator" msgid "Show Mortgage Calculator"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:507 #: inc/admin/settings/property.php:533
msgid "Show Mortgage Calculator in the single property page." msgid "Show Mortgage Calculator in the single property page."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:517 #: inc/admin/settings/property.php:543
msgid "Related properties layout" msgid "Related properties layout"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:518 #: inc/admin/settings/property.php:544
msgid "Select a layout for related properties." msgid "Select a layout for related properties."
msgstr "" msgstr ""
#: inc/admin/settings/property.php:525 #: inc/admin/settings/property.php:551
msgid "Nearby properties layout" msgid "Nearby properties layout"
msgstr "" msgstr ""
#: inc/admin/settings/property.php:526 #: inc/admin/settings/property.php:552
msgid "Select a layout for nearby properties." msgid "Select a layout for nearby properties."
msgstr "" msgstr ""

View File

@ -3,7 +3,7 @@
* Plugin Name: Opal Estate Pro * Plugin Name: Opal Estate Pro
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/ * Plugin URI: https://wpdocs.gitbook.io/opal-estate/
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website. * Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
* Version: 1.3.2 * Version: 1.3.3
* Author: WPOPAL * Author: WPOPAL
* Author URI: http://www.wpopal.com * Author URI: http://www.wpopal.com
* Requires at least: 4.9 * Requires at least: 4.9
@ -150,7 +150,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
*/ */
public function __clone() { public function __clone() {
// Cloning instances of the class is forbidden // Cloning instances of the class is forbidden
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'opalestate-pro' ), '1.3.2' ); _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'opalestate-pro' ), '1.3.3' );
} }
/** /**
@ -159,7 +159,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
public function setup_constants() { public function setup_constants() {
// Plugin version // Plugin version
if ( ! defined( 'OPALESTATE_VERSION' ) ) { if ( ! defined( 'OPALESTATE_VERSION' ) ) {
define( 'OPALESTATE_VERSION', '1.3.2' ); define( 'OPALESTATE_VERSION', '1.3.3' );
} }
// Plugin Folder Path // Plugin Folder Path

View File

@ -4,7 +4,7 @@ Donate link: https://wpdocs.gitbook.io/opal-estate/
Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
Requires at least: 4.9 Requires at least: 4.9
Tested up to: 5.3.2 Tested up to: 5.3.2
Stable tag: 1.3.2 Stable tag: 1.3.3
License: GPLv3 License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -156,6 +156,10 @@ This section describes how to install the plugin and get it working.
* System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page") * System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
== Changelog == == Changelog ==
= 1.3.3 - 2020-02-20 =
* Added - Required login to show Author box
* Added - Search field settings.
= 1.3.2 - 2020-02-15 = = 1.3.2 - 2020-02-15 =
* Fixes - Hotfix single property settings. * Fixes - Hotfix single property settings.

View File

@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) {
global $post, $property; global $post, $property;
if ( opalestate_get_option( 'enable_single_author_box' , 'on') != 'on' ) { if ( opalestate_get_option( 'enable_single_author_box', 'on' ) != 'on' ) {
return; return;
} }
@ -52,12 +52,21 @@ switch ( $type ) {
} }
?> ?>
<div class="opalestate-box-content property-agent-section property-author-v2"> <?php if ( opalestate_is_require_login_to_show_author_box() ) : ?>
<div class="opalestate-box"> <div class="opalestate-box-content property-agent-section property-author-v2">
<div class="author-content-box"> <div class="opalestate-box">
<div class="property-agent-info"> <div class="author-content-box">
<?php echo wp_kses_post( $author_info ); ?> <div class="property-agent-info">
<?php echo wp_kses_post( $author_info ); ?>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> <?php else : ?>
<div class="opalestate-require-login-box">
<p class="opalestate-require-login-notice"><?php esc_html_e( 'You need to login to see host information.', 'opalestate-pro' ); ?></p>
<a href="#opalestate-user-form-popup" class="opalestate-need-login button btn btn-primary btn-3d">
<?php esc_html_e( 'Login', 'opalestate-pro' ) ?>
</a>
</div>
<?php endif; ?>

View File

@ -46,12 +46,21 @@ switch ( $type ) {
?> ?>
<div class="opalestate-box-content property-agent-section property-author-v3"> <div class="opalestate-box-content property-agent-section property-author-v3">
<div class="opalestate-box"> <div class="opalestate-box">
<?php if ( opalestate_get_option( 'enable_single_author_box' , 'on' ) == 'on' ) : ?> <?php if ( opalestate_get_option( 'enable_single_author_box', 'on' ) == 'on' ) : ?>
<div class="author-content-box"> <?php if ( opalestate_is_require_login_to_show_author_box() ) : ?>
<div class="property-agent-info"> <div class="author-content-box">
<?php echo wp_kses_post( $author_info ); ?> <div class="property-agent-info">
<?php echo wp_kses_post( $author_info ); ?>
</div>
</div> </div>
</div> <?php else : ?>
<div class="opalestate-require-login-box">
<p class="opalestate-require-login-notice"><?php esc_html_e( 'You need to login to see host information.', 'opalestate-pro' ); ?></p>
<a href="#opalestate-user-form-popup" class="opalestate-need-login button btn btn-primary btn-3d">
<?php esc_html_e( 'Login', 'opalestate-pro' ) ?>
</a>
</div>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php if ( opalestate_get_option( 'enable_single_enquire_form', 'on' ) == 'on' ) : ?> <?php if ( opalestate_get_option( 'enable_single_enquire_form', 'on' ) == 'on' ) : ?>

View File

@ -49,14 +49,23 @@ switch ( $type ) {
<div class="author-content-box"> <div class="author-content-box">
<div class="opal-row"> <div class="opal-row">
<?php if ( opalestate_get_option( 'enable_single_author_box', 'on' ) == 'on' ) : ?> <?php if ( opalestate_get_option( 'enable_single_author_box', 'on' ) == 'on' ) : ?>
<div class="col-lg-6 col-md-6"> <?php if ( opalestate_is_require_login_to_show_author_box() ) : ?>
<div class="property-agent-info"> <div class="col-lg-6 col-md-6">
<?php echo wp_kses_post( $author_info ); ?> <div class="property-agent-info">
<?php echo wp_kses_post( $author_info ); ?>
</div>
</div> </div>
</div> <?php else : ?>
<div class="opalestate-require-login-box">
<p class="opalestate-require-login-notice"><?php esc_html_e( 'You need to login to see host information.', 'opalestate-pro' ); ?></p>
<a href="#opalestate-user-form-popup" class="opalestate-need-login button btn btn-primary btn-3d">
<?php esc_html_e( 'Login', 'opalestate-pro' ) ?>
</a>
</div>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php if ( opalestate_get_option( 'enable_single_enquire_form' , 'on' ) == 'on' ) : ?> <?php if ( opalestate_get_option( 'enable_single_enquire_form', 'on' ) == 'on' ) : ?>
<div class="col-lg-6 col-md-6"> <div class="col-lg-6 col-md-6">
<?php echo opalestate_load_template_path( 'messages/enquiry-form', [ 'nowrap' => true ] ); ?> <?php echo opalestate_load_template_path( 'messages/enquiry-form', [ 'nowrap' => true ] ); ?>
</div> </div>