当前位置: 首页>>代码示例>>PHP>>正文


PHP javo_ARRAY::get方法代码示例

本文整理汇总了PHP中javo_ARRAY::get方法的典型用法代码示例。如果您正苦于以下问题:PHP javo_ARRAY::get方法的具体用法?PHP javo_ARRAY::get怎么用?PHP javo_ARRAY::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javo_ARRAY的用法示例。


在下文中一共展示了javo_ARRAY::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: javo_get_single_review_callback

function javo_get_single_review_callback()
{
    $javo_this_result = array();
    $javo_query = new javo_ARRAY($_POST);
    $javo_this_review_posts_args = array('post_type' => 'review', 'post_status' => 'publish', 'posts_per_page' => $javo_query->get('count'), 'offset' => $javo_query->get('offset'), 'meta_query' => array(array('key' => 'parent_post_id', 'type' => 'NUMBERIC', 'value' => $javo_query->get('post_id'), 'compare' => '=')));
    $javo_this_review_posts = new WP_Query($javo_this_review_posts_args);
    ob_start();
    if ($javo_this_review_posts->have_posts()) {
        while ($javo_this_review_posts->have_posts()) {
            $javo_this_review_posts->the_post();
            echo apply_filters('javo_single_review_filter', get_the_ID());
        }
        // Emd While
    } else {
    }
    // End If
    wp_reset_postdata();
    $javo_this_result['html'] = ob_get_clean();
    echo json_encode($javo_this_result);
    exit;
}
开发者ID:redcypress,项目名称:lacecake,代码行数:21,代码来源:callback-javo-review.php

示例2: ajax_favorite_callback

 public function ajax_favorite_callback()
 {
     $javo_query = new javo_ARRAY($_POST);
     $this->favorites = (array) get_user_meta(get_current_user_id(), 'favorites', true);
     $result = array();
     $post_id = $javo_query->get('post_id', 0);
     $reg = $javo_query->get('reg', false);
     if (0 < $post_id) {
         if ($reg) {
             if (!$this->on($post_id)) {
                 $this->favorites[] = array('save_day' => date('Y-m-d h:i:s'), 'post_id' => $post_id);
             }
         } else {
             $this->del($post_id);
         }
         update_user_meta(get_current_user_id(), 'favorites', $this->favorites);
         $result = array('return' => 'success');
     } else {
         $result = array('return' => 'fail');
     }
     die(json_encode($result));
 }
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:22,代码来源:javo-favorite.php

示例3: javo_search_form_callback

    public static function javo_search_form_callback($atts, $content = '')
    {
        self::$load_script = true;
        $javo_query = new javo_ARRAY($_GET);
        extract(shortcode_atts(array('action' => '', 'hide_field' => array(), 'display_border' => ''), $atts));
        $javo_redirect = home_url();
        if ((int) $action > 0 && !is_archive() && !is_search()) {
            $javo_redirect = apply_filters('javo_wpml_link', $action);
        }
        $javo_hide_el = (array) @explode(',', $hide_field);
        $javo_hide_el = (object) Array_flip($javo_hide_el);
        $javo_display_border = $display_border === 'hide' || is_search() || is_archive() ? ' border-none' : null;
        ob_start();
        ?>
		<div class="container search-type-a-wrap">
			<form role="form" data-javo-search-form class="search-type-a-form" method="get">

				<div class="search-type-a-inner<?php 
        echo $javo_display_border;
        ?>
">

					<?php 
        if (!isset($javo_hide_el->keyword)) {
            ?>
						<div class="search-box-inline">
							<input
								type		= "text"
								class		= "search-a-items form-control"
								name		= "s"
								placeholder	= "<?php 
            _e('Keyword', 'javo_fr');
            ?>
"
								value		= "<?php 
            echo $javo_query->get('keyword', null);
            ?>
"
							>
						</div><!-- /.search-box-inline -->
					<?php 
        }
        ?>

					<?php 
        if (!isset($javo_hide_el->category)) {
            ?>
						<div class="search-box-inline">
							<select name="filter[item_category]" class="form-control">
								<option value=""><?php 
            _e('Category', 'javo_fr');
            ?>
</option>
								<?php 
            echo apply_filters('javo_get_selbox_child_term_lists', 'item_category', null, 'select', $javo_query->get('category', 0), 0, 0);
            ?>
							</select>
						</div><!-- /.search-box-inline -->
					<?php 
        }
        ?>

					<?php 
        if (!isset($javo_hide_el->location)) {
            ?>
						<div class="search-box-inline">
							<select name="filter[item_location]" class="form-control">
								<option value=""><?php 
            _e('Location', 'javo_fr');
            ?>
</option>
								<?php 
            echo apply_filters('javo_get_selbox_child_term_lists', 'item_location', null, 'select', $javo_query->get('location', 0), 0, 0);
            ?>
							</select>
						</div><!-- /.search-box-inline -->
					<?php 
        }
        ?>

					<?php 
        if (!isset($javo_hide_el->google) && !is_archive() && !is_search()) {
            ?>
						<div class="search-box-inline javo-search-form-geoloc">
							<input
								type="text"
								name="geoloc"
								class="form-control jv-search-location-input"
							>
							<i class="fa fa-map-marker javo-geoloc-trigger"></i>
						</div><!-- /.col-md-2 -->
					<?php 
        }
        ?>

					<div class="search-box-inline">
						<button
							type="submit"
							class="jv-submit-button btn btn-primary admin-color-setting"
						>
//.........这里部分代码省略.........
开发者ID:ksingh812,项目名称:epb,代码行数:101,代码来源:search-form.php

示例4: htmlspecialchars

	<input type="hidden" name="javo_google_map_poi" value="<?php 
    echo $javo_tso_map->get('poi', 'on');
    ?>
">
	<input type="hidden" name="javo_location_click_on_action" value="<?php 
    echo $javo_tso->get('tab_location_click_trigger', '');
    ?>
">
	<input type="hidden" name="javo-this-term-posts-latlng" value="<?php 
    echo htmlspecialchars(json_encode($javo_relative_items));
    ?>
">

	<!-- Street View -->
	<input type="hidden" value="<?php 
    echo $javo_latlng_meta->get('street_visible', 1);
    ?>
" data-street-visible>
	<input type="hidden" value="<?php 
    echo $javo_latlng_meta->get('street_lat', null);
    ?>
" data-street-lat>
	<input type="hidden" value="<?php 
    echo $javo_latlng_meta->get('street_lng', null);
    ?>
" data-street-lng>
	<input type="hidden" value="<?php 
    echo $javo_latlng_meta->get('street_heading', 0);
    ?>
" data-street-pov-heading>
	<input type="hidden" value="<?php 
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:31,代码来源:single-item-tab.php

示例5:

				</div><!-- /.javo-archive-sub-category -->

				<hr>
			<?php 
}
?>
			<form class="form-horizontal archive-filter-bar" role="form" method="get">
				<div class="row">

				<?php 
