Merge branch 'master' of https://github.com/wpopal/opal-estate-pro
This commit is contained in:
commit
20f2dfaee0
@ -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 ) ) );
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ $property = opalesetate_property( get_the_ID() );
|
||||
</div>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<?php opalestate_get_single_short_meta(); ?>
|
||||
<?php opalestate_get_loop_short_meta(); ?>
|
||||
<div class="property-meta-bottom">
|
||||
<?php opalestate_property_loop_price(); ?>
|
||||
</div>
|
||||
|
@ -36,7 +36,7 @@ $property = opalesetate_property( get_the_ID() );
|
||||
<?php opalestate_get_loop_thumbnail( opalestate_get_option( 'loop_image_size', 'large' ) ); ?>
|
||||
</header>
|
||||
|
||||
<?php opalestate_get_single_short_meta(); ?>
|
||||
<?php opalestate_get_loop_short_meta(); ?>
|
||||
|
||||
<div class="entry-content-bottom clearfix">
|
||||
<div class="property-meta-bottom">
|
||||
|
@ -51,7 +51,7 @@ global $property, $post;
|
||||
<?php opalestate_property_loop_price(); ?>
|
||||
|
||||
</div><!-- .entry-content -->
|
||||
<?php opalestate_get_single_short_meta(); ?>
|
||||
<?php opalestate_get_loop_short_meta(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -18,7 +18,8 @@ if ( empty( $meta_content ) ) {
|
||||
<?php foreach ( $meta as $key => $info ) : ?>
|
||||
<?php if ( trim( $info['value'] ) ) : ?>
|
||||
<li class="property-label-<?php echo esc_attr( $key ); ?>" title="<?php echo esc_attr( $info['label'] ); ?>">
|
||||
<span class="hint--top" aria-label="<?php echo esc_attr( $info['label'] ); ?>" title="<?php echo esc_attr( $info['label'] ); ?>"><i class="icon-property-<?php echo esc_attr( $key ); ?>"></i></span>
|
||||
<span class="hint--top" aria-label="<?php echo esc_attr( $info['label'] ); ?>" title="<?php echo esc_attr( $info['label'] ); ?>">
|
||||
<i class="<?php echo opalestate_get_property_meta_icon( $key ); ?>"></i></span>
|
||||
<span class="label-property"><?php echo esc_html( $info['label'] ); ?></span>
|
||||
<span class="label-content"><?php echo apply_filters( 'opalestate-pro' . $key . '_unit_format', trim( $info['value'] ) ); ?></span>
|
||||
</li>
|
||||
|
@ -23,6 +23,7 @@ if ( ! $infos && ! $taxs ) {
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $infos ): ?>
|
||||
<?php foreach ( $infos as $key => $info ) : ?>
|
||||
<?php if ( $info['value'] ) : ?>
|
||||
|
Loading…
Reference in New Issue
Block a user