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


PHP TravelHelper::rate_to_string方法代码示例

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


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

示例1: foreach

    foreach ($gallery as $key => $value) {
        $img_link = wp_get_attachment_image_src($value, array(800, 600, 'bfi_thumb' => TRUE));
        if (isset($img_link[0])) {
            echo "<a class='st-gp-item' href='{$img_link[0]}'></a>";
        }
    }
}
?>
                </div>
            </div>
        </header>
        <div class="thumb-caption">
            <ul class="icon-group text-tiny text-color">
                <?php 
$avg = STReview::get_avg_rate();
echo TravelHelper::rate_to_string($avg);
?>
            </ul>
            <h5 class="thumb-title"><a class="text-darken"
                                       href="<?php 
echo esc_url($link);
?>
"><?php 
the_title();
?>
</a></h5>
            <?php 
if ($address = get_post_meta(get_the_ID(), 'address', TRUE)) {
    ?>
                <p class="mb0">
                    <small> <?php 
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:rental.php

示例2: _e

            </div>
            <div class="row mt10">
                <div class="col-md-6 col-sm-6 col-xs-6">
                   <p class="mb0 text-darken">
                       <i class="fa fa-money">&nbsp;</i>
                       <?php 
_e('Price', ST_TEXTDOMAIN);
?>
:
                      <span> <?php 
echo STHoliday::get_price_html(false, false, ' <br> -');
?>
</span>
                   </p>
                </div>
                <div class="col-md-6 col-sm-6 col-xs-6 text-right">
                    <i class="fa fa-thumbs-o-up icon-like"> &nbsp;</i>
                    <ul class="icon-group  text-color pull-right">
                        <?php 
echo TravelHelper::rate_to_string(STReview::get_avg_rate());
?>
                    </ul>

                </div>
            </div>
        </div>
    </div>
    <div class="gap"></div>
</div>

开发者ID:DaddyFool,项目名称:travelTest,代码行数:29,代码来源:holiday.php

示例3: st

        $view_star_review = st()->get_option('view_star_review', 'review');
        if ($view_star_review == 'review') {
            ?>
                        <ul class="icon-group text-color">
                            <?php 
            $avg = STReview::get_avg_rate();
            echo TravelHelper::rate_to_string($avg);
            ?>
                        </ul>
                        <?php 
        } elseif ($view_star_review == 'star') {
            ?>
                            <ul class="icon-list icon-group booking-item-rating-stars">
                                <?php 
            $star = STHotel::getStar();
            echo TravelHelper::rate_to_string($star);
            ?>
                            </ul>
                             
                        <?php 
        }
        ?>
                        <h5 class="thumb-title"><a class="text-darken"
                                                   href="<?php 
        echo esc_url($link);
        ?>
"><?php 
        the_title();
        ?>
</a></h5>
                        <?php 
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:31,代码来源:loop.php

示例4: esc_attr

                <?php 
    }
    ?>

                <?php 
    if ($comment_rate = get_comment_meta(get_comment_ID(), 'comment_rate', true)) {
        ?>
                    <ul class="icon-group booking-item-rating-stars" data-rate="<?php 
        echo esc_attr($comment_rate);
        ?>
">
                        <?php 
        if (!$comment_rate) {
            $comment_rate = 1;
        }
        echo TravelHelper::rate_to_string($comment_rate);
        ?>

                    </ul>
                <?php 
    }
    ?>

                <?php 
    if ('0' == $comment->comment_approved) {
        ?>
                    <p class="alert alert-danger comment-awaiting-moderation"><?php 
        st_the_language('your_comment_is_awaiting_moderation');
        ?>
</p>
                <?php 
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:review-list.php

示例5: while

while ($query->have_posts()) {
    $query->the_post();
    $info_room = $info_room[0];
    $price = STRental::get_price($info_room->ID);
    $price = TravelHelper::format_money($price);
    $date = date('l d M', strtotime(get_post_meta($info_room->ID, 'sale_price_from', true))) . " - " . date('l d M', strtotime(get_post_meta($info_room->ID, 'sale_price_to', true)));
    $txt = '<div class="text-center text-white">
                        <h2 class="text-uc mb20">' . STLanguage::st_get_language('last_minute_deal') . '</h2>';
    $view_star_review = st()->get_option('view_star_review', 'review');
    if ($view_star_review == 'review') {
        $txt .= ' <ul class="icon-list list-inline-block mb0 last-minute-rating">
                            ' . TravelHelper::rate_to_string(STReview::get_avg_rate()) . '
                        </ul>';
    } elseif ($view_star_review == 'star') {
        $txt .= '<ul class="icon-list list-inline-block mb0 last-minute-rating">';
        $star = STHotel::getStar();
        $txt .= TravelHelper::rate_to_string($star);
        $txt .= '</ul>';
    }
    $txt .= '<h5 class="last-minute-title">' . get_the_title() . ' - ' . $info_room->post_title . ' </h5>

                        <p class="last-minute-date">' . $date . '</p>
                        <p class="mb20">
                             <b>' . $price . '</b> / ' . STLanguage::st_get_language('night') . '
                        </p>
                        <a href="' . get_the_permalink() . '" class="btn btn-lg btn-white btn-ghost">
                           ' . STLanguage::st_get_language('book_now') . '<i class="fa fa-angle-right"></i>
                        </a>
                    </div>';
    echo balanceTags($txt);
}
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:31,代码来源:loop-bg_last_minute_deal.php

示例6: get_the_post_thumbnail

        ?>
        <a class="booking-item-payment-img" href="#">
            <?php 
        echo get_the_post_thumbnail($id_activity, array(98, 74, 'bfi_thumb' => true));
        ?>
        </a>
        <h5 class="booking-item-payment-title"><a href="<?php 
        echo get_permalink($id_activity);
        ?>
"><?php 
        echo get_the_title($id_activity);
        ?>
</a></h5>
        <ul class="icon-group booking-item-rating-stars">
            <?php 
        echo TravelHelper::rate_to_string(STReview::get_avg_rate($id_activity));
        ?>
        </ul>
        <?php 
    } else {
        st_the_language('sorry_activity_not_found');
    }
    ?>
    </header>
    <ul class="booking-item-payment-details">
        <?php 
    if (!empty($check_in) and !empty($check_out)) {
        ?>
        <li>
            <h5><?php 
        st_the_language('activity');
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:31,代码来源:cart_item_html.php

示例7: the_title

			<h6 class="text-color"><?php 
the_title();
?>
</h6>
			<?php 
if ($hotel_id && intval($hotel_id)) {
    echo '<div class="pull-left" style="margin-right: 20px;"><strong>' . __('in', ST_TEXTDOMAIN) . '<a class="ml5" href="' . get_the_permalink($hotel_id) . '" title="">' . get_the_title($hotel_id) . '</a></strong></div>';
    $hotel_star = get_post_meta($hotel_id, 'hotel_star', true);
    if (!empty($hotel_star)) {
        $hotel_star = intval($hotel_star);
        ?>
						
						<div class="booking-item-rating" style="border:none">
					        <ul class="icon-group booking-item-rating-stars">
					            <?php 
        echo TravelHelper::rate_to_string($hotel_star) . ' &nbsp(' . $hotel_star . ')';
        ?>
					        </ul>
				    	</div>
						<?php 
    }
}
?>
		</div>
	</div>
</div>

<script>
	jQuery(document).ready(function($) {
		var lat = $('.st-room-map').data('lat');
		var lng = $('.st-room-map').data('lng');
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:room_map.php

示例8: get_the_post_thumbnail

        ?>
        <a class="booking-item-payment-img" href="#">
            <?php 
        echo get_the_post_thumbnail($holiday_id, array(98, 74, 'bfi_thumb' => true));
        ?>
        </a>
        <h5 class="booking-item-payment-title"><a href="<?php 
        echo get_permalink($holiday_id);
        ?>
"><?php 
        echo get_the_title($holiday_id);
        ?>
</a></h5>
        <ul class="icon-group booking-item-rating-stars">
            <?php 
        echo TravelHelper::rate_to_string(STReview::get_avg_rate($holiday_id));
        ?>
        </ul>
        <?php 
    } else {
        st_the_language('sorry_holiday_not_found');
    }
    ?>
    </header>
    <ul class="booking-item-payment-details">
        <li>
            <h5><?php 
    st_the_language('holidays_information');
    ?>
</h5>
            <p class="booking-item-payment-item-title"><?php 
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:cart_item_html.php


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