if ($javo_tso_archive->get('types_enable', 'on') == 'on') {
    ?>
					<div class="col-md-2 col-sm-3 col-xs-3">
						<div class="btn-group btn-group-md btn-group-justified" data-javo-archive-order-direction>
							<div class="btn btn-md archive-filter-btns<?php 
    echo $javo_query->get('type', $javo_ts_default_primary_type) == 'class' ? ' active' : '';
    ?>
" title="<?php 
    _e('Classic', 'javo_fr');
    ?>
" data-value="class" title="<?php 
    _e('Classic', 'javo_fr');
    ?>
">
								<span class="glyphicon glyphicon-th"></span>
							</div>
							<div class="btn btn-md archive-filter-btns<?php 
    echo $javo_query->get('type', $javo_ts_default_primary_type) == 'grid' ? ' active' : '';
    ?>
" data-value="grid" title="<?php 
    _e('Grid', 'javo_fr');
开发者ID:prosenjit-itobuz,项目名称:upages,代码行数:31,代码来源:archive.php

示例6: item_publisher_callback

 public static function item_publisher_callback()
 {
     global $wpdb, $current_user;
     $javo_query = new javo_ARRAY($_POST);
     $response = array();
     $level_id = !empty($current_user->membership_level) ? $current_user->membership_level->ID : 0;
     $order = self::get_order_info($javo_query->get('code'));
     $level = self::get_level_info($level_id);
     // Price
     $javo_free = isset($level->initial_payment) && (double) $level->initial_payment > 0 ? false : true;
     // After Action
     $is_pending = !(isset($level->javo_after_action) && !$level->javo_after_action);
     // Set Featured
     $is_featured = $javo_query->get('featured', "false") == "true" ? true : false;
     // Checking for invalid order code.
     if ($javo_query->get('code', null) == null) {
         self::response_err(__("Can't get order code for available post.", 'javo_fr'));
     }
     // Checking for invalid target items.
     if ((int) $javo_query->get('post_id', 0) <= 0) {
         self::response_err(__('Failed to get item number.', 'javo_fr'));
     }
     // Checking for have an allow posts amount.
     if (!($javo_free || $level->javo_allow_post_unliimit)) {
         if ((int) $order->javo_allow_post <= 0) {
             self::response_err(__("Posts Remaining balance is now 0.", 'javo_fr'));
         }
     }
     // checking for amount of featured available
     if ($is_featured) {
         if (!$level->javo_featured_unliimit) {
             if ((int) $order->javo_cnt_featured <= 0) {
                 self::response_err(__("Featured Item balance is now 0.", 'javo_fr'));
             }
         }
     }
     // Item Status Update Action
     $post_id = wp_update_post(array('ID' => (int) $javo_query->get('post_id'), 'post_status' => $is_pending ? 'pending' : 'publish'));
     if ((int) $post_id <= 0) {
         self::response_err($order->javo_allow_post);
     } else {
         if ($javo_free) {
             update_post_meta($post_id, 'javo_paid_state', 'free');
         } else {
             // IF NOT UNLIMITED POST
             if (!$level->javo_allow_post_unliimit) {
                 // Use available post
                 $sql = $wpdb->prepare("\r\n\t\t\t\t\t\tUPDATE\r\n\t\t\t\t\t\t\t{$wpdb->pmpro_membership_orders}\r\n\t\t\t\t\t\tSET\r\n\t\t\t\t\t\t\tjavo_allow_post = javo_allow_post -1\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\tcode='%s'", $order->code);
                 $wpdb->query($sql);
                 // If after it work to count of allow posts is zero, initialize of current user level.
                 $balance_ = $wpdb->get_var("\r\n\t\t\t\t\t\tSELECT\r\n\t\t\t\t\t\t\tjavo_allow_post\r\n\t\t\t\t\t\tFROM\r\n\t\t\t\t\t\t\t{$wpdb->pmpro_membership_orders}\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\tcode='{$order->code}'\r\n\t\t\t\t\t");
                 if ((int) $balance_ <= 0) {
                     if (self::init_level(wp_get_current_user()->ID) === false) {
                         self::response_err(__("Database Error", 'javo_fr'));
                     }
                 }
             }
             // IF NOT UNLIMITED FEATURED
             if ($is_featured && !$level->javo_featured_unliimit) {
                 // Use available post
                 $sql = $wpdb->prepare("\r\n\t\t\t\t\t\tUPDATE\r\n\t\t\t\t\t\t\t{$wpdb->pmpro_membership_orders}\r\n\t\t\t\t\t\tSET\r\n\t\t\t\t\t\t\tjavo_cnt_featured = javo_cnt_featured -1\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\tcode='%s'", $order->code);
                 $wpdb->query($sql);
             }
             // IF NOT UNLIMITED EXPIRE
             if (!$level->javo_expire_unliimit) {
                 $expire = date('YmdHis', strtotime($order->javo_expire_day . ' days'));
             } else {
                 $expire = "unlimited";
             }
             // IF SET FEATURED
             if ($is_featured) {
                 update_post_meta($post_id, 'javo_this_featured_item', 'use');
             }
             update_post_meta($post_id, 'javo_expire_day', $expire);
             update_post_meta($post_id, 'javo_paid_state', 'paid');
         }
         $response['permalink'] = $is_pending ? home_url(JAVO_DEF_LANG . JAVO_MEMBER_SLUG . '/' . wp_get_current_user()->user_login . '/' . JAVO_ITEMS_SLUG) : get_permalink($post_id);
         $response['state'] = 'success';
     }
     echo json_encode($response);
     die;
 }
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:82,代码来源:javo-pmp-functions.php

示例7: map_get_

 public static function map_get_()
 {
     global $wpdb, $javo_tso, $sitepress;
     $javo_query = new javo_ARRAY($_POST);
     $javo_all_posts = array();
     if ($javo_query->get('lang', null) != null) {
         if (!empty($sitepress)) {
             $sitepress->switch_lang($javo_query->get('lang'), true);
         }
     }
     $javo_this_posts_args = array('post_type' => 'item', 'suppress_filters' => false, 'post_status' => 'publish', 'posts_per_page' => -1);
     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', 'item'));
             $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;
     }
     $javo_this_posts = get_posts($javo_this_posts_args);
     foreach ($javo_this_posts as $item) {
         // Google Map LatLng Values
         $latlng = @unserialize(get_post_meta($item->ID, "latlng", true));
         $category = array();
         $category_label = array();
         foreach (array('item_category', 'item_location', 'post_tag') as $taxonomy) {
             $results = $wpdb->get_results($wpdb->prepare("\r\n\t\t\t\t\t\t\tSELECT t.term_id, t.name FROM {$wpdb->terms} AS t\r\n\t\t\t\t\t\t\tINNER JOIN {$wpdb->term_taxonomy} AS tt ON tt.term_id = t.term_id\r\n\t\t\t\t\t\t\tINNER JOIN {$wpdb->term_relationships} AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id\r\n\t\t\t\t\t\t\tWHERE tt.taxonomy IN (%s) AND tr.object_id IN ({$item->ID}) ORDER BY t.term_id ASC", $taxonomy));
             //$category[ $taxonomy ] = $results;
             foreach ($results as $result) {
                 $category[$taxonomy][] = $result->term_id;
                 $category_label[$taxonomy][] = $result->name;
             }
         }
         $category_icon = isset($category['item_category'][0]) ? $category['item_category'][0] : null;
         if ('' === ($javo_set_icon = get_option("javo_item_category_{$category_icon}_marker", ''))) {
             $javo_set_icon = $javo_tso->get('map_marker', '');
         }
         $javo_categories = new javo_ARRAY($category);
         $javo_categories_label = new javo_ARRAY($category_label);
         if (!empty($latlng['lat']) && !empty($latlng['lng'])) {
             $javo_all_posts[] = array('post_id' => $item->ID, 'lat' => $latlng['lat'], 'lng' => $latlng['lng'], 'rating' => get_post_meta($item->ID, 'rating_average', true), 'icon' => $javo_set_icon, 'cat_term' => $javo_categories->get('item_category'), 'loc_term' => $javo_categories->get('item_location'), 'tags' => $javo_categories_label->get('post_tag'));
         }
     }
     die(json_encode($javo_all_posts));
 }
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:58,代码来源:callback-javo-map.php

