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


PHP TravelHelper::handle_icon方法代码示例

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


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

示例1: product_cat_column

 public function product_cat_column($columns, $column, $id)
 {
     if ($column == 'icon') {
         $icon = get_tax_meta($id, 'st_icon');
         $columns .= '<i style="font-size:24px" class="' . TravelHelper::handle_icon($icon) . '"></i>';
     }
     return $columns;
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:8,代码来源:class.attributes.php

示例2: st

            <?php 
$is_sale = STRental::is_sale();
$orgin_price = STRental::get_orgin_price();
$price = STRental::get_price();
$show_price = st()->get_option('show_price_free');
?>
            <?php 
$features = get_post_meta(get_the_ID(), 'fetures', true);
if (!empty($features)) {
    ?>
                <?php 
    echo '<ul class="booking-item-features booking-item-features-rentals booking-item-features-sign clearfix mt5 mb5">';
    foreach ($features as $key => $value) {
        $d = array('icon' => '', 'title' => '');
        $value = wp_parse_args($value, $d);
        echo '<li rel="tooltip" data-placement="top" title="" data-original-title="' . $value['title'] . '"><i class="' . TravelHelper::handle_icon($value['icon']) . '"></i>';
        if ($value['number']) {
            echo '<span class="booking-item-feature-sign">x ' . $value['number'] . '</span>';
        }
        echo '</li>';
    }
    echo "</ul>";
    ?>
            <?php 
}
?>

            <p class="mb0 text-darken item_price_map">
                <?php 
if ($is_sale) {
    echo "<span class='booking-item-old-price'>" . TravelHelper::format_money($orgin_price) . "</span>";
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:rental.php

示例3: foreach

                <ul class="booking-item-features booking-item-features-expand mb30 clearfix">
                    <?php 
            foreach ($terms as $key2 => $value2) {
                ?>
                        <li class="<?php 
                if ($item_col) {
                    echo 'col-sm-' . $item_col;
                }
                ?>
">
                            <?php 
                if (function_exists('get_tax_meta')) {
                    ?>
                                <i class="<?php 
                    echo TravelHelper::handle_icon(get_tax_meta($value2->term_id, 'st_icon'));
                    ?>
"></i>
                            <?php 
                }
                ?>
                            <span class="booking-item-feature-title"><?php 
                echo esc_html($value2->name);
                ?>
</span>
                        </li>
                    <?php 
            }
            ?>

                </ul>
开发者ID:DaddyFool,项目名称:travelTest,代码行数:30,代码来源:attribute.php

示例4: _e

                                        <div class="row">
                                            <div class="col-md-3">
                                                <div class="checkbox-inline checkbox-stroke">
                                                    <label for="check_all">
                                                        <i class="fa fa-cogs"></i>
                                                        <input name="check_all" class="i-check check_all"
                                                               type="checkbox"/><?php 
            _e("All", ST_TEXTDOMAIN);
            ?>
                                                    </label>
                                                </div>
                                            </div>
                                            <?php 
            foreach ($category as $k => $v) {
                $icon = get_tax_meta($k, 'st_icon');
                $icon = TravelHelper::handle_icon($icon);
                $check = '';
                if (STUser_f::st_check_post_term_partner($post_id, $value, $k) == true) {
                    $check = 'checked';
                }
                ?>
                                                <div class="col-md-3">
                                                    <div class="checkbox-inline checkbox-stroke">
                                                        <label for="taxonomy">
                                                            <i class="<?php 
                echo esc_html($icon);
                ?>
"></i>
                                                            <input name="taxonomy[]" class="i-check item_tanoxomy"
                                                                   type="checkbox" <?php 
                echo esc_html($check);
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:user-edit-hotel.php

示例5:

                                if (!empty($v_info['cars_equipment_taxonomy_id'])) {
                                    if ($v->term_id == $v_info['cars_equipment_taxonomy_id']) {
                                        $dk_check = true;
                                        $data_info = $v_info['cars_equipment_taxonomy_info'];
                                        $data_title_info = "";
                                        if (!empty($v_info['title'])) {
                                            $data_title_info = $v_info['title'];
                                        }
                                    }
                                }
                            }
                        }
                        if ($i < $limit) {
                            if ($dk_check == true) {
                                echo '<li title="" data-placement="top" rel="tooltip" data-original-title="' . $data_title_info . '">
                                                                        <i class="' . TravelHelper::handle_icon(get_tax_meta($v->term_id, 'st_icon', true)) . '"></i>
                                                                        <span class="booking-item-feature-sign">' . $data_info . '</span>
                                                                    </li>';
                            } else {
                                /*echo '<li title="" data-placement="top" rel="tooltip" data-original-title="'.esc_html($v->name).'">
                                        <i class="'.TravelHelper::handle_icon(get_tax_meta($v->term_id, 'st_icon',true)).'"></i>
                                  </li>';*/
                            }
                        }
                        $i++;
                    }
                }
            }
        }
    }
}
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:attribute-grid.php

