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


PHP BYT_Theme_Utils::retrieve_array_of_values_from_query_string方法代码示例

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


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

示例1: get_sidebar

BYT_Theme_Utils::breadcrumbs();
get_sidebar('under-header');
$enable_reviews = $byt_theme_globals->enable_reviews();
$enable_accommodations = $byt_theme_globals->enable_accommodations();
$current_user = wp_get_current_user();
$user_info = get_userdata($current_user->ID);
$price_decimal_places = $byt_theme_globals->get_price_decimal_places();
$default_currency_symbol = $byt_theme_globals->get_default_currency_symbol();
$show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after();
$default_results_view = $byt_theme_globals->get_search_results_default_view();
$custom_search_results_page = $byt_theme_globals->get_custom_search_results_page_url();
$request_car_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('car_types', true);
$request_car_rental_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('car_rental_tags', true);
$request_tour_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('tour_types', true);
$request_tour_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('tour_tags', true);
$request_cruise_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('cruise_types', true);
$request_cruise_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('cruise_tags', true);
$request_accommodation_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('accommodation_types', true);
$request_accommodation_tags = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('accommodation_tags', true);
$request_cabin_types = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('cabin_types', true);
$request_prices = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('price', true);
$search_term = isset($_GET['term']) ? wp_kses($_GET['term'], '') : '';
$location_id = isset($_GET['l']) ? intval(wp_kses($_GET['l'], '')) : 0;
$age = isset($_GET['age']) ? intval(wp_kses($_GET['age'], '')) : 0;
$stars = isset($_GET['stars']) ? intval(wp_kses($_GET['stars'], '')) : 0;
$rating = isset($_GET['rating']) ? intval(wp_kses($_GET['rating'], '')) : 0;
$guests = isset($_GET['guests']) ? intval(wp_kses($_GET['guests'], '')) : 0;
$cabins = isset($_GET['cabins']) ? intval(wp_kses($_GET['cabins'], '')) : 0;
$rooms = isset($_GET['rooms']) ? intval(wp_kses($_GET['rooms'], '')) : 0;
$what = isset($_GET['what']) ? intval(wp_kses($_GET['what'], '')) : 1;
$is_self_catered = $what == 2;
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:31,代码来源:custom-search-results.php

示例2: render_price_range_section

    function render_price_range_section($what, $price_per_person_label_text, $price_per_night_label_text, $price_per_day_label_text)
    {
        global $byt_theme_globals;
        $price_decimal_places = $byt_theme_globals->get_price_decimal_places();
        $default_currency_symbol = $byt_theme_globals->get_default_currency_symbol();
        $show_currency_symbol_after = $byt_theme_globals->show_currency_symbol_after();
        $request_type_ids = array();
        if (isset($_GET['price'])) {
            $request_type_ids = BYT_Theme_Utils::retrieve_array_of_values_from_query_string('price', true);
        }
        $price_range_bottom = $byt_theme_globals->get_price_range_bottom();
        $price_range_increment = $byt_theme_globals->get_price_range_increment();
        $price_range_count = $byt_theme_globals->get_price_range_count();
        if ($price_range_count > 0) {
            ?>
			<div class="column">
				<div class="price_per dt">
				<?php 
            if ($what == 1 || $what == 2) {
                echo $price_per_night_label_text;
            } elseif ($what == 3) {
                echo $price_per_day_label_text;
            } elseif ($what == 4 || $what == 5) {
                echo $price_per_person_label_text;
            }
            ?>
				</div>
				<div class="dd">
				<?php 
            $bottom = 0;
            $top = 0;
            $out = '';
            for ($i = 0; $i < $price_range_count; $i++) {
                $price_index = $i + 1;
                $checked = '';
                if (in_array($price_index, $request_type_ids)) {
                    $checked = " checked='checked' ";
                }
                ?>
					<div class="checkbox">
						<input <?php 
                echo $checked;
                ?>
 type="checkbox" id="price<?php 
                echo esc_attr($price_index);
                ?>
" name="price[]" value="<?php 
                echo esc_attr($price_index);
                ?>
" />
						<label for="price<?php 
                echo $price_index;
                ?>
">
						<?php 
                $bottom = $i * $price_range_increment + $price_range_bottom;
                $top = $price_index * $price_range_increment + $price_range_bottom - 1;
                echo $bottom;
                if ($i == $price_range_count - 1) {
                    echo ' <span class="curr">' . $default_currency_symbol . '</span> +';
                } else {
                    echo " - " . $top . ' <span class="curr">' . $default_currency_symbol . '</span>';
                }
                ?>
						</label>
					</div>
					<?php 
            }
            ?>
				</div>
			</div>
		<?php 
        }
    }
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:74,代码来源:widget-search.php


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