示例8: form

    public function form($instance)
    {
        // WAQ : Widget Archive Queries.
        $javo_waq = new javo_ARRAY($instance);
        ?>
		<p>
			<label for="<?php 
        echo $this->get_field_id('title');
        ?>
"><?php 
        _e('Title:', 'javo_fr');
        ?>
</label>
			<input class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" type="text" value="<?php 
        echo esc_attr($javo_waq->get('title'));
        ?>
">
		</p>
		<fieldset style="margin-bottom:10px;">
			<input name="<?php 
        echo $this->get_field_name('archive-wg-bg-color');
        ?>
" type="text" value="<?php 
        echo esc_attr($javo_waq->get('archive-wg-bg-color'));
        ?>
" class="wp_color_picker" data-default-color="#000">
			<label style="position:relative; bottom:7px;"><?php 
        _e('Background Color', 'javo_fr');
        ?>
</label>
		</fieldset>
		<fieldset style="margin-bottom:10px;">
			<input name="<?php 
        echo $this->get_field_name('archive-wg-text-color');
        ?>
" type="text" value="<?php 
        echo esc_attr($javo_waq->get('archive-wg-text-color'));
        ?>
" class="wp_color_picker" data-default-color="#fff">
			<label style="position:relative; bottom:7px;"><?php 
        _e('Text Color', 'javo_fr');
        ?>
</label>
		</fieldset>

		<script type="text/javascript">
		jQuery(function($){
			$(document).ajaxComplete(function(){
				$('.wp_color_picker').wpColorPicker();
			});
		});


		</script>
		<?php 
    }
