Origin commit
This commit is contained in:
33
templates/parts/property-loop-short-meta.php
Executable file
33
templates/parts/property-loop-short-meta.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Short meta HTML.
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
global $property;
|
||||
|
||||
$meta_content = apply_filters( 'opalestate_loop_meta_info', '' );
|
||||
if ( empty( $meta_content ) ) {
|
||||
$meta = $property->get_meta_shortinfo();
|
||||
?>
|
||||
<div class="property-meta">
|
||||
<ul class="property-meta-list list-inline">
|
||||
<?php if ( $meta ) : ?>
|
||||
<?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="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>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo wp_kses_post( $meta_content );
|
||||
}
|
||||
Reference in New Issue
Block a user