diff --git a/inc/api/v1/property.php b/inc/api/v1/property.php index 3fdc07f9..c16a42d9 100644 --- a/inc/api/v1/property.php +++ b/inc/api/v1/property.php @@ -263,7 +263,7 @@ class Opalestate_Property_Api extends Opalestate_Base_API { $search_min_area = isset( $request['min_area'] ) ? sanitize_text_field( $request['min_area'] ) : ''; $search_max_area = isset( $request['max_area'] ) ? sanitize_text_field( $request['max_area'] ) : ''; $s = isset( $request['search_text'] ) ? sanitize_text_field( $request['search_text'] ) : null; - $per_page = isset( $request['per_page'] ) && $request['per_page'] ? $request['per_page'] : 5; + $per_page = isset( $request['per_page'] ) && $request['per_page'] ? $request['per_page'] : opalestate_options( 'search_property_per_page', 5 ); $paged = isset( $request['page'] ) && $request['page'] ? $request['page'] : 1; if ( isset( $request['paged'] ) && intval( $request['paged'] ) > 0 ) { diff --git a/inc/mixes-functions.php b/inc/mixes-functions.php index ad937892..a14cd8ce 100755 --- a/inc/mixes-functions.php +++ b/inc/mixes-functions.php @@ -1169,7 +1169,7 @@ function opalestate_get_property_statuses() { * @param $key */ function opalestate_get_property_meta_icon( $key ) { - $classes = ''; + $classes = ''; $classes .= 'icon-property-' . esc_attr( $key ); switch ( $key ) { @@ -1214,3 +1214,21 @@ function opalestate_get_property_meta_icon( $key ) { return $classes; } + +/** + * Is enable price field in the search forms? + * + * @return bool + */ +function opalestate_is_enable_price_field() { + return 'on' == opalestate_get_option( 'opalestate_ppt_price_opt', 'on' ); +} + +/** + * Is enable areasize field in the search forms? + * + * @return bool + */ +function opalestate_is_enable_areasize_field() { + return 'on' == opalestate_get_option( 'opalestate_ppt_areasize_opt', 'on' ); +} diff --git a/templates/search-box/advanced-v2.php b/templates/search-box/advanced-v2.php index 641a776c..32401168 100755 --- a/templates/search-box/advanced-v2.php +++ b/templates/search-box/advanced-v2.php @@ -62,13 +62,17 @@ $form_classes = [ -