开发者ID:redcypress,项目名称:lacecake,代码行数:62,代码来源:wg-javo-archive-categories.php

示例9: send_mail

 public function send_mail()
 {
     $javo_query = new javo_ARRAY($_POST);
     $javo_this_return = array();
     $javo_this_return['result'] = false;
     $meta = array('to' => $javo_query->get('to', NULL), 'subject' => $javo_query->get('subject', __('Untitled Mail', 'javo_fr')) . ' : ' . get_bloginfo('name'), 'from' => sprintf("From: %s<%s>\r\n", get_bloginfo('name'), $javo_query->get('from', get_option('admin_email'))), 'content' => $javo_query->get('content', NULL));
     if ($javo_query->get('to', NULL) != null && $javo_query->get('from', NULL) != null) {
         add_filter('wp_mail_content_type', array(__CLASS__, 'javo_send_mail_content_type_callback'));
         $mailer = wp_mail($meta['to'], $meta['subject'], $meta['content'], $meta['from']);
         $javo_this_return['result'] = $mailer;
         remove_filter('wp_mail_content_type', array(__CLASS__, 'javo_send_mail_content_type_callback'));
     }
     echo json_encode($javo_this_return);
     exit(0);
 }
开发者ID:prosenjit-itobuz,项目名称:upages,代码行数:15,代码来源:process.php

示例10: javo_post_list_callback

