<?php 
echo wp_get_attachment_image($javo_this_author_avatar_id, 'thumbnail');
?>
	<p class="uppercase"><?php 
_e('By', 'javo_fr');
printf('%s %s', $javo_this_author->first_name, $javo_this_author->last_name);
?>
</p>
</div> <!-- item-author -->

<div class="row single-item-detail-box">
	<div class="col-md-6 javo-animation x2 javo-left-to-right-100">
		<div class="single-item-detail-left">
			<ul class="inner-items">
				<li class="single-contact-address"><?php 
echo __('Address', 'javo_fr') . ': ' . $javo_directory_query->get('address');
?>
</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 
Example #2
0
            $javo_this_posts_return[get_the_ID()]['icon'] = $javo_set_icon;
        }
        ?>
						<script type="text/template" id="javo_map_tmp_<?php 
        the_ID();
        ?>
">
							<div class="javo_somw_info panel">
								<div class="des">
									<h5><?php 
        echo javo_str_cut(get_the_title(), 30);
        ?>
</h5>
									<ul class="list-unstyled">
										<li><?php 
        echo $javo_meta_query->get('phone');
        ?>
</li>
										<li><?php 
        echo $javo_meta_query->get('mobile');
        ?>
</li>
										<li><?php 
        echo $javo_meta_query->get('website');
        ?>
</li>
										<li><?php 
        echo $javo_meta_query->get('email');
        ?>
</li>
									</ul>
Example #3
0
function javo_map_info_window_content_callback($post_id)
{
    // Map InfoWindow Contents Filter
    $javo_this_post = get_post($post_id);
    if ($javo_this_post == null) {
        return false;
    }
    $javo_meta_query = new javo_get_meta($post_id);
    $javo_this_author_avatar_id = get_the_author_meta('avatar');
    $javo_this_author_name = sprintf('%s %s', get_the_author_meta('first_name'), get_the_author_meta('last_name'));
    ob_start();
    ?>
	<div class="javo_somw_info panel" style="min-height:220px;">
		<div class="des">
			<ul class="list-unstyled">
				<li><div class="prp-meta"><h4><strong><?php 
    the_title();
    ?>
</h4></strong></div></li>
				<li><div class="prp-meta"><?php 
    echo $javo_meta_query->get('phone');
    ?>
</div></li>
				<li><div class="prp-meta"><?php 
    echo $javo_meta_query->get('mobile');
    ?>
</div></li>
				<li><div class="prp-meta"><?php 
    echo $javo_meta_query->get('website');
    ?>
</div></li>
				<li><div class="prp-meta"><?php 
    echo $javo_meta_query->get('address');
    ?>
<a href="<?php 
    the_permalink();
    ?>
#single-tab-location" class="btn btn-primary btn-get-direction btn-sm"><?php 
    _e("Get directions", "javo_fr");
    ?>
</a></div></li>
			</ul>
		</div> <!-- des -->

		<div class="pics">
			<div class="thumb">
				<a href="<?php 
    the_permalink();
    ?>
" target="_blank"><?php 
    the_post_thumbnail('javo-map-thumbnail');
    ?>
</a>
			</div> <!-- thumb -->
			<div class="img-in-text"><?php 
    echo javo_get_cat(get_the_ID(), 'item_category', __('No Category', 'javo_fr'));
    ?>
</div>
			<div class="javo-left-overlay">
				<div class="javo-txt-meta-area custom-bg-color-setting"><?php 
    echo javo_get_cat(get_the_ID(), 'item_location', __('No Location', 'javo_fr'));
    ?>
</div> <!-- javo-txt-meta-area -->

				<div class="corner-wrap">
					<div class="corner admin-color-setting"></div>
					<div class="corner-background admin-color-setting"></div>
				</div> <!-- corner-wrap -->
			</div> <!-- javo-left-overlay -->
		</div> <!-- pic -->

		<div class="row">
			<div class="col-md-12">
				<div class="btn-group btn-group-justified pull-right">
					<a class="btn btn-primary btn-sm" onclick="javo_map.brief_run(this);" data-id="<?php 
    echo get_the_ID();
    ?>
">
						<i class="fa fa-user"></i> <?php 
    _e("Brief", "javo_fr");
    ?>
					</a>
					<a href="<?php 
    the_permalink();
    ?>
" class="btn btn-primary btn-sm">
						<i class="fa fa-group"></i> <?php 
    _e("Detail", "javo_fr");
    ?>
					</a>
					<a href="javascript:" class="btn btn-primary btn-sm" onclick="javo_map.contact_run(this)" data-to="<?php 
    echo $javo_meta_query->get('email');
    ?>
" data-username="******">
						<i class="fa fa-envelope"></i> <?php 
    _e("Contact", "javo_fr");
    ?>
					</a>
				 </div><!-- btn-group -->
			</div> <!-- col-md-12 -->
		</div> <!-- row -->
	</div> <!-- javo_somw_info -->
	<?php 
    return ob_get_clean();
}
Example #4
0
		<div class="single-item-slider" style="background:url('<?php 
