From 2195d7e04f02cc91c14b9d45a24a84dc1688dcf0 Mon Sep 17 00:00:00 2001 From: Hoang Huu Date: Sat, 28 Sep 2019 11:09:04 +0700 Subject: [PATCH 1/2] Update templates. --- templates/content-property-featured-v1.php | 2 +- templates/content-property-grid-v2.php | 2 +- templates/content-property-list.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/content-property-featured-v1.php b/templates/content-property-featured-v1.php index 88a3c40d..3636a41e 100755 --- a/templates/content-property-featured-v1.php +++ b/templates/content-property-featured-v1.php @@ -34,7 +34,7 @@ $property = opalesetate_property( get_the_ID() ); - +
diff --git a/templates/content-property-grid-v2.php b/templates/content-property-grid-v2.php index de650d45..70315a56 100755 --- a/templates/content-property-grid-v2.php +++ b/templates/content-property-grid-v2.php @@ -36,7 +36,7 @@ $property = opalesetate_property( get_the_ID() ); - +
diff --git a/templates/content-property-list.php b/templates/content-property-list.php index ec1943dc..2ea2502c 100755 --- a/templates/content-property-list.php +++ b/templates/content-property-list.php @@ -51,7 +51,7 @@ global $property, $post;
- +
From 0d7e293a00e9303218181d718949815001cd3ef0 Mon Sep 17 00:00:00 2001 From: Hoang Huu Date: Sat, 28 Sep 2019 13:16:33 +0700 Subject: [PATCH 2/2] Update icons. --- inc/mixes-functions.php | 51 ++++++++++++++++++++ templates/parts/property-loop-short-meta.php | 3 +- templates/single-property/information.php | 1 + 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/inc/mixes-functions.php b/inc/mixes-functions.php index 01f03a06..9ab4d13a 100755 --- a/inc/mixes-functions.php +++ b/inc/mixes-functions.php @@ -1162,3 +1162,54 @@ function opalestate_get_property_statuses() { 'expired' => esc_html__( 'Expired', 'opalestate-pro' ), ] ); } + +/** + * Returns property meta icon classes. + * + * @param $key + */ +function opalestate_get_property_meta_icon( $key ) { + $classes = []; + $classes[] = 'icon-property-' . esc_attr( $key ); + $prefix = 'fa'; + $classes[] = $prefix; + switch ( $key ) { + case 'builtyear': + $icon = $prefix . '-' . 'bedrooms'; + break; + case 'parking': + $icon = $prefix . '-' . 'bedrooms'; + break; + case 'bedrooms': + $icon = $prefix . '-' . 'bedrooms'; + break; + case 'bathrooms': + $icon = $prefix . '-' . 'bath'; + break; + case 'plotsize': + $icon = $prefix . '-' . 'bath'; + break; + case 'areasize': + $icon = $prefix . '-' . 'bath'; + break; + case 'orientation': + $icon = $prefix . '-' . 'bath'; + break; + case 'livingrooms': + $icon = $prefix . '-' . 'bath'; + break; + case 'kitchens': + $icon = $prefix . '-' . 'bath'; + break; + case 'amountrooms': + $icon = $prefix . '-' . 'bath'; + break; + default: + $icon = $key; + break; + } + + $classes[] = apply_filters( 'opalestate_property_meta_icon', $icon, $key ); + + return esc_attr( implode( ' ', array_map( 'sanitize_html_class', $classes ) ) ); +} diff --git a/templates/parts/property-loop-short-meta.php b/templates/parts/property-loop-short-meta.php index 7180e27f..0773c720 100755 --- a/templates/parts/property-loop-short-meta.php +++ b/templates/parts/property-loop-short-meta.php @@ -18,7 +18,8 @@ if ( empty( $meta_content ) ) { $info ) : ?>
  • - + +
  • diff --git a/templates/single-property/information.php b/templates/single-property/information.php index 8237bc73..0f5a2a96 100755 --- a/templates/single-property/information.php +++ b/templates/single-property/information.php @@ -23,6 +23,7 @@ if ( ! $infos && ! $taxs ) { + $info ) : ?>