示例6: st

            <div class="row">
                <div class="col-md-8">
                    <?php 
echo st()->load_template('/cars/elements/attribute-list');
?>
                </div>
                <div class="col-md-4">
                    <ul class="booking-item-features booking-item-features-dark">
                        <?php 
$data_terms = get_the_terms(get_the_ID(), 'st_cars_pickup_features');
if (!empty($data_terms)) {
    foreach ($data_terms as $k => $v) {
        $icon = get_tax_meta($v->term_id, 'st_icon', true);
        if (!empty($icon)) {
            echo '<li title="" data-placement="top" rel="tooltip" data-original-title="' . $v->name . '">
                                                           <i class="' . TravelHelper::handle_icon($icon) . '"></i>
                                                         </li>';
        }
    }
}
?>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-3">
                <span class="booking-item-price">
                    <?php 
$info_price = STCars::get_info_price();
$cars_price = $info_price['price'];
$count_sale = $info_price['discount'];
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:loop-1.php

示例7: get_list_value_taxonomy

 static function get_list_value_taxonomy($post_type)
 {
     $data_value = array();
     $taxonomy = get_object_taxonomies($post_type, 'object');
     foreach ($taxonomy as $key => $value) {
         if ($key != 'st_category_cars') {
             if ($key != 'st_cars_pickup_features') {
                 if ($key != 'cabin_type') {
                     if ($key != 'room_type') {
                         $args = array('hide_empty' => 0);
                         $data_term = get_terms($key, $args);
                         if (!empty($data_term)) {
                             foreach ($data_term as $k => $v) {
                                 $icon = get_tax_meta($v->term_id, 'st_icon');
                                 $icon = TravelHelper::handle_icon($icon);
                                 array_push($data_value, array('value' => $v->term_id, 'label' => $v->name, 'taxonomy' => $v->taxonomy, 'icon' => $icon));
                             }
                         }
                     }
                 }
             }
         }
     }
     return $data_value;
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:25,代码来源:class.user.php

示例8: explode

<?php

if (!empty($taxonomy)) {
    $taxonomy = explode(",", $taxonomy);
    foreach ($taxonomy as $key => $value) {
        $html = "";
        $data_term = get_the_terms(get_the_ID(), $value, true);
        if (!empty($data_term)) {
            foreach ($data_term as $k => $v) {
                $icon = TravelHelper::handle_icon(get_tax_meta($v->term_id, 'st_icon', true));
                if (empty($icon)) {
                    $icon = "fa fa-cogs";
                }
                $html .= '<li title="" data-placement="top" rel="tooltip" data-original-title="' . esc_html($v->name) . '">
                                                                            <i class="' . $icon . '"></i>
                                                                      </li>';
            }
        }
        echo '<ul class="booking-item-features booking-item-features-small clearfix">' . balanceTags($html) . '</ul>';
    }
}
开发者ID:DaddyFool,项目名称:travelTest,代码行数:21,代码来源:attribute-list.php

示例9: esc_attr

" alt="img">
            <?php 
}
?>
        </div>
        <div class="promotion_bg <?php 
echo esc_attr($class_opacity);
?>
 <?php 
echo esc_attr($class_bg_color);
?>
"></div>
        <div class="content">
            <div class="promotion_discount">
                <i class="<?php 
echo TravelHelper::handle_icon($st_icon);
?>
"></i> <?php 
echo esc_attr($st_discount);
?>
% <?php 
_e('Off', ST_TEXTDOMAIN);
?>
            </div>
            <div class="promotion_title">
                <?php 
echo esc_attr($st_title);
?>
            </div>
            <div class="promotion_sub">
                <?php 
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:html.php

示例10: get_post_meta

    ?>
</strong>
				</div>
				<div class="col-xs-7 col-sm-9">
					<div class="row">
						<?php 
    $other_facility = get_post_meta(get_the_ID(), 'add_new_facility', true);
    foreach ($other_facility as $item) {
        ?>
						<div class="col-xs-12 col-sm-6 sub-item">
							
							<span><?php 
        if (!empty($item['facility_icon'])) {
            ?>
<i class="<?php 
            echo TravelHelper::handle_icon($item['facility_icon']);
            ?>
 mr5"></i><?php 
        }
        echo $item['title'];
        ?>
: <strong><?php 
        echo $item['value'];
        ?>
</strong></span>
						</div>

						<?php 
    }
    ?>
					</div>
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:st_rental_room_facility.php


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