Update search form

This commit is contained in:
Hoang Huu
2019-09-17 10:01:35 +07:00
parent d8e95a1dc5
commit f872b4f79a
6 changed files with 131 additions and 23 deletions

View File

@@ -139,19 +139,20 @@ function is_single_agency() {
*/
function opalestate_search_properties_form_styles() {
return apply_filters( 'opalestate_search_properties_form_styles', [
'search-form-h' => esc_html__( 'Advanced V1 Form', 'opalestate-pro' ),
'advanced-v2' => esc_html__( 'Advanced V2 Form', 'opalestate-pro' ),
'advanced-v3' => esc_html__( 'Advanced V3 Form', 'opalestate-pro' ),
'advanced-v4' => esc_html__( 'Advanced V4 Form', 'opalestate-pro' ),
'advanced-v5' => esc_html__( 'Advanced V5 Form', 'opalestate-pro' ),
'advanced-v6' => esc_html__( 'Advanced V6 Form', 'opalestate-pro' ),
'search-form-v' => esc_html__( 'Vertical Advanced Form', 'opalestate-pro' ),
'search-form-v2' => esc_html__( 'Vertical Advanced V2 Form', 'opalestate-pro' ),
'search-form-v3' => esc_html__( 'Vertical Advanced V3 Form', 'opalestate-pro' ),
'simple-city' => esc_html__( 'Simple City Form', 'opalestate-pro' ),
'simple-keyword' => esc_html__( 'Simple Keyword Form', 'opalestate-pro' ),
'collapse-city' => esc_html__( 'Collapse City Form', 'opalestate-pro' ),
'collapse-keyword' => esc_html__( 'Collapse Keyword Form', 'opalestate-pro' ),
'search-form-h' => esc_html__( 'Advanced V1', 'opalestate-pro' ),
'advanced-v2' => esc_html__( 'Advanced V2', 'opalestate-pro' ),
'advanced-v3' => esc_html__( 'Advanced V3', 'opalestate-pro' ),
'advanced-v4' => esc_html__( 'Advanced V4', 'opalestate-pro' ),
'advanced-v5' => esc_html__( 'Advanced V5', 'opalestate-pro' ),
'advanced-v6' => esc_html__( 'Advanced V6', 'opalestate-pro' ),
'search-form-v' => esc_html__( 'Vertical Advanced', 'opalestate-pro' ),
'search-form-v2' => esc_html__( 'Vertical Advanced V2', 'opalestate-pro' ),
'search-form-v3' => esc_html__( 'Vertical Advanced V3', 'opalestate-pro' ),
'simple-city' => esc_html__( 'Simple City', 'opalestate-pro' ),
'simple-keyword' => esc_html__( 'Simple Keyword', 'opalestate-pro' ),
'collapse-city' => esc_html__( 'Collapse City', 'opalestate-pro' ),
'collapse-keyword' => esc_html__( 'Collapse Keyword', 'opalestate-pro' ),
'collapse-advanced' => esc_html__( 'Collapse Advanced', 'opalestate-pro' ),
] );
}
@@ -513,7 +514,7 @@ function opalestate_get_image_placeholder( $size = '', $url = false ) {
}
function opalestate_get_image_placeholder_src() {
return OPALESTATE_PLUGIN_URL . 'assets/images/placeholder.png';
return OPALESTATE_PLUGIN_URL . 'assets/images/placeholder.png';
}
/**

View File

@@ -94,23 +94,32 @@ class Opalestate_Taxonomy_Categories {
}
public static function dropdown_list( $selected = 0 ) {
$id = "opalestate_category" . rand();
$id = 'property_category' . rand();
$args = [
'show_option_none' => esc_html__( 'Select category', 'opalestate-pro' ),
'show_option_none' => esc_html__( 'Select Category', 'opalestate-pro' ),
'id' => $id,
'class' => 'form-control',
'show_count' => 0,
'hierarchical' => '',
'name' => 'label',
'value_field' => 'slug',
'name' => 'types',
'selected' => $selected,
'taxonomy' => 'opalestate_category',
'value_field' => 'slug',
'taxonomy' => 'property_category',
'echo' => 0,
];
return wp_dropdown_categories( $args );
$label = '<label class="opalestate-label opalestate-label--category" for="' . esc_attr( $id ) . '">' . esc_html__( 'Category', 'opalestate-pro' ) . '</label>';
echo $label . wp_dropdown_categories( $args );
}
public static function get_multi_check_list( $scategory ) {
$list = self::get_list();
echo opalestate_terms_multi_check( $list, $scategory );
}
}
Opalestate_Taxonomy_Categories::init();

View File

@@ -105,7 +105,7 @@ class Opalestate_Taxonomy_Type {
public static function dropdown_list( $selected = 0 ) {
$id = "opalestate_types" . rand();
$id = 'opalestate_types' . rand();
$args = [
'show_option_none' => esc_html__( 'Select Type', 'opalestate-pro' ),