echo $large_image_url[0];
?>
') no-repeat center center fixed;  -webkit-background-size: cover;  -moz-background-size: cover; -o-background-size: cover; background-size: cover; background-attachment: fixed;">
			<header class="codrops-header-left">
				<h1><?php 
the_title();
?>
 <span><a href="#"><?php 
//the_excerpt();
?>
</a></span></h1>
				<nav class="javo-single-item-intro-nav">
					<?php 
if ($javo_directory_query->get('address') != null) {
    printf('<a href="#single-detail-section">%s</a>', $javo_directory_query->get('address'));
}
if ($javo_directory_query->get('phone') != null) {
    printf('<a href="#single-detail-section">%s</a>', $javo_directory_query->get('phone'));
}
if ($javo_directory_query->get_discount() != null) {
    printf('<a href="#single-events-section">%s</a>', $javo_directory_query->get_discount());
}
if (!empty($javo_directory_query->parent_rating_average)) {
    printf('<a href="#single-rating-section">%s / %s</a>', $javo_directory_query->parent_rating_average, 5);
}
?>
				</nav>
			</header>
			<div class="intro-btn-wrap">
 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
// 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 
				<div class="javo-left-overlay">
					<div class="javo-txt-meta-area admin-color-setting"><?php 
_e('Contact', 'javo_fr');
?>
</div> <!-- javo-txt-meta-area -->
					<div class="corner-wrap">
						<div class="corner admin-color-setting"></div>
						<div class="corner-background admin-color-setting"></div>
					</div> <!-- corner-wrap -->
				</div> <!-- javo-left-overlay -->

				<div class="inner-items">
					<ul>

						<?php 
if ($javo_directory_query->get('address', NULL) != NULL) {
    printf('<li class="single-contact-address"><span>%s</span>%s</li>', __('Address', 'javo_fr'), $javo_directory_query->get('address'));
}
if ($javo_directory_query->get('phone', NULL) != NULL) {
    printf('<li class="single-contact-phone"><span>%s</span>%s</li>', __('Phone', 'javo_fr'), $javo_directory_query->get('phone'));
}
if ($javo_directory_query->get('email', NULL) != NULL) {
    printf('<li class="single-contact-email"><span>%s</span><a href="mailto:%s" target="_self">%s</a></li>', __('Email', 'javo_fr'), $javo_directory_query->get('email', NULL), $javo_directory_query->get('email', NULL));
}
if ($javo_directory_query->get('website', NULL) != NULL) {
    printf('<li class="single-contact-website"><span>%s</span><a href="%s" target="_blank">%s</a></li>', __('Website', 'javo_fr'), strpos($javo_directory_query->get('website'), 'http://') !== false ? $javo_directory_query->get('website') : 'http://' . $javo_directory_query->get('website'), $javo_directory_query->get('website', NULL));
}
?>
						<li class="single-contact-category"><span><?php 