function javo_post_list_callback()
{
    // Wordpress Queries
    global $wp_query, $javo_tso, $javo_favorite, $javo_custom_item_label, $javo_custom_item_tab;
    $video_media = array("youtube" => "//www.youtube.com/embed/", "vimeo" => "//player.vimeo.com/video/", "screenr" => "//www.youtube.com/embed/", "dailymotion" => "//www.youtube.com/embed/", "metacafe" => "//www.youtube.com/embed/");
    $javo_query = new javo_ARRAY($_POST);
    if ($javo_query->get('lang', null) != null) {
        global $sitepress;
        if (!empty($sitepress)) {
            $sitepress->switch_lang($javo_query->get('lang'), true);
        }
    }
    // List view tyope
    $mode = $javo_query->get('type', null);
    $post_type = $javo_query->get('post_type', 'item');
    $p = $javo_query->get('post_id', null);
    $ppp = $javo_query->get('ppp', 10);
    $page = $javo_query->get('page', 1);
    $tax = $javo_query->get('tax', 10);
    $term_meta = $javo_query->get('term_meta', 10);
    $meta = array();
    $args = array('post_type' => $post_type, 'post_status' => 'publish', 'posts_per_page' => $ppp, 'paged' => $page);
    if ((int) $p > 0) {
        $args['p'] = $p;
    }
    if ($tax != NULL && is_Array($tax)) {
        foreach ($tax as $key => $value) {
            if ($value != "") {
                $args['tax_query']['relation'] = "AND";
                $args['tax_query'][] = array("taxonomy" => $key, "field" => "term_id", "terms" => $value);
            }
        }
    }
    if ($term_meta != NULL && is_Array($term_meta)) {
        foreach ($term_meta as $key => $value) {
            if ($value != "") {
                $args['meta_query']['relation'] = "AND";
                $args['meta_query'][] = array("key" => $key, "value" => (int) $value, "compare" => ">=");
            }
        }
    }
    $args["s"] = $javo_query->get('keyword', null);
    // Not found image featured url
    $noimage = JAVO_IMG_DIR . "/no-image.png";
    ob_start();
    ?>
	<script type="text/javascript">
	if(typeof(window.jQuery) != "undefined")
	{
		jQuery(document).ready(function($)
		{
			"use strict";
			$(".javo_hover_body").css({
				"position":"absolute",
				"top":"0",
				"left":"0",
				"z-index":"2",
				"width":"100%",
				"height":"100%",
				"padding":"10px",
				"margin": "0px",
				"backgroundColor":"rgba(0, 0, 0, 0.4)",
				"display":"none"
			});
			$(".javo_img_hover")
				.css({
					"position":"relative", "overflow":"auto", "display":"inline-block"
				}).hover(function(){
					$(this).find(".javo_hover_body").fadeIn("fast");
				}, function(){
					$(this).find(".javo_hover_body").clearQueue().fadeOut("slow");
				});
		});
	};
	</script>
	<?php 
    switch ($mode) {
        case 2:
            $posts = new WP_Query($args);
            ?>
		<div class="row javo-item-grid-listing">
			<?php 
            $i = 0;
            ## Thumbnail Type ###################
            if ($posts->have_posts()) {
                while ($posts->have_posts()) {
                    $posts->the_post();
                    $javo_meta_query = new javo_GET_META(get_the_ID());
                    $meta = array('strong' => $javo_meta_query->cat('item_category', __('No Category', 'javo_fr')), "featured" => $javo_meta_query->cat('item_location', __('No Location', 'javo_fr')));
                    ?>
					<div class="col-md-4 col-sm-6 col-xs-6 pull-left">
						<div class="panel panel-default panel-relative">
							<?php 
                    $detail_images = (array) @unserialize(get_post_meta(get_the_ID(), "detail_images", true));
                    $detail_images[] = get_post_thumbnail_id(get_the_ID());
                    if (!empty($detail_images)) {
                        echo '<div class="javo_detail_slide">';
                        $javo_this_image_meta = wp_get_attachment_image_src($detail_images, 'large');
                        $javo_this_image = $javo_this_image_meta[0];
                        ?>
//.........这里部分代码省略.........
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:101,代码来源:callback-post-list.php

示例11: function

?>
">
	<input type="hidden" javo-alert-ok value="<?php 
_e("Done", 'javo_fr');
?>
">
	<input type="hidden" javo-is-geoloc value="<?php 
echo $javo_current_pos;
?>
">
	<input type="hidden" javo-bad-location value="<?php 
_e("There is no such address", 'javo_fr');
?>
">
	<input type="hidden" javo-cluster-onoff value="<?php 
echo $javo_mopt->get('cluster', null);
?>
">
	<input type="hidden" javo-cluster-level value="<?php 
echo $javo_mopt->get('cluster_level', null);
?>
">

</fieldset>
<script type="text/javascript">
jQuery( function( $ ){

	var BTN_OK = $('[javo-alert-ok]').val();

	window.javo_map_tab_func = {
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:30,代码来源:tp-javo-map-tab.php

示例12: javo_post_meta_box_save

 public static function javo_post_meta_box_save($post_id)
 {
     if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
         return $post_id;
     }
     /*
      *		Variables Initialize
      *
      *======================================================================================*
      */
     $javo_query = new javo_ARRAY($_POST);
     $javo_itemlist_query = new javo_ARRAY($javo_query->get('javo_il', array()));
     if ($javo_query->get('javo_opt_header') != null) {
         update_post_meta($post_id, "javo_header_type", $javo_query->get('javo_opt_header'));
     }
     if ($javo_query->get('javo_opt_fancy') != null) {
         update_post_meta($post_id, "javo_header_fancy_type", $javo_query->get('javo_opt_fancy'));
     }
     if ($javo_query->get('javo_opt_sidebar') != null) {
         update_post_meta($post_id, "javo_sidebar_type", $javo_query->get('javo_opt_sidebar'));
     }
     if (false !== ($tmp = $javo_itemlist_query->get('type', false))) {
         update_post_meta($post_id, "javo_item_listing_type", $tmp);
     }
     if (false !== ($tmp = $javo_itemlist_query->get('list_position', false))) {
         update_post_meta($post_id, "javo_item_listing_position", $tmp);
     }
     if (false !== ($tmp = $javo_itemlist_query->get('content_position', false))) {
         update_post_meta($post_id, "javo_item_listing_content_position", $tmp);
     }
     if (false !== ($tmp = $javo_query->get('javo_hd', false))) {
         update_post_meta($post_id, "javo_hd_post", $tmp);
     }
     if (false !== ($tmp = $javo_query->get('javo_map_opts', false))) {
         update_post_meta($post_id, "javo_map_page_opt", $tmp);
     }
     // Slide AutoPlay
     if (false !== ($tmp = $javo_query->get('javo_detail_slide_autoplay', false))) {
         update_post_meta($post_id, "javo_detail_slide_autoplay", $tmp);
     }
     // Fancy options
     if ($javo_query->get('javo_fancy', null) != null) {
         update_post_meta($post_id, "javo_fancy_options", @serialize($javo_query->get('javo_fancy', null)));
     }
     if ($javo_query->get('javo_slide', null) != null) {
         update_post_meta($post_id, "javo_slider_options", @serialize($javo_query->get('javo_slide', null)));
     }
     $javo_controller_setup = !empty($_POST['javo_post_control']) ? @serialize($_POST['javo_post_control']) : "";
     update_post_meta($post_id, "javo_control_options", $javo_controller_setup);
     /*
      *		Set Page Template Default Values
      *
      *======================================================================================*
      */
     update_post_meta($post_id, "javo_slider_type", $javo_query->get('javo_opt_slider'));
     update_post_meta($post_id, "javo_posts_per_page", $javo_query->get('javo_posts_per_page'));
     update_post_meta($post_id, "javo_item_tax", @serialize((array) $javo_query->get('javo_item_tax')));
     update_post_meta($post_id, "javo_blog_tax", $javo_query->get('javo_blog_tax'));
     update_post_meta($post_id, "javo_item_terms", @serialize($javo_query->get('javo_item_terms', null)));
     update_post_meta($post_id, "javo_blog_terms", @serialize($javo_query->get('javo_blog_terms', null)));
     /*
      *		Custom Post Types Meta Save
      *
      *======================================================================================*
      */
     switch (get_post_type($post_id)) {
         case "item":
             $javo_item_query = new javo_ARRAY($javo_query->get('javo_item_attribute', array()));
             if ($javo_item_query->get('featured', null) != null) {
                 update_post_meta($post_id, "javo_this_featured_item", $javo_item_query->get('featured', ''));
             }
             // item meta
             if (isset($_POST['javo_pt'])) {
                 $ppt_meta = $_POST['javo_pt'];
                 $javo_pt_query = new javo_array($ppt_meta);
                 $ppt_images = !empty($_POST['javo_pt_detail']) ? $_POST['javo_pt_detail'] : null;
                 $map_area_settings = !empty($ppt_meta['item_map_positon']) ? $ppt_meta['item_map_positon'] : array();
                 $map_area_settings = @serialize($map_area_settings);
                 $map_type_settings = !empty($ppt_meta['item_map_type']) ? $ppt_meta['item_map_type'] : array();
                 $map_type_settings = @serialize($map_type_settings);
                 // is Assign ?
                 if ($javo_query->get('item_author') == 'other') {
                     remove_action('save_post', array(__CLASS__, 'javo_post_meta_box_save'));
                     $post_id = wp_update_post(array('ID' => $post_id, 'post_author' => $javo_query->get('item_author_id')));
                     add_action('save_post', array(__CLASS__, 'javo_post_meta_box_save'));
                 }
                 // Upload Video
                 $javo_video_query = new javo_ARRAY($javo_query->get('javo_video', array()));
                 $javo_video = null;
                 if ($javo_video_query->get('portal', NULL) != NULL) {
                     $protocal = is_ssl() ? "https" : "http";
                     switch ($javo_video_query->get('portal')) {
                         case 'youtube':
                             $javo_attachment_video = "{$protocal}://www.youtube-nocookie.com/embed/" . $javo_video_query->get('video_id', 0);
                             break;
                         case 'vimeo':
                             $javo_attachment_video = "{$protocal}://player.vimeo.com/video/" . $javo_video_query->get('video_id', 0);
                             break;
                         case 'dailymotion':
                             $javo_attachment_video = "{$protocal}://www.dailymotion.com/embed/video/" . $javo_video_query->get('video_id', 0);
//.........这里部分代码省略.........
开发者ID:prosenjit-itobuz,项目名称:upages,代码行数:101,代码来源:post-meta-box.php

示例13: form

    /**
     * Widget setting
     */
    function form($instance)
    {
        /* Set up some default widget settings. */
        $defaults = array('btn_txt' => '', 'btn_txt_after' => '', 'btn_txt_color' => '', 'before_log_icon' => 'fa fa-lock', 'after_log_icon' => 'fa fa-unlock', 'btn_bg_color' => '', 'btn_border_color' => '', 'btn_radius' => '', 'btn_visible' => '', 'date' => true);
        $instance = wp_parse_args((array) $instance, $defaults);
        $javo_var = new javo_ARRAY($instance);
        $btn_txt = esc_attr($instance['btn_txt']);
        $btn_txt_after = esc_attr($instance['btn_txt_after']);
        $btn_txt_color = esc_attr($instance['btn_txt_color']);
        $btn_bg_color = esc_attr($instance['btn_bg_color']);
        $btn_border_color = esc_attr($instance['btn_border_color']);
        $btn_radius = esc_attr($instance['btn_radius']);
        $btn_visible = esc_attr($instance['btn_visible']);
        ?>
	<div class="javo-dtl-trigger" data-javo-dtl-el="[name='<?php 
        echo esc_attr($this->get_field_name('button_style'));
        ?>
']" data-javo-dtl-val="set" data-javo-dtl-tar=".javo-button-login-detail-style">
		<p>
			<label><?php 
        _e("Show on mobile", 'javo_fr');
        ?>
</label>
			<label>
				<input
					name="<?php 
        echo esc_attr($this->get_field_name('btn_visible'));
        ?>
"
					type="radio"
					value=""
					<?php 
        checked('' == $btn_visible);
        ?>
				>
				<?php 
        _e("Enable", 'javo_fr');
        ?>
			</label>

			<label>
				<input
					name="<?php 
        echo esc_attr($this->get_field_name('btn_visible'));
        ?>
"
					type="radio"
					value="hide"
					<?php 
        checked('hide' == $btn_visible);
        ?>
				>
				<?php 
        _e("Hide", 'javo_fr');
        ?>
			</label>
		</p>
		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('btn_txt'));
        ?>
"><?php 
        _e('Logged in Button Text:', 'javo_fr');
        ?>
</label>
			<input class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('btn_txt'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('btn_txt'));
        ?>
" type="text" value="<?php 
        echo $btn_txt;
        ?>
" >
		</p>
		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('btn_txt_after'));
        ?>
"><?php 
        _e('Log out Button Text:', 'javo_fr');
        ?>
</label>
			<input class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('btn_txt_after'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('btn_txt_after'));
        ?>
" type="text" value="<?php 
        echo $btn_txt_after;
        ?>
" >
		</p>
		<dl>
			<dt>
//.........这里部分代码省略.........
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:101,代码来源:wg-javo-menu-button-login.php

示例14: form

    /**
     * Widget setting
     */
    function form($instance)
    {
        /* Set up some default widget settings. */
        $defaults = array('btn_txt' => '', 'btn_icon' => 'fa-folder', 'btn_txt_color' => '', 'btn_bg_color' => '', 'btn_border_color' => '', 'btn_radius' => '', 'date' => true);
        $instance = wp_parse_args((array) $instance, $defaults);
        $btn_txt = esc_attr($instance['btn_txt']);
        $btn_icon = esc_attr($instance['btn_icon']);
        $btn_txt_color = esc_attr($instance['btn_txt_color']);
        $btn_bg_color = esc_attr($instance['btn_bg_color']);
        $btn_border_color = esc_attr($instance['btn_border_color']);
        $btn_radius = esc_attr($instance['btn_radius']);
        $javo_var = new javo_ARRAY($instance);
        ?>
	<div class="javo-dtl-trigger" data-javo-dtl-el="[name='<?php 
        echo esc_attr($this->get_field_name('button_style'));
        ?>
']" data-javo-dtl-val="set" data-javo-dtl-tar=".javo-full-cover-cat-detail-style">
		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('btn_txt'));
        ?>
"><?php 
        _e('Label', 'javo_fr');
        ?>
 : </label>
			<input class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('btn_txt'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('btn_txt'));
        ?>
" type="text" value="<?php 
        echo $btn_txt;
        ?>
" >
		</p>
		<p>
			<label for="<?php 
        echo esc_attr($this->get_field_id('btn_icon'));
        ?>
"><?php 
        _e('Font-Awsome Code', 'javo_fr');
        ?>
 : </label>
			<input class="widefat" id="<?php 
        echo esc_attr($this->get_field_id('btn_icon'));
        ?>
" name="<?php 
        echo esc_attr($this->get_field_name('btn_icon'));
        ?>
" type="text" value="<?php 
        echo $btn_icon;
        ?>
" >
		</p>
		<dl>
			<dt>
				<label><?php 
        _e("Display Sub Category", 'javo_fr');
        ?>
</label>
			</dt>
			<dd>
				<label>
					<input
						name="<?php 
        echo esc_attr($this->get_field_name('sub_cate'));
        ?>
"
						type="radio"
						value=""
						<?php 
        checked('' == $javo_var->get('sub_cate'));
        ?>
>
					<?php 
        _e("Show", 'javo_fr');
        ?>
				</label>
				<br>
				<label>
					<input
						name="<?php 
        echo esc_attr($this->get_field_name('sub_cate'));
        ?>
"
						type="radio"
						value="hide"
						<?php 
        checked('hide' == $javo_var->get('sub_cate'));
        ?>
>
					<?php 
        _e("Hide", 'javo_fr');
        ?>
				</label>
			</dd>
//.........这里部分代码省略.........
开发者ID:ksingh812,项目名称:epb,代码行数:101,代码来源:wg-javo-full-cover-categories.php

示例15: javo_auto_generator_callback

 public static function javo_auto_generator_callback($post_id, $is_remove = false)
 {
     global $wpdb, $javo_tso;
     $is_execusion = false;
     if ('item' === get_post_type($post_id)) {
         if ('publish' === get_post_status($post_id) || true === $is_remove) {
             $is_execusion = true;
         }
     }
     if (!$is_execusion) {
         return $post_id;
     }
     $upload_folder = wp_upload_dir();
     $blog_id = get_current_blog_id();
     $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : '';
     $json_file = "{$upload_folder['basedir']}/javo_all_items_{$blog_id}_{$lang}.json";
     if (file_exists($json_file)) {
         $json_contents = file_get_contents($json_file);
         $javo_all_posts = json_decode($json_contents, true);
     } else {
         $javo_all_posts = array();
     }
     // Google Map LatLng Values
     $latlng = array('lat' => get_post_meta($post_id, 'jv_item_lat', true), 'lng' => get_post_meta($post_id, 'jv_item_lng', true));
     $category = array();
     $category_label = array();
     foreach (array('item_category', 'item_location', 'post_tag') as $taxonomy) {
         $results = $wpdb->get_results($wpdb->prepare("\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tt.term_id, t.name\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t{$wpdb->terms} AS t\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t\t{$wpdb->term_taxonomy} AS tt\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\ttt.term_id = t.term_id\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t\t{$wpdb->term_relationships} AS tr\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\ttr.term_taxonomy_id = tt.term_taxonomy_id\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\ttt.taxonomy IN (%s)\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t\ttr.object_id IN ({$post_id})\n\t\t\t\t\t\tORDER\n\t\t\t\t\t\t\tBY t.name ASC", $taxonomy));
         //$category[ $taxonomy ] = $results;
         foreach ($results as $result) {
             $category[$taxonomy][] = $result->term_id;
             $category_label[$taxonomy][] = $result->name;
         }
     }
     $category_icon = isset($category['item_category'][0]) ? $category['item_category'][0] : null;
     if ('' === ($javo_set_icon = get_option("javo_item_category_{$category_icon}_marker", ''))) {
         $javo_set_icon = $javo_tso->get('map_marker', '');
     }
     $javo_categories = new javo_ARRAY($category);
     $javo_categories_label = new javo_ARRAY($category_label);
     $javo_result = array('post_id' => $post_id, 'post_title' => get_the_title($post_id), 'lat' => $latlng['lat'], 'lng' => $latlng['lng'], 'rating' => get_post_meta($post_id, 'rating_average', true), 'icon' => $javo_set_icon, 'cat_term' => $javo_categories->get('item_category'), 'loc_term' => $javo_categories->get('item_location'), 'tags' => $javo_categories_label->get('post_tag'));
     $javo_is_update = false;
     if (!empty($javo_all_posts)) {
         foreach ($javo_all_posts as $index => $post_object) {
             if ($post_object['post_id'] == $post_id) {
                 if (!$is_remove) {
                     // Added Items
                     $javo_all_posts[$index] = $javo_result;
                 } else {
                     // Removed Items
                     unset($javo_all_posts[$index]);
                 }
                 // Process?
                 $javo_is_update = true;
             }
         }
     }
     if (!$javo_is_update && !$is_remove) {
         $javo_all_posts[] = $javo_result;
     }
     // Make JSON file
     $file_handler = @fopen($json_file, 'w');
     @fwrite($file_handler, json_encode($javo_all_posts));
     @fclose($file_handler);
 }
开发者ID:prosenjit-itobuz,项目名称:upages,代码行数:65,代码来源:define.php


注:本文中的javo_ARRAY::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。