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


PHP BYT_Theme_Utils::custom_array_search方法代码示例

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


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

示例1: do_action

">
		<?php 
        do_action('byt_show_single_tour_reviews_before');
        get_template_part('includes/parts/review', 'item');
        BYT_Theme_Utils::render_tab_extra_fields('tour_extra_fields', $tour_extra_fields, 'reviews', $tour_obj);
        do_action('byt_show_single_tour_reviews_after');
        ?>
	</section>
	<!--//reviews-->
	<?php 
    }
    // if ($enable_reviews)
    ?>
	<?php 
    foreach ($tab_array as $tab) {
        if (count(BYT_Theme_Utils::custom_array_search($default_tour_tabs, 'id', $tab['id'])) == 0) {
            $all_empty_fields = BYT_Theme_Utils::are_tab_fields_empty('tour_extra_fields', $tour_extra_fields, $tab['id'], $tour_obj);
            if (!$all_empty_fields) {
                ?>
			<section id="<?php 
                echo esc_attr($tab['id']);
                ?>
" class="tab-content <?php 
                echo $first_display_tab == $tab['id'] ? 'initial' : '';
                ?>
">
				<article>
					<?php 
                do_action('byt_show_single_tour_' . $tab['id'] . '_before');
                ?>
					<?php 
开发者ID:alikris,项目名称:OTA,代码行数:31,代码来源:single-tour.php

示例2: repeat_review_field_option_type

 function repeat_review_field_option_type($option_name, $option, $values)
 {
     global $byt_theme_of_default_fields;
     $counter = 0;
     $default_values = $byt_theme_of_default_fields->get_default_review_fields_array($option['id']);
     if (!is_array($values) || count($values) == 0) {
         $values = $default_values;
     }
     $post_type = '';
     if ($option['id'] == 'accommodation_review_fields') {
         $post_type = 'accommodation';
     } elseif ($option['id'] == 'tour_review_fields') {
         $post_type = 'tour';
     } elseif ($option['id'] == 'cruise_review_fields') {
         $post_type = 'cruise';
     }
     $output = '<div class="of-repeat-loop">';
     $output .= '<ul class="sortable of-repeat-review-fields">';
     if (is_array($values)) {
         foreach ((array) $values as $key => $value) {
             if (isset($value['label']) && isset($value['post_type']) && isset($value['id'])) {
                 $output .= '<li class="ui-state-default of-repeat-group">';
                 $output .= '<input data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" class="input-field-id" name="' . esc_attr($option_name . '[' . $option['id'] . '][' . $counter . '][id]') . '" type="hidden" value="' . esc_attr($value['id']) . '" />';
                 $output .= '<input data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" name="' . esc_attr($option_name . '[' . $option['id'] . '][' . $counter . '][post_type]') . '" type="hidden" value="' . $post_type . '" />';
                 $output .= '<div class="of-input-wrap">';
                 $output .= '<label data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" class="of-label label-field-label" for="' . esc_attr($option_name . '[' . $option['id'] . '][' . $counter . '][label]') . '">' . __('Field label', 'bookyourtravel') . '</label>';
                 $output .= '<input data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" class="of-input input-field-label" name="' . esc_attr($option_name . '[' . $option['id'] . '][' . $counter . '][label]') . '" type="text" value="' . esc_attr($value['label']) . '" />';
                 $output .= '</div>';
                 $output .= '<label data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" class="of-label label-hide-field" for="' . esc_attr($option_name . '[' . $option['id'] . '][' . $counter . '][hide]') . '">' . __('Is hidden?', 'bookyourtravel') . '</label>';
                 $output .= '<input data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" class="of-checkbox checkbox-hide-field" name="' . esc_attr($option_name . '[' . $option['id'] . '][' . $counter . '][hide]') . '" type="checkbox" value="1" ' . (isset($value['hide']) && $value['hide'] == '1' ? 'checked' : '') . ' />';
                 if (isset($value['id']) && isset($value['label']) && count(BYT_Theme_Utils::custom_array_search($default_values, 'id', $value['id'])) == 0) {
                     $output .= '<span class="ui-icon ui-icon-close"></span>';
                 }
                 $output .= '</li><!--.of-repeat-group-->';
                 $counter++;
             }
         }
     }
     $output .= '<li class="to-copy ui-state-default of-repeat-group">';
     $output .= '<input class="input-post-type" data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" type="hidden" value="' . $post_type . '" />';
     $output .= '<div class="of-input-wrap">';
     $output .= '<label class="of-label label-field-label" for="' . esc_attr($option_name . '[' . $option['id'] . ']') . '">' . __('Field label', 'bookyourtravel') . '</label>';
     $output .= '<input class="of-input input-field-label" data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" type="text" value="' . esc_attr($option['std']) . '" />';
     $output .= '</div>';
     $output .= '<label class="of-label label-hide-field" for="' . esc_attr($option_name . '[' . $option['id'] . ']') . '">' . __('Is hidden?', 'bookyourtravel') . '</label>';
     $output .= '<input class="of-checkbox checkbox-hide-field" data-rel="' . esc_attr($option_name . '[' . $option['id'] . ']') . '" type="checkbox" value="1" />';
     $output .= '<span class="ui-icon ui-icon-close"></span>';
     $output .= '</li><!--.of-repeat-group-->';
     $output .= '</ul><!--.sortable-->';
     $output .= '<a href="#" class="docopy_review_field button icon add">' . __('Add review field', 'bookyourtravel') . '</a>';
     $output .= '</div><!--.of-repeat-loop-->';
     return $output;
 }
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:53,代码来源:theme_of_custom.php

示例3: custom_array_search

 public static function custom_array_search($array, $key, $value)
 {
     $results = array();
     if (is_array($array)) {
         if (isset($array[$key]) && $array[$key] == $value) {
             $results[] = $array;
         }
         foreach ($array as $subarray) {
             $results = array_merge($results, BYT_Theme_Utils::custom_array_search($subarray, $key, $value));
         }
     }
     return $results;
 }
开发者ID:alikris,项目名称:OTA,代码行数:13,代码来源:theme_utils.php

示例4:

    ?>
">
		<article>
			<?php 
    do_action('byt_show_single_accommodation_facilites_before');
    ?>
			<?php 
    $facilities = $accommodation_obj->get_facilities();
    if ($facilities && count($facilities) > 0) {
        ?>
			<h1><?php 
        _e('Facilities', 'bookyourtravel');
        ?>
</h1>
			<div class="text-wrap">	
				<ul class="three-col">
				<?php 
        for ($i = 0; $i < count($facilities); $i++) {
            $accommodation_facility = $facilities[$i];
            echo '<li>' . $accommodation_facility->name . '</li>';
        }
        ?>
					
				</ul>
			</div>
			<?php 
    }
    // endif (!empty($accommodation_facilities))
    ?>
			
			<?php 
开发者ID:JDjimenezdelgado,项目名称:old-mmexperience,代码行数:31,代码来源:single-accommodation.php


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