?>
</li>
				<li class="single-contact-phone"><?php 
echo __('Phone', 'javo_fr') . ': ' . $javo_directory_query->get('phone');
?>
</li>
				<li class="single-contact-email"><?php 
echo __('Email', 'javo_fr') . ': ' . $javo_directory_query->get('email');
?>
</li>
				<li class="single-contact-website"><?php 
echo __('Website', 'javo_fr') . ': ' . $javo_directory_query->get('website');
?>
</li>
				<li class="single-contact-category"><?php 
echo __('Category', 'javo_fr') . ': ' . $javo_directory_query->cat('item_category');
?>
</li>
				<li class="single-contact-location"><?php 
echo __('Location	', 'javo_fr') . ': ' . $javo_directory_query->cat('item_location');
?>
</li>
				<li class="single-contact-tag"><?php 
echo __('Tag', 'javo_fr') . ': ' . $javo_directory_query->tag('string');
?>
</li>
			</ul>
		</div>
	</div> <!-- col-md-6 -->
	<div class="col-md-6 javo-animation x2 javo-right-to-left-100">
		<div class="single-item-detail-right">
Example #2
0
        ?>
</a>
								</div> <!-- des -->

								<div class="pics">
									<div class="thumb">
										<a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_post_thumbnail('javo-map-thumbnail');
        ?>
</a>
									</div> <!-- thumb -->
									<div class="img-in-text"><?php 
        echo $javo_meta_query->cat('item_category', __('No Category', 'javo_fr'));
        ?>
</div>
									<div class="javo-left-overlay">
										<div class="javo-txt-meta-area"><?php 
        echo $javo_meta_query->cat('item_location', __('No Location', 'javo_fr'));
        ?>
</div>
										<div class="corner-wrap">
											<div class="corner"></div>
											<div class="corner-background"></div>
										</div> <!-- corner-wrap -->
									</div> <!-- javo-left-overlay -->
								</div> <!-- pic -->
							</div> <!-- javo_somw_info -->
						</script>
 public static function map_list()
 {
     global $javo_tso, $javo_favorite;
     $post_ids = isset($_POST['post_ids']) ? $_POST['post_ids'] : array();
     $javo_result = array();
     foreach ($post_ids as $post_id) {
         if (null !== ($post = get_post($post_id))) {
             // Get Strings
             $javo_meta_query = new javo_get_meta($post->ID);
             // Get Ratings
             $javo_rating = new javo_RATING($post->ID);
             $javo_author = get_userdata($post->post_author);
             $javo_author_name = isset($javo_author->display_name) ? $javo_author->display_name : null;
             $javo_has_author = isset($post->post_author);
             $javo_this_thumb = '';
             if ('' !== ($javo_this_thumb_id = get_post_thumbnail_id($post->ID))) {
                 $javo_this_thumb_url = wp_get_attachment_image_src($javo_this_thumb_id, 'javo-box-v');
                 if (isset($javo_this_thumb_url)) {
                     $javo_this_thumb = $javo_this_thumb_url[0];
                 }
             }
             // If not found this post a thaumbnail
             if (empty($javo_this_thumb)) {
                 $javo_this_thumb = $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png');
             }
             $javo_this_thumb_large = "<div class=\"javo-thb\" style=\"background-image:url({$javo_this_thumb});\"></div>";
             // Other Informations
             $javo_result[] = array('post_id' => $post->ID, 'post_title' => $post->post_title, 'post_content' => $post->post_content, 'post_date' => $post->post_date, 'excerpt' => $post->post_excerpt, 'thumbnail_large' => $javo_this_thumb_large, 'thumbnail_url' => $javo_this_thumb, 'permalink' => get_permalink($post->ID), 'rating' => $javo_rating->parent_rating_average, 'favorite' => $javo_favorite->on($post->ID, ' saved'), 'category' => $javo_meta_query->cat('item_category', __('No Category', 'javo_fr')), 'location' => $javo_meta_query->cat('item_location', __('No Location', 'javo_fr')), 'author_name' => $javo_author_name, 'f' => get_post_meta($post->ID, 'javo_this_featured_item', true));
         }
         // End If
     }
     // End foreach
     die(json_encode($javo_result));
 }
