本文整理汇总了PHP中BYT_Theme_Utils::render_field方法的典型用法代码示例。如果您正苦于以下问题:PHP BYT_Theme_Utils::render_field方法的具体用法?PHP BYT_Theme_Utils::render_field怎么用?PHP BYT_Theme_Utils::render_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BYT_Theme_Utils
的用法示例。
在下文中一共展示了BYT_Theme_Utils::render_field方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
?>
<aside id="secondary" class="right-sidebar widget-area" role="complementary">
<ul>
<li>
<article class="tour-details clearfix">
<h1><?php
echo $car_rental_obj->get_title();
?>
</h1>
<span class="address"><?php
echo $pick_up_location_title;
?>
</span>
<?php
BYT_Theme_Utils::render_field("description", "", "", BYT_Theme_Utils::strip_tags_and_shorten($car_rental_obj->get_description(), 100), "", true);
?>
<?php
$tags = $car_rental_obj->get_tags();
if (count($tags) > 0) {
?>
<div class="tags">
<ul>
<?php
foreach ($tags as $tag) {
echo '<li>' . $tag->name . '</li>';
}
?>
</ul>
</div>
示例2: do_action
">
<article>
<?php
do_action('byt_show_single_accommodation_description_before');
BYT_Theme_Utils::render_field("text-wrap", "", "", $accommodation_obj->get_description(), __('General', 'bookyourtravel'), false, false, false);
BYT_Theme_Utils::render_field("text-wrap", "", "", $check_in_time, __('Check-in time', 'bookyourtravel'), false, false, false);
BYT_Theme_Utils::render_field("text-wrap", "", "", $check_out_time, __('Check-out time', 'bookyourtravel'), false, false, false);
BYT_Theme_Utils::render_tab_extra_fields('accommodation_extra_fields', $accommodation_extra_fields, 'description', $accommodation_obj);
do_action('byt_show_single_accommodation_description_after');
?>
</article>
</section>
<!--//description-->
<!--facilities-->
<section id="facilities" class="tab-content <?php
echo $first_display_tab == 'facilities' ? 'initial' : '';
?>
">
<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">
示例3: foreach
</span>
<?php
}
?>
<?php
if ($score_out_of_10 > 0) {
?>
<span class="rating"><?php
echo $score_out_of_10;
?>
/ 10</span><?php
}
?>
<?php
BYT_Theme_Utils::render_field("description", "", "", BYT_Theme_Utils::strip_tags_and_shorten($accommodation_obj->get_description(), 100), "", true);
?>
<?php
$tags = $accommodation_obj->get_tags();
if (count($tags) > 0) {
?>
<div class="tags">
<ul>
<?php
foreach ($tags as $tag) {
echo '<li>' . $tag->name . '</li>';
}
?>
</ul>
</div>
示例4: do_action
<!--//description-->
<!--availability-->
<section id="availability" class="tab-content <?php
echo $first_display_tab == 'availability' ? 'initial' : '';
?>
">
<article>
<?php
do_action('byt_show_single_tour_availability_before');
?>
<h1><?php
_e('Available departures', 'bookyourtravel');
?>
</h1>
<?php
BYT_Theme_Utils::render_field("text-wrap", "", "", $tour_obj->get_custom_field('availability_text'), '', false, true);
?>
<form id="launch-tour-booking" action="#" method="POST">
<div class="text-wrap">
<?php
if ($tour_obj->get_type_is_repeated() == 1) {
echo __('<p>This is a daily tour.</p>', 'bookyourtravel');
} else {
if ($tour_obj->get_type_is_repeated() == 2) {
echo __('<p>This tour is repeated every weekday (working day).</p>', 'bookyourtravel');
} else {
if ($tour_obj->get_type_is_repeated() == 3) {
echo sprintf(__('<p>This tour is repeated every week on a %s.</p>', 'bookyourtravel'), $tour_obj->get_type_day_of_week_day());
}
}
}
示例5: __
BYT_Theme_Utils::render_field("max_people", "", __('Max people', 'bookyourtravel'), $car_rental_obj->get_custom_field('max_count'), '', false, true);
?>
<?php
BYT_Theme_Utils::render_field("door_count", "", __('Door count', 'bookyourtravel'), $car_rental_obj->get_custom_field('number_of_doors'), '', false, true);
?>
<?php
BYT_Theme_Utils::render_field("min_age", "", __('Minimum driver age', 'bookyourtravel'), $car_rental_obj->get_custom_field('min_age'), '', false, true);
?>
<?php
BYT_Theme_Utils::render_field("transmission", "", __('Transmission', 'bookyourtravel'), $car_rental_obj->get_custom_field('transmission_type') == 'manual' ? __('Manual', 'bookyourtravel') : __('Automatic', 'bookyourtravel'), '', false, true);
?>
<?php
BYT_Theme_Utils::render_field("air_conditioned", "", __('Air-conditioned?', 'bookyourtravel'), $car_rental_obj->get_custom_field('is_air_conditioned') ? __('Yes', 'bookyourtravel') : __('No', 'bookyourtravel'), '', false, true);
?>
<?php
BYT_Theme_Utils::render_field("unlimited_mileage", "", __('Unlimited mileage?', 'bookyourtravel'), $car_rental_obj->get_custom_field('is_unlimited_mileage') ? __('Yes', 'bookyourtravel') : __('No', 'bookyourtravel'), '', false, true);
?>
</div>
<?php
echo "<div class='actions'>";
BYT_Theme_Utils::render_link_button($car_rental_obj->get_permalink(), "gradient-button", "", __('Book now', 'bookyourtravel'));
echo "</div>";
?>
</div>
</div>
</article>
<!--//car rental item-->
<?php
} else {
?>
<li>
示例6: number_format_i18n
?>
<p>
<?php
$price_string = '';
if (!$show_currency_symbol_after) {
$price_string = '<span class="curr">' . $default_currency_symbol . '</span>';
$price_string .= '<span class="amount">' . number_format_i18n($tour_min_price, $price_decimal_places) . '</span>';
} else {
$price_string = '<span class="amount">' . number_format_i18n($tour_min_price, $price_decimal_places) . '</span>';
$price_string .= '<span class="curr">' . $default_currency_symbol . '</span>';
}
if (!$is_price_per_group) {
echo sprintf(__('From %s per person', 'bookyourtravel'), $price_string);
} else {
echo sprintf(__('From %s per group', 'bookyourtravel'), $price_string);
}
?>
</p>
<?php
}
?>
<?php
if ($score_out_of_10 > 0) {
// display score out of 10
BYT_Theme_Utils::render_field("", "rating", $score_out_of_10 . ' / 10', "", '', false, false);
}
?>
</a>
</li>
<?php
}
示例7: do_action
<section id="locations" class="tab-content <?php
echo $first_display_tab == 'locations' ? 'initial' : '';
?>
">
<article>
<?php
do_action('byt_show_single_cruise_locations_before');
?>
<?php
foreach ($cruise_locations as $location_id) {
$location_obj = new byt_location((int) $location_id);
$location_title = $location_obj->get_title();
$location_excerpt = $location_obj->get_excerpt();
if (!empty($location_title) && !empty($location_excerpt)) {
BYT_Theme_Utils::render_field("", "", "", BYT_Theme_Utils::render_image('', '', $location_obj->get_main_image(), $location_title, $location_title, false) . $location_excerpt, $location_title);
BYT_Theme_Utils::render_link_button(get_permalink($location_obj->get_id()), "gradient-button right", "", __('Read more', 'bookyourtravel'));
}
}
?>
<?php
BYT_Theme_Utils::render_tab_extra_fields('cruise_extra_fields', $cruise_extra_fields, 'locations', $cruise_obj);
?>
<?php
do_action('byt_show_single_cruise_locations_after');
?>
</article>
</section>
<!--//locations-->
<?php
示例8: __
if ($enable_accommodations) {
if ($show_hotel_count_in_location_items) {
BYT_Theme_Utils::render_field("", "count", $hotel_count . ' ' . __('Hotels', 'bookyourtravel'), '', '', false);
}
if ($show_self_catered_count_in_location_items) {
BYT_Theme_Utils::render_field("", "count", $self_catered_count . ' ' . __('Self-catered', 'bookyourtravel'), '', '', false);
}
}
if ($enable_tours && $show_tour_count_in_location_items) {
BYT_Theme_Utils::render_field("", "count", $tour_count . ' ' . __('Tours', 'bookyourtravel'), '', '', false);
}
if ($enable_cruises && $show_cruise_count_in_location_items) {
BYT_Theme_Utils::render_field("", "count", $cruise_count . ' ' . __('Cruises', 'bookyourtravel'), '', '', false);
}
if ($enable_car_rentals && $show_car_rental_count_in_location_items) {
BYT_Theme_Utils::render_field("", "count", $car_rental_count . ' ' . __('Car rentals', 'bookyourtravel'), '', '', false);
}
if ($accommodation_min_price > 0 && ($hotel_count || $self_catered_count)) {
?>
<div class="ribbon">
<div class="half hotel">
<a href="<?php
echo esc_url($location_obj->get_permalink());
?>
#hotels" title="<?php
esc_attr_e('View all', 'bookyourtravel');
?>
">
<span class="small"><?php
_e('from', 'bookyourtravel');
?>
示例9: render_tab_extra_fields
/**
* Function that renders all extra fields tied to an entity tab, as labeled field in the form of
* <div class="container_css_class">
* <span class="label_css_class">$label_text</span> $field_value
* </div>
*/
public static function render_tab_extra_fields($option_id, $extra_fields, $tab_id, $entity_obj, $container_class = "text-wrap", $label_is_header = true, $id_is_css_class = false, $container_is_tr = false)
{
global $byt_theme_of_custom;
$extra_fields = BYT_Theme_Utils::custom_array_search($extra_fields, 'tab_id', $tab_id);
if (is_array($extra_fields)) {
foreach ($extra_fields as $extra_field) {
$field_is_hidden = isset($extra_field['hide']) ? intval($extra_field['hide']) : 0;
if (!$field_is_hidden) {
$field_id = isset($extra_field['id']) ? $extra_field['id'] : '';
$field_label = isset($extra_field['label']) ? $extra_field['label'] : '';
$field_label = $byt_theme_of_custom->get_translated_dynamic_string($byt_theme_of_custom->get_option_id_context($option_id) . ' ' . $field_label, $field_label);
$field_type = isset($extra_field['type']) ? $extra_field['type'] : '';
if ($field_type == 'text' || $field_type == 'textarea') {
if (!empty($field_id) && !empty($field_label)) {
if ($id_is_css_class) {
$container_class = $field_id;
}
if ($label_is_header) {
BYT_Theme_Utils::render_field($container_class, "", "", $entity_obj->get_custom_field($field_id), $field_label, false, true, $container_is_tr);
} else {
BYT_Theme_Utils::render_field($container_class, "", $field_label, $entity_obj->get_custom_field($field_id), "", false, true, $container_is_tr);
}
}
} elseif ($field_type == 'image') {
$field_image_uri = $entity_obj->get_custom_field_image_uri($field_id, 'medium');
echo '<img src="' . $field_image_uri . '" alt="' . $field_label . '" />';
}
}
}
}
}
示例10: __
BYT_Theme_Utils::render_link_button($submit_room_types_url . "?fesid=" . $post->ID, "gradient-button", "", __('Edit', 'bookyourtravel'));
?>
</div>
</div>
<div class="more-information">
<?php
BYT_Theme_Utils::render_field('', '', __('Room facilities:', 'bookyourtravel'), $room_type_obj->get_facilities_string(), '', true, true);
?>
<?php
echo $room_type_obj->get_description();
?>
<?php
BYT_Theme_Utils::render_field('', '', __('Bed size:', 'bookyourtravel'), $room_type_obj->get_custom_field('bed_size'), '', true, true);
?>
<?php
BYT_Theme_Utils::render_field('', '', __('Room size:', 'bookyourtravel'), $room_type_obj->get_custom_field('room_size'), '', true, true);
?>
</div>
</li>
<?php
}
?>
</ul>
<?php
} else {
echo '<p>' . __('You have not submitted any room types yet.', 'bookyourtravel') . '</p>';
}
?>
</article>
</section>