Update icons.

This commit is contained in:
Hoang Huu
2019-09-28 13:16:33 +07:00
parent 2195d7e04f
commit 0d7e293a00
3 changed files with 54 additions and 1 deletions

View File

@@ -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 ) ) );
}