if ('' !== ($tmp = get_post_meta(get_the_ID(), "jv_item_address", true))) {
    printf('<li class="single-contact-address"><span>%s</span>%s</li>', __("Address", 'javo_fr'), $tmp);
}
if ('' !== ($tmp = get_post_meta(get_the_ID(), "jv_item_phone", true))) {
    printf('<li class="single-contact-address"><span>%s</span>%s</li>', __("Phone", 'javo_fr'), $tmp);
}
if ('' !== ($tmp = get_post_meta(get_the_ID(), "jv_item_email", true))) {
    printf('<li class="single-contact-address"><span>%s</span><a href="mailto:%s" target="_self">%s</a></li>', __("E-mail", 'javo_fr'), $tmp, $tmp);
}
if ('' !== ($tmp = get_post_meta(get_the_ID(), "jv_item_website", true))) {
    printf('<li class="single-contact-address"><span>%s</span><a href="%s" target="_self">%s</a></li>', __("Website", 'javo_fr'), $tmp, $tmp);
}
?>

						<li class="single-contact-category"><span><?php 
echo __('Category', 'javo_fr') . '</span> ' . $javo_directory_query->cat('item_category', __('No Category', 'javo_fr'), false, false);
?>
</li>
						<li class="single-contact-location"><span><?php 
echo __('Location', 'javo_fr') . '</span> ' . $javo_directory_query->cat('item_location');
?>
</li>
						<?php 
