<div class="favorite-and-print clearfix"> <?php if (is_user_logged_in()) { if (is_added_to_favorite(get_current_user_id(), get_the_ID())) { ?> <a id="add-to-favorite" class="add-to-fav added" href="#"><i class="fa fa-star"></i> <span><?php _e('Added to Favorites', 'inspiry'); ?> </span></a> <?php } else { ?> <a id="add-to-favorite" class="add-to-fav" href="#"><i class="fa fa-star-o"></i> <span><?php _e('Add to Favorites', 'inspiry'); ?> </span></a> <?php /* * Action hook * check inspiry_generate_favorite_data() in inc/util/real-estate-functions.php */ do_action('inspiry_add_to_favorites'); } } else { ?> <a class="add-to-fav" href="#login-modal" data-toggle="modal"><i class="fa fa-star-o"></i> <span><?php _e('Add to Favorites', 'inspiry'); ?> </span></a> <?php }
</div> <div class="span3 propertyprev"> <div class="property-meta clearfix"> <?php $url = get_permalink(); echo '<img class="parcode" src="https://chart.googleapis.com/chart?chs=100x100&cht=qr&chl=' . $url . '" />'; ?> <!-- Add to favorite --> <!-- <span class="add-to-fav"> <?php if (is_user_logged_in()) { $user_id = get_current_user_id(); $property_id = get_the_ID(); if (is_added_to_favorite($user_id, $property_id)) { ?> <div id="fav_output" class="show"><i class="fa fa-star dim"></i> <span id="fav_target" class="dim"><?php _e('يضاف إلى المفضلة', 'framework'); ?> </span></div> <?php } else { ?> <form action="<?php echo admin_url('admin-ajax.php'); ?> " method="post" id="add-to-favorite-form"> <input type="hidden" name="user_id" value="<?php echo $user_id; ?>