Opal-Estate-Pro/templates/user/favorite-button.php

14 lines
573 B
PHP
Raw Permalink Normal View History

2019-09-10 06:27:33 +02:00
<?php
if( $existed != false || $existed != '' ) {
2019-09-28 09:04:11 +02:00
$fav_class = 'fas fa-heart';
2019-09-10 06:27:33 +02:00
} else {
2019-09-28 09:04:11 +02:00
$fav_class = 'far fa-heart';
2019-09-10 06:27:33 +02:00
}
$need_login = '';
if( !is_user_logged_in() ){
$need_login .= ' opalestate-need-login';
}
?>
<span class="property-toggle-favorite <?php echo esc_attr( $need_login ); ?> hint--top" aria-label="<?php esc_html_e('Add To Favorite', 'opalestate-pro'); ?>" data-property-id="<?php echo intval( $property_id ); ?>" title="<?php esc_html_e('Add To Favorite', 'opalestate-pro'); ?>">
<span class="<?php echo esc_attr( $fav_class ); ?>"></span>
</span>