if (false != ($javo_tags = $javo_directory_query->Tag('string'))) {
    ?>
							<li class="single-contact-tag"><span><?php 
    echo __('Tag', 'javo_fr') . '</span> ' . $javo_tags;
    ?>
</li>
						<?php 
}
 static function javo_map_callback()
 {
     // Get Theme Settings
     global $javo_tso, $javo_tso_map, $javo_favorite;
     // Get Parameter of Queries
     $javo_query = new javo_array($_POST);
     // Setup Agrumnets
     $javo_this_posts_args = array('post_status' => 'publish', 'post_type' => $javo_query->get('post_type', 'post'), 'posts_per_page' => $javo_query->get('ppp', 10), 'paged' => (int) $javo_query->get('current', 1), 'order' => $javo_query->get('order', 'DESC'));
     // WPML
     if ($javo_query->get('lang', null) != null) {
         global $sitepress;
         if (!empty($sitepress)) {
             $sitepress->switch_lang($javo_query->get('lang'), true);
         }
     }
     // Apply Filter
     if ($javo_query->get('filter', null) != null) {
         if (is_Array($javo_query->get('filter'))) {
             foreach ($javo_query->get('filter') as $taxonomy => $terms) {
                 if (!empty($terms)) {
                     $javo_this_posts_args['tax_query']['relation'] = 'AND';
                     $javo_this_posts_args['tax_query'][] = array('taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => $terms);
                 }
             }
         }
     }
     // Set Keyword
     if ($javo_query->get('keyword', null) != null) {
         $javo_this_posts_args['s'] = $javo_query->get('keyword');
     }
     switch ($javo_query->get('panel', 'list')) {
         case 'featured':
             $javo_this_posts_args['meta_query']['relation'] = 'AND';
             $javo_this_posts_args['meta_query'][] = array('key' => 'javo_this_featured_item', 'compare' => '=', 'value' => 'use');
             break;
         case 'favorite':
             $javo_this_posts_args = array('post_type' => $javo_query->get('post_type', 'post'));
             $javo_this_user_favorite = (array) get_user_meta(get_current_user_id(), 'favorites', true);
             $javo_this_user_favorite_posts = array('0');
             if (!empty($javo_this_user_favorite)) {
                 foreach ($javo_this_user_favorite as $favorite) {
                     if (!empty($favorite['post_id'])) {
                         $javo_this_user_favorite_posts[] = $favorite['post_id'];
                     }
                 }
                 // End foreach
             }
             // End if
             $javo_this_posts_args['post__in'] = (array) $javo_this_user_favorite_posts;
             break;
         case 'list':
         default:
     }
     // Set Read More
     if ($javo_query->get('offset', null) != null) {
         $javo_this_posts_args['offset'] = $javo_query->get('offset');
     }
     // Return Variables
     $javo_this_return = array();
     // Queries Loop
     $javo_this_posts = new WP_Query($javo_this_posts_args);
     if ($javo_this_posts->have_posts()) {
         while ($javo_this_posts->have_posts()) {
             $javo_this_posts->the_post();
             $javo_meta_query = new javo_get_meta(get_the_ID());
             $javo_rating = new javo_RATING(get_the_ID());
             $javo_latlng = @unserialize($javo_meta_query->_get('latlng', array()));
             $javo_latlng = new javo_ARRAY($javo_latlng);
             $javo_set_icon = '';
             $javo_marker_term_id = wp_get_post_terms(get_the_ID(), 'item_category');
             if (!empty($javo_marker_term_id)) {
                 $javo_set_icon = get_option('javo_item_category_' . $javo_marker_term_id[0]->term_id . '_marker', '');
                 if ($javo_set_icon == '') {
                     $javo_set_icon = $javo_tso->get('map_marker', '');
                 }
             }
             $javo_this_thumbnail = get_the_post_thumbnail(get_the_ID(), array(50, 50));
             $javo_this_thumbnail = $javo_this_thumbnail != '' ? $javo_this_thumbnail : sprintf('<img src="%s" class="img-responsive wp-post-image" style="width:50px; height:50px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png'));
             $javo_this_thumbnail_large = get_the_post_thumbnail(get_the_ID(), 'javo-box-v', array('class' => 'group list-group-image item-thumbs'));
             $javo_this_thumbnail_large = $javo_this_thumbnail_large != '' ? $javo_this_thumbnail_large : sprintf('<img src="%s" style="width:100%%; height:219px;">', $javo_tso->get('no_image', JAVO_IMG_DIR . '/no-image.png'));
             $javo_this_author_avatar_id = get_the_author_meta('avatar');
             $javo_this_author_avatar = wp_get_attachment_image($javo_this_author_avatar_id, 'javo-tiny', true, array('class' => 'img-circle', 'style' => 'width:50px; height:50px;'));
             $javo_this_return[get_the_ID()] = array('post_title' => get_the_title(), 'contents' => javo_str_cut(strip_shortcodes(get_the_excerpt()), 300), 'thumbnail' => $javo_this_thumbnail, 'thumbnail_large' => $javo_this_thumbnail_large, 'avatar' => $javo_this_author_avatar, 'author_name' => get_the_author_meta('display_name'), 'permalink' => get_permalink(), 'category' => $javo_meta_query->cat('item_category', __('No Category', 'javo_fr')), 'location' => $javo_meta_query->cat('item_location', __('No Location', 'javo_fr')), 'favorite' => $javo_favorite->on(get_the_ID(), ' saved'), 'lat' => $javo_latlng->get('lat'), 'lng' => $javo_latlng->get('lng'), 'icon' => $javo_set_icon, 'phone' => $javo_meta_query->get('phone'), 'mobile' => $javo_meta_query->get('mobile'), 'website' => $javo_meta_query->get('website'), 'email' => $javo_meta_query->get('email'), 'address' => $javo_meta_query->get('address'), 'rating' => $javo_rating->parent_rating_average, 'rating_count' => $javo_meta_query->get_child_count('ratings'), 'review_count' => $javo_meta_query->get_child_count('review'));
         }
     }
     wp_reset_query();
     $javo_this_pagination = '';
     if ($javo_query->get('pagination') == 'read_more') {
         $javo_this_pagination = sprintf('<a class="btn btn-primary btn-block javo-wide-map-read-more">%s</a>', __('Read More', 'javo_fr'));
     } else {
         $javo_this_pagination = sprintf('<div class="javo_pagination">%s</div>', paginate_links(array('base' => "%_%", 'format' => '?%#%', 'current' => (int) $javo_query->get('current', 1), 'total' => $javo_this_posts->max_num_pages)));
     }
     echo json_encode(array('state' => 'success', 'result' => $javo_this_return, 'pagination' => $javo_this_pagination));
     exit;
 }
Example #6
0
<?php

