Origin commit
This commit is contained in:
14
templates/user/favorite-button.php
Executable file
14
templates/user/favorite-button.php
Executable file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if( $existed != false || $existed != '' ) {
|
||||
$fav_class = 'fa fa-heart';
|
||||
} else {
|
||||
$fav_class = 'fa fa-heart-o';
|
||||
}
|
||||
$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>
|
||||
Reference in New Issue
Block a user