コード例 #1
0
 public function __construct($post_id)
 {
     self::$post = get_post($post_id);
     $this->post_title = self::$post->post_title;
     $this->javo_directory_meta = @unserialize(get_post_meta($post_id, 'directory_meta', true));
     add_filter('javo_offer_brand_tag', array('javo_get_meta', 'javo_offer_brand_tag_callback'), 10, 2);
 }
コード例 #2
0
 public function __construct($post_id)
 {
     if (null === (self::$post = get_post($post_id))) {
         $tmp = new stdClass();
         $tmp->post_title = __("Deleted Post.", 'javo_fr');
         $tmp->post_id = 0;
         self::$post = $tmp;
     }
     $this->post_title = self::$post->post_title;
     $this->javo_directory_meta = @unserialize(get_post_meta($post_id, 'directory_meta', true));
     add_filter('javo_offer_brand_tag', array('javo_get_meta', 'javo_offer_brand_tag_callback'), 10, 2);
 }
コード例 #3
0
ファイル: archive.php プロジェクト: prosenjit-itobuz/upages
        the_post();
        switch ($javo_query->get('type', $javo_ts_default_primary_type)) {
            case 'grid':
                get_template_part('content', 'archive-grid');
                break;
            case 'two-column':
                get_template_part('content', 'archive-2-column');
                break;
            case 'class':
            default:
                get_template_part('content', 'archive');
        }
        $javo_this_latlng = @unserialize(get_post_meta(get_the_ID(), 'latlng', true));
        $javo_this_posts_return[get_the_ID()]['latlng'] = $javo_this_latlng;
        $javo_this_posts_return[get_the_ID()]['meta'] = array('post_title' => get_the_title());
        $javo_meta_query = new javo_get_meta(get_the_ID());
        $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_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">
コード例 #4
0
<?php

global $javo_custom_field, $post;
$javo_this_author = get_userdata($post->post_author);
$javo_this_author_avatar_id = get_user_meta($javo_this_author->ID, 'avatar', true);
$javo_directory_query = new javo_get_meta(get_the_ID());
echo apply_filters('javo_shortcode_title', __('Detail', 'javo_fr'), $post->post_title);
?>

<div class="item-author text-center javo-animation x2 javo-top-to-bottom-100">
	<?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');
?>
コード例 #5
0
 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));
 }
コード例 #6
0
ファイル: part-single-intro.php プロジェクト: ksingh812/epb
<?php

/***
****
****
****/
$javo_directory_query = new javo_get_meta(get_the_ID());
$javo_rating = new javo_Rating(get_the_ID());
if (has_post_thumbnail()) {
    // check if the post has a Post Thumbnail assigned to it.
    //$item_featured_img=the_post_thumbnail('full');
    $large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
}
?>

		<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'));
コード例 #7
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';
?>

<!-- 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();
?>
" data-url="<?php 
echo 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
コード例 #8
0
 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;
 }
コード例 #9
0
ファイル: list-main-map.php プロジェクト: ksingh812/epb
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();
}
コード例 #10
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();
?>
コード例 #11
0
if ($javo_tso->get('map_wide_hide_category', 'on') != 'off') {
    $javo_this_filter_taxoomies[] = 'item_category';
}
if ($javo_tso->get('map_wide_hide_location', 'on') != 'off') {
    $javo_this_filter_taxoomies[] = 'item_location';
}
$mail_alert_msg = array('to_null_msg' => __('Please, insert recipient`s email address.', 'javo_fr'), 'from_null_msg' => __('Please, insert sender`s email address.', 'javo_fr'), 'subject_null_msg' => __('Please, insert your name.', 'javo_fr'), 'content_null_msg' => __('Please, insert message content.', 'javo_fr'), 'failMsg' => __('Sorry, your message could not be sent.', 'javo_fr'), 'successMsg' => __('Successfully sent!', 'javo_fr'), 'confirmMsg' => __('Do you want to send this message?', 'javo_fr'));
// Setup Agrumnets
$javo_this_posts_args = array('post_status' => 'publish', 'post_type' => 'item', 'posts_per_page' => -1, 'suppress_filters ' => false);
// Return Variables
$javo_this_return = array();
// 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();
?>
コード例 #12
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';
?>

<!-- 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();
?>
" data-url="<?php 
echo 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
コード例 #13
0
<?php

global $javo_tso, $edit, $javo_tso_map;
if (get_query_var('edit') > 0) {
    $user_id = get_current_user_id();
    $edit = get_post(get_query_var('edit'));
    $javo_meta = new javo_get_meta($edit->ID);
    if ($user_id != $edit->post_author && !current_user_can("manage_options")) {
        printf("<script>alert('%s');location.href='%s';</script>", __("Access Rejected", "javo_fr"), get_site_url());
    }
    $detail_images = @unserialize(get_post_meta($edit->ID, "detail_images", true));
}
$latlng = !empty($edit) ? @unserialize(get_post_meta($edit->ID, "latlng", true)) : array();
$latlng = new javo_ARRAY($latlng);
$is_paid = $javo_tso->get('payment', '') === 'use';
?>
<div class="row">
	<div class="col-md-12">
		<form role="form" class="form-horizontal" method="post" id="frm_item">
			<div class="row">
				<div class="col-md-8 col-sm-12 form-left">
					<div class="line-title-bigdots">
						<h2><span><?php 
_e("Title", "javo_fr");
?>
</span></h2>
					</div>
					<div class="form-group">
						<div  class="col-md-12">
							<input name="txt_title" type="text" class="form-control" value="<?php 
echo isset($edit) ? $edit->post_title : NULL;
コード例 #14
0
ファイル: post-meta-box.php プロジェクト: redcypress/lacecake
    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();
    }