global $javo_custom_field, $post, $javo_tso, $javo_video_query, $javo_favorite;
$javo_this_author = get_userdata($post->post_author);
$javo_this_author_avatar_id = get_the_author_meta('avatar');
$javo_directory_query = new javo_get_meta(get_the_ID());
$javo_rating = new javo_Rating(get_the_ID());
$javo_this_item_tab_slide_type = 'type2';
$javo_detail_item_values = array('jv_item_address' => array('label' => __("Address", 'javo_fr'), 'value' => get_post_meta(get_the_ID(), 'jv_item_address', true), 'class' => 'single-contact-address'), 'jv_item_phone' => array('label' => __("Phone", 'javo_fr'), 'value' => get_post_meta(get_the_ID(), 'jv_item_phone', true), 'class' => 'single-contact-phone', 'href' => sprintf("tel:%s", get_post_meta(get_the_ID(), 'jv_item_phone', true))), 'jv_item_email' => array('label' => __("E-mail", 'javo_fr'), 'value' => get_post_meta(get_the_ID(), 'jv_item_email', true), 'class' => 'single-contact-email', 'href' => sprintf("mailto:%s", get_post_meta(get_the_ID(), 'jv_item_email', true))), 'jv_item_website' => array('label' => __("Website", 'javo_fr'), 'value' => get_post_meta(get_the_ID(), 'jv_item_website', true), 'class' => 'single-contact-website', 'href' => get_post_meta(get_the_ID(), 'jv_item_website', true)), 'item_category' => array('label' => __("Category", 'javo_fr'), 'value' => $javo_directory_query->cat('item_category', __('No Category', 'javo_fr'), false, false), 'class' => 'single-contact-category'), 'item_location' => array('label' => __("Location", 'javo_fr'), 'value' => $javo_directory_query->cat('item_location', __('No Location', 'javo_fr'), false, false), 'class' => 'single-contact-location'), 'item_tags' => array('label' => __("Tags", 'javo_fr'), 'value' => $javo_directory_query->Tag('string'), 'class' => 'single-contact-tag'));
$javo_detail_item_metas = apply_filters('javo_single_detail_item_args', $javo_detail_item_values, get_the_ID(), $javo_directory_query);
?>

<!-- slide -->
	<div class="row">
		<div class="col-md-12">
			<?php 
get_template_part('templates/parts/part', 'single-detail-tab-sliders');
?>
		</div> <!-- col-md-12 -->
	</div> <!-- row -->

	<div class="single-sns-wrap-div <?php 
if ($javo_tso->get('claim_use') == 'use') {
    echo 'before-claim';
}
?>
">
		<span class="javo-archive-sns-wrap social-wrap pull-right">
			<i class="sns-facebook" data-title="<?php 
the_title();
?>
Example #7
0
// Queries Loop
$javo_this_posts = get_posts($javo_this_posts_args);
foreach ($javo_this_posts as $post) {
    setup_postdata($post);
    $javo_meta_query = new javo_get_meta($post->ID);
    $javo_latlng = @unserialize($javo_meta_query->_get('latlng', array()));
    $javo_latlng = new javo_ARRAY($javo_latlng);
    $javo_set_icon = '';
    $javo_marker_term_id = wp_get_post_terms($post->ID, 'item_category');
    if (!empty($javo_marker_term_id)) {
        $javo_set_icon = get_option('javo_item_category_' . $javo_marker_term_id[0]->term_id . '_marker', '');
        if ($javo_set_icon == '') {
            $javo_set_icon = $javo_tso->get('map_marker', '');
        }
    }
    $javo_this_return[$post->ID] = array('post_title' => $post->post_title, 'contents' => javo_str_cut($post->content, 300), 'thumbnail' => get_the_post_thumbnail($post->ID, array(50, 50)), 'permalink' => get_permalink($post->ID), 'category' => $javo_meta_query->cat('item_category', __('No Category', 'javo_fr')), 'location' => $javo_meta_query->cat('item_location', __('No Location', 'javo_fr')), 'lat' => $javo_latlng->get('lat'), 'lng' => $javo_latlng->get('lng'), 'icon' => $javo_set_icon, 'phone' => $javo_meta_query->get('phone'), 'address' => $javo_meta_query->get('address'), 'mobile' => $javo_meta_query->get('mobile'), 'website' => $javo_meta_query->get('website'), 'email' => $javo_meta_query->get('email'), 'rating' => $javo_meta_query->get_child_count('ratings'), 'review' => $javo_meta_query->get_child_count('review'));
}
wp_reset_postdata();
?>

<!-- Javo Map Options -->
<fieldset class="hidden">
	<input type="hidden" javo-map-distance-unit value="<?php 
echo $javo_tso_map->get('distance_unit', __('km', 'javo_fr'));
?>
">
	<input type="hidden" javo-map-distance-max value="<?php 
echo (double) $javo_tso_map->get('distance_max', '500');
?>
">
	<input type="hidden" javo-map-read-more value="<?php