echo __('Category', 'javo_fr') . '</span> ' . $javo_directory_query->cat('item_category', __('No Category', 'javo_fr'), false, false);
?>
					</div>
					<div class="line-title-bigdots">
						<h2><span><?php 
_e("Features", "javo_fr");
?>
</span></h2>
					</div>
					<div class="form-group">
						<div class="col-md-6 col-sm-6 col-xs-6">
							<div class="input-group">
							  <span class="input-group-addon"><?php 
_e("Telephone", "javo_fr");
?>
</span>
								<input name="javo_meta[phone]" type="text" class="form-control" value="<?php 
echo isset($edit) ? $javo_meta->get('phone') : null;
?>
">
							</div> <!-- input-group -->
						</div>
						<div class="col-md-6 col-sm-6 col-xs-6">
							<div class="input-group">
							  <span class="input-group-addon"><?php 
_e("Address", "javo_fr");
?>
</span>
							<input name="javo_meta[address]" type="text" class="form-control" value="<?php 
echo isset($edit) ? $javo_meta->get('address') : null;
?>
">
							</div> <!-- input-group -->
Example #9
0
    public static function javo_item_option_box($post)
    {
        global $javo_tso;
        $javo_ts_map = new javo_ARRAY((array) $javo_tso->get('map', array()));
        $javo_meta = new javo_get_meta($post->ID);
        $javo_latLng = new javo_ARRAY(@unserialize($javo_meta->_get('latlng')));
        ob_start();
        ?>

		<table class="form-table">
			<tr>
				<th colspan="2"><?php 
        _e('Additional Item Information', 'javo_fr');
        ?>
</th>
			</tr>
			<tr>
				<th><?php 
        _e('Address', 'javo_fr');
        ?>
</th>
				<td><input name="javo_pt[meta][address]" value="<?php 
        echo $javo_meta->get('address');
        ?>
"></td>
			</tr>
			<tr>
				<th><?php 
        _e('Telephone', 'javo_fr');
        ?>
</th>
				<td><input name="javo_pt[meta][phone]" value="<?php 
        echo $javo_meta->get('phone');
        ?>
"></td>
			</tr>
			<tr>
				<th><?php 
        _e('Email Address', 'javo_fr');
        ?>
</th>
				<td><input name="javo_pt[meta][email]" value="<?php 
        echo $javo_meta->get('email');
        ?>
"></td>
			</tr>
			<tr>
				<th><?php 
        _e('Website Address', 'javo_fr');
        ?>
</th>
				<td><input name="javo_pt[meta][website]" value="<?php 
        echo $javo_meta->get('website');
        ?>
"></td>
			</tr>
			<tr>
				<th><?php 
        _e('Video', 'javo_fr');
        ?>
</th>
				<td>
					<?php 
        $javo_video_portals = array('youtube', 'vimeo', 'dailymotion', 'yahoo', 'bliptv', 'veoh', 'viddler');
        $javo_get_video_meta = (array) get_post_meta($post->ID, 'video', true);
        $javo_video_meta = new javo_ARRAY($javo_get_video_meta);
        $javo_get_video = array("portal" => $javo_video_meta->get('portal', NULL), "video_id" => $javo_video_meta->get('video_id', NULL));
        $javo_this_selbox_options = array(__('With slider (first)', 'javo_fr') => 'slide', __('Header ( only "Youtube", "vimeo")', 'javo_fr') => 'header', __('After Description Section', 'javo_fr') => 'descript', __('After Contact Section', 'javo_fr') => 'contact', __('Hide / Disable', 'javo_fr') => 'disabled');
        ?>

					<select name="javo_video[portal]">
					<option value=""><?php 
        _e('None', 'javo_fr');
        ?>
</option>
					<?php 
        foreach ($javo_video_portals as $portal) {
            printf('<option value="%s"%s>%s</option>', $portal, $portal == $javo_get_video['portal'] ? ' selected' : '', $portal);
        }
        ?>
					</select>
					<input name="javo_video[video_id]" value="<?php 
        echo $javo_get_video['video_id'];
        ?>
">

					<div class="javo_iclbox_wrap">
						<br>
						<h4><?php 
        _e('Video Location', 'javo_fr');
        ?>
</h4>
						<div>
							<select name="javo_video[single_position]">
								<?php 
        foreach ($javo_this_selbox_options as $text => $value) {
            printf('<option value="%s"%s>%s</option>', $value, $javo_video_meta->get('single_position', '') == $value ? ' selected' : '', $text);
        }
        ?>
							</select>
						</div>
					</div>
				</td>
			</tr>

			<tr>
				<th><?php 
        _e('Item Location', 'javo_fr');
        ?>
</th>
				<td>
					<input class="javo_txt_find_address" type="text"><a class="button javo_btn_find_address"><?php 
        _e('Find', 'javo_fr');
        ?>
</a>
					<div class="javo-item-map-container"></div>
					<?php 
        echo "Latitude : <input name='javo_pt[map][lat]' value='{$javo_latLng->get('lat')}' type='text' class='only-number'>" . ', ';
        echo "Longitude : <input name='javo_pt[map][lng]' value='{$javo_latLng->get('lng')}' type='text' class='only-number'>";
        ?>
				</td>
			</tr>

			<tr>
				<th><?php 
        _e('StreetView', 'javo_fr');
        ?>
</th>
				<td>
					<label>
						<input type="checkbox" name="javo_pt[map][street_visible]" value="1" <?php 
        checked(1 == $javo_latLng->get('street_visible', 0));
        ?>
>
						<?php 
        _e("Use StreetView", 'javo_fr');
        ?>
					</labeL>
					<div class="javo-item-streetview-container<?php 
        echo $javo_latLng->get('street_visible', 0) == 0 ? ' hidden' : '';
        ?>
"></div>
					<fieldset class="hidden">
						<?php 
        echo "Latitude : <input name='javo_pt[map][street_lat]' value='{$javo_latLng->get('street_lat', 0)}' type='text'>";
        echo "Longitude : <input name='javo_pt[map][street_lng]' value='{$javo_latLng->get('street_lng', 0)}' type='text'>";
        echo "Heading : <input name='javo_pt[map][street_heading]' value='{$javo_latLng->get('street_heading', 0)}' type='text'>";
        echo "pitch: <input name='javo_pt[map][street_pitch]' value='{$javo_latLng->get('street_pitch', 0)}' type='text'>";
        echo "zoom : <input name='javo_pt[map][street_zoom]' value='{$javo_latLng->get('street_zoom', 0)}' type='text'>";
        ?>
					</fieldset>
				</td>
			</tr>

			<tr>
				<th><?php 
        _e('Description Images', 'javo_fr');
        ?>
</th>
				<td>
					<div class="">
						<a href="javascript:" class="button button-primary javo_pt_detail_add"><?php 
        _e('Add Images', 'javo_fr');
        ?>
</a>
					</div>
					<div class="javo_pt_images">
						<?php 
        $images = @unserialize(get_post_meta($post->ID, "detail_images", true));
        if (is_Array($images)) {
            foreach ($images as $iamge => $src) {
                $url = wp_get_attachment_image_src($src, 'thumbnail');
                printf("\r\n\t\t\t\t\t\t\t\t<div class='javo_pt_field' style='float:left;'>\r\n\t\t\t\t\t\t\t\t\t<img src='%s'><input name='javo_pt_detail[]' value='%s' type='hidden'>\r\n\t\t\t\t\t\t\t\t\t<div class='' align='center'>\r\n\t\t\t\t\t\t\t\t\t\t<input class='javo_pt_detail_del button' type='button' value='Delete'>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t", $url[0], $src);
            }
        }
        ?>
					</div>
				</td>
			</tr>
			<tr>
				<th><?php 
        _e('Custom Field Information', 'javo_fr');
        ?>
</th>
				<td>
					<?php 
        global $javo_custom_field, $edit;
        $edit = $post;
        echo $javo_custom_field->form();
        ?>
				</td>
			</tr>
		</table>
		<?php 
        ob_end_flush();
    }