本文整理汇总了PHP中st_get_language函数的典型用法代码示例。如果您正苦于以下问题:PHP st_get_language函数的具体用法?PHP st_get_language怎么用?PHP st_get_language使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了st_get_language函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _enqueue_data
static function _enqueue_data()
{
//'Most recent booking for this property was 15 minute ago .Most recent booking for this property was 15 minute ago'
if (!self::$is_working) {
return;
}
$data = array();
if (is_singular()) {
$post_type = get_post_type();
$book_able = array('st_hotel', 'st_cars', 'st_tours', 'st_activity', 'st_rental', 'cruise');
if (!in_array($post_type, $book_able)) {
return;
}
$label = get_post_type_object($post_type);
$demo_mode = st()->get_option('edv_enable_demo_mode', 'off');
if (st()->get_option('enable_user_online_noti', 'on') == 'on') {
if ($demo_mode == 'on') {
$data['noty'][] = array('icon' => 'home', 'message' => sprintf(st_get_language('now_s_users_seeing_this_s'), rand(300, 5000), $label->labels->singular_name), 'type' => 'success');
} else {
$data['noty'][] = array('icon' => 'home', 'message' => sprintf(st_get_language('now_s_users_seeing_this_s'), self::get_user_online(get_the_ID()), $label->labels->singular_name), 'type' => 'success');
}
}
if (st()->get_option('enable_last_booking_noti', 'on') == 'on') {
if ($demo_mode == 'on') {
$data['noty'][] = array('icon' => 'clock-o', 'message' => sprintf(st_get_language('most_revent_booking_for_this_s_was_s'), $label->labels->singular_name, sprintf(__('%s minutes ago', ST_TEXTDOMAIN), rand(2, 50))), 'type' => 'warning');
} else {
$data['noty'][] = array('icon' => 'clock-o', 'message' => sprintf(st_get_language('most_revent_booking_for_this_s_was_s'), $label->labels->singular_name, TravelerObject::get_last_booking_string(get_the_ID())), 'type' => 'warning');
}
}
$data['noti_position'] = st()->get_option('noti_position', 'topRight');
}
wp_localize_script('jquery', 'stanalytics', $data);
}
示例2: _init_post_type
/**
*
*
* @since 1.1.3
* */
function _init_post_type()
{
if (!st_check_service_available($this->post_type)) {
return;
}
if (!function_exists('st_reg_post_type')) {
return;
}
// Cars ==============================================================
$labels = array('name' => __('Cars', ST_TEXTDOMAIN), 'singular_name' => __('Car', ST_TEXTDOMAIN), 'menu_name' => __('Cars', ST_TEXTDOMAIN), 'name_admin_bar' => __('Car', ST_TEXTDOMAIN), 'add_new' => __('Add New', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Car', ST_TEXTDOMAIN), 'new_item' => __('New Car', ST_TEXTDOMAIN), 'edit_item' => __('Edit Car', ST_TEXTDOMAIN), 'view_item' => __('View Car', ST_TEXTDOMAIN), 'all_items' => __('All Cars', ST_TEXTDOMAIN), 'search_items' => __('Search Cars', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Cars:', ST_TEXTDOMAIN), 'not_found' => __('No Cars found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No Cars found in Trash.', ST_TEXTDOMAIN));
$args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => get_option('car_permalink', 'st_car')), 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => false, 'supports' => array('author', 'title', 'editor', 'excerpt', 'thumbnail', 'comments'), 'menu_icon' => 'dashicons-dashboard-st');
st_reg_post_type('st_cars', $args);
// category cars
$labels = array('name' => __('Car Category', 'taxonomy general name', ST_TEXTDOMAIN), 'singular_name' => __('Car Category', 'taxonomy singular name', ST_TEXTDOMAIN), 'search_items' => __('Search Car Category', ST_TEXTDOMAIN), 'popular_items' => __('Popular Car Category', ST_TEXTDOMAIN), 'all_items' => __('All Car Category', ST_TEXTDOMAIN), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __('Edit Car Category', ST_TEXTDOMAIN), 'update_item' => __('Update Car Category', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Car Category', ST_TEXTDOMAIN), 'new_item_name' => __('New Pickup Car Category', ST_TEXTDOMAIN), 'separate_items_with_commas' => __('Separate Car Category with commas', ST_TEXTDOMAIN), 'add_or_remove_items' => __('Add or remove Car Category', ST_TEXTDOMAIN), 'choose_from_most_used' => __('Choose from the most used Car Category', ST_TEXTDOMAIN), 'not_found' => __('No Car Category found.', ST_TEXTDOMAIN), 'menu_name' => __('Car Category', ST_TEXTDOMAIN));
$args = array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug' => 'st_category_cars'));
st_reg_taxonomy('st_category_cars', 'st_cars', $args);
$labels = array('name' => st_get_language('car_pickup_features'), 'singular_name' => st_get_language('car_pickup_features'), 'search_items' => st_get_language('car_search_pickup_features'), 'popular_items' => __('Popular Pickup Features', ST_TEXTDOMAIN), 'all_items' => __('All Pickup Features', ST_TEXTDOMAIN), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __('Edit Pickup Feature', ST_TEXTDOMAIN), 'update_item' => __('Update Pickup Feature', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Pickup Feature', ST_TEXTDOMAIN), 'new_item_name' => __('New Pickup Feature Name', ST_TEXTDOMAIN), 'separate_items_with_commas' => __('Separate Pickup Features with commas', ST_TEXTDOMAIN), 'add_or_remove_items' => __('Add or remove Pickup Features', ST_TEXTDOMAIN), 'choose_from_most_used' => __('Choose from the most used Pickup Features', ST_TEXTDOMAIN), 'not_found' => __('No Pickup Features found.', ST_TEXTDOMAIN), 'menu_name' => __('Pickup Features', ST_TEXTDOMAIN));
$args = array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'update_count_callback' => '_update_post_term_count', 'query_var' => true, 'rewrite' => array('slug' => 'st_cars_pickup_features'));
st_reg_taxonomy('st_cars_pickup_features', 'st_cars', $args);
}
示例3: esc_attr
if ($is_required == 'on') {
$is_required = 'required';
}
if (!isset($field_size)) {
$field_size = 'md';
}
?>
<div class="form-group form-group-<?php
echo esc_attr($field_size);
?>
form-group-icon-left">
<label for="field-st-dropoff-address"><?php
echo esc_html($title);
?>
</label>
<i class="fa fa-map-marker input-icon input-icon-highlight"></i>
<input id="field-st-dropoff-address" name="drop-off" data-country="" <?php
echo esc_attr($is_required);
?>
value="<?php
echo STInput::get('drop-off');
?>
" class="typeahead_drop_off_address form-control <?php
echo esc_attr($is_required);
?>
" placeholder="<?php
echo $placeholder ? $placeholder : st_get_language('car_city_airport_or_us_zip_code');
?>
" type="text" />
</div>
示例4: st_the_language
*
*/
?>
<div class="st-create">
<h2><?php
st_the_language('my_room');
?>
</h2>
</div>
<ul id="" class="booking-list booking-list-wishlist ">
<?php
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('post_type' => 'hotel_room', 'post_status' => 'publish , draft , trash', 'author' => $data->ID, 'posts_per_page' => 10, 'paged' => $paged);
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
echo st()->load_template('user/loop/loop', 'room', get_object_vars($data));
}
} else {
echo '<h1>' . st_get_language('no_room') . '</h1>';
}
?>
</ul>
<?php
st_paging_nav(null, $query);
wp_reset_query();
?>
示例5: get_query_var
<?php
echo STUser_f::get_msg();
?>
</div>
<ul id="" class="booking-list booking-list-wishlist ">
<?php
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('post_type' => 'st_hotel', 'post_status' => 'publish , draft , trash', 'author' => $data->ID, 'posts_per_page' => 10, 'paged' => $paged);
$query = new WP_Query($args);
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
echo st()->load_template('user/loop/loop', 'hotel', get_object_vars($data));
}
} else {
echo '<h5>' . st_get_language('no_hotel') . '</h5>';
}
?>
</ul>
<div class="pull-left">
<?php
st_paging_nav(null, $query);
?>
</div>
<div class="pull-right">
<a class="btn btn-default pull-right" href="<?php
echo esc_url(add_query_arg('sc', 'create-hotel', get_permalink()));
?>
">
<?php
_e("Add New Hotel", ST_TEXTDOMAIN);
示例6: esc_attr
?>
"
class="form-control data_lable">
</div>
<input id="id_gallery" name="id_gallery" type="hidden" value="<?php
echo esc_attr($id_img);
?>
">
<?php
if (!empty($id_img)) {
echo '<div class="user-profile-avatar user_seting st_edit"><div>';
foreach (explode(',', $id_img) as $k => $v) {
$post_thumbnail_id = wp_get_attachment_image_src($v, 'full');
echo '<img width="300" height="300" class="avatar avatar-300 photo img-thumbnail" src="' . $post_thumbnail_id['0'] . '" alt="">';
}
echo '</div><input name="" type="button" class="btn btn-danger btn_del_gallery" value="' . st_get_language('user_delete') . '"></div>';
}
?>
<div class="st_msg"><?php
echo STUser_f::get_msg_html($validator->error('gallery'), 'danger');
?>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade " id="tab-price-setting">
<div class="row">
<div class="col-md-6">
<div class="form-group form-group-icon-left">
示例7: array
<?php
/**
* @package WordPress
* @subpackage Traveler
* @since 1.0
*
* Cars filter
*
* Created by ShineTheme
*
*/
if (!isset($instance)) {
$instance = array();
}
$default = array('title' => st_get_language('car_filter_by') . ':', 'st_search_fields' => '', 'st_style' => '');
extract(wp_parse_args($instance, $default));
$all_fields = json_decode($st_search_fields);
if ($st_style == 'dark') {
$class_side_bar = 'booking-filters text-white';
} else {
$class_side_bar = 'booking-filters booking-filters-white ';
}
?>
<aside class="cars-filters <?php
echo esc_attr($class_side_bar);
?>
<?php
if ($st_style == 'dark') {
echo 'text-white';
} else {
示例8: st_the_language
<p class="no-comments"><?php
st_the_language('comments_are_closed');
?>
</p>
<?php
}
?>
<?php
}
// have_comments()
?>
<div id="review_form_wrapper">
<div id="review_form">
<?php
$commenter = wp_get_current_commenter();
$comment_form = array('title_reply' => have_comments() ? st_get_language('add_a_comment') : st_get_language('be_the_first_to_comment') . ' “' . get_the_title() . '”', 'title_reply_to' => st_get_language('leave_a_reply_to_s'), 'comment_notes_before' => '', 'fields' => array('author' => '<div class="row">
<div class="form-group">
<div class="col-md-6">' . '<input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30" aria-required="true" class="form-control" placeholder="' . st_get_language('name') . '" />
</div> ', 'email' => '<div class="col-md-6">' . '<input placeholder="' . st_get_language('your_email_address') . '" class="form-control" id="email" name="email" type="text" value="' . esc_attr($commenter['comment_author_email']) . '" size="30" aria-required="true" /></div>
</div>
</div><!--End row-->'), 'label_submit' => st_get_language('post_comment'), 'logged_in_as' => '', 'comment_field' => '
<div class="form-group">
<textarea class="form-control" id="comment" name="comment" cols="40" rows="5" placeholder="' . st_get_language('message') . '"></textarea>
</div>
', 'comment_notes_after' => '');
comment_form(apply_filters('woocommerce_product_review_comment_form_args', $comment_form));
?>
</div>
</div>
</div><!-- #comments -->
示例9: printf
* @package WordPress
* @subpackage Traveler
* @since 1.0
*
*Content custom none
*
* Created by ShineTheme
*
*/
?>
<div class="alert alert-danger">
<?php
if (is_home() && current_user_can('publish_posts')) {
?>
<p><?php
printf(st_get_language('ready_publish_post'), esc_url(admin_url('post-new.php')));
?>
</p>
<?php
} elseif (is_search()) {
?>
<p><?php
st_the_language('sorry_but_nothing_matched_your_search_please_try_again');
?>
</p>
<?php
} else {
?>
<p><?php
st_the_language('it_seems_we_can_not_find_what_your_looking_for');
?>
示例10: st_the_language
<p class="comment-awaiting-moderation"><?php
st_the_language('your_comment_need_approved');
?>
</p>
<?php
}
?>
<div class="comment-content">
<?php
comment_text();
?>
</div>
<span class="comment-time">
<?php
echo human_time_diff(get_comment_time('U'), current_time('timestamp')) . st_get_language('_ago');
?>
</span>
<span class="comment-reply"><i class="fa fa-reply"></i>
<?php
comment_reply_link(array_merge($args, array('add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</span>
<!-- <a class="comment-like" href="#"><i class="fa fa-heart"></i> 23</a>-->
<p class="comment-like">
<?php
$review_obj = new STReview();
if ($review_obj->check_like(get_comment_ID())) {
?>
<a class="comment-like st-like-comment fa fa-heart" data-id="<?php
comment_ID();
示例11: st_the_language
?>
</h2>
<h3><?php
echo STReview::get_percent_recommend();
?>
% <small><?php
st_the_language('of_guests_recommend');
?>
</small></h3>
<div class="booking-item-rating">
<ul class="icon-list icon-group booking-item-rating-stars">
<?php
echo TravelHelper::rate_to_string($avg);
?>
</ul><span class="booking-item-rating-number"><b><?php
echo balanceTags($avg);
?>
</b> <?php
st_the_language('of_5_guest_rating');
?>
</span>
<p><a class="text-default" href="#"><?php
comments_number(st_get_language('no_review'), st_get_language('based_on_1_review'), st_get_language('based_on_s_review'));
?>
</a>
</p>
</div>
<?php
echo st()->load_template('hotel/share');
?>
</div>
示例12: STRental
*
* Created by ShineTheme
*
*/
$object = new STRental();
$nearby_posts = $object->get_near_by();
$default = array('show_title' => true, 'class' => '');
if (isset($arg)) {
extract(wp_parse_args($arg, $default));
} else {
extract($default);
}
if ($show_title) {
?>
<h4><?php
printf(st_get_language('rental_properties_near_d'), '<span class="title_nearby">' . get_the_title() . '</span>');
?>
</h4>
<?php
}
if ($nearby_posts and !empty($nearby_posts)) {
global $post;
echo "<ul class='booking-list {$class}' >";
foreach ($nearby_posts as $key => $post) {
setup_postdata($post);
$new_price = STRental::get_price();
?>
<li <?php
post_class('item-nearby');
?>
>
示例13: the_title
<header class="booking-item-header ">
<?php
echo STTemplate::message();
?>
<div class="row">
<div class="col-md-9">
<h2 class="lh1em featured_single"><?php
the_title();
echo STFeatured::get_featured();
?>
</h2>
<ul class="list list-inline text-small">
<?php
$email = get_post_meta(get_the_ID(), 'cars_email', true);
if (!empty($email)) {
echo '<li><a href="mailto:' . $email . '"><i class="fa fa-envelope"></i> ' . st_get_language('car_email') . '</a> </li>';
}
?>
<?php
$phone = get_post_meta(get_the_ID(), 'cars_phone', true);
if (!empty($phone)) {
echo '<li><i class="fa fa-phone"></i> ' . $phone . '</li>';
}
?>
</ul>
</div>
<div class="col-md-3">
<?php
$info_price = STCars::get_info_price();
$price = $info_price['price'];
$price_origin = $info_price['price_origin'];
示例14: st_the_language
?>
% <small><?php
st_the_language('of_guest_recommend');
?>
</small></h3>
<div class="booking-item-rating">
<ul class="icon-list icon-group booking-item-rating-stars">
<?php
echo TravelHelper::rate_to_string($avg);
?>
</ul><span class="booking-item-rating-number"><b><?php
echo balanceTags($avg);
?>
</b> <?php
st_the_language('of_5_guest_rating');
?>
</span>
<p><a class="text-default" href="#"><?php
comments_number(st_get_language('no_review'), st_get_language('based_on_1_review'), st_get_language('based_on_s_review'));
?>
</a>
</p>
</div>
<?php
echo st()->load_template('hotel/share');
?>
<?php
echo st()->load_template('user/html/html_add_wishlist', null, array("title" => st_get_language('add_to_wishlist'), 'class' => 'btn-sm'));
?>
</div>
示例15: st_detail_date_location_cars_func
function st_detail_date_location_cars_func()
{
if (is_singular('st_cars')) {
$default = array('drop-off' => __('none', ST_TEXTDOMAIN), 'pick-up' => __('none', ST_TEXTDOMAIN), 'location_id_drop_off' => '', 'location_id_pick_up' => '');
$_REQUEST = wp_parse_args($_REQUEST, $default);
if (!empty($_REQUEST['pick-up-date'])) {
$pick_up_date = $_REQUEST['pick-up-date'];
} else {
$pick_up_date = date(TravelHelper::getDateFormat(), strtotime("now"));
}
if (!empty($_REQUEST['pick-up-time'])) {
$pick_up_time = $_REQUEST['pick-up-time'];
} else {
$pick_up_time = "12:00 AM";
}
if (STInput::request("location_id_pick_up")) {
$address_pick_up = get_the_title(STInput::request("location_id_pick_up"));
} else {
$address_pick_up = STInput::request('pick-up');
}
$pick_up = '<h5>' . st_get_language('car_pick_up') . ':</h5>
<p><i class="fa fa-map-marker box-icon-inline box-icon-gray"></i>' . $address_pick_up . '</p>
<p><i class="fa fa-calendar box-icon-inline box-icon-gray"></i>' . $pick_up_date . '</p>
<p><i class="fa fa-clock-o box-icon-inline box-icon-gray"></i>' . $pick_up_time . '</p>';
if (!empty($_REQUEST['drop-off-date'])) {
$drop_off_date = $_REQUEST['drop-off-date'];
} else {
$drop_off_date = $pick_up_date = date(TravelHelper::getDateFormat(), strtotime("+1 day"));
}
if (!empty($_REQUEST['drop-off-time'])) {
$drop_off_time = $_REQUEST['drop-off-time'];
} else {
$drop_off_time = "12:00 AM";
}
if (STInput::request('location_id_drop_off')) {
$address_drop_off = get_the_title(STInput::request('location_id_drop_off'));
} else {
$address_drop_off = STInput::request('drop_off');
}
$drop_off = ' <h5>' . st_get_language('car_drop_off') . ':</h5>
<p><i class="fa fa-map-marker box-icon-inline box-icon-gray"></i>' . $address_drop_off . '</p>
<p><i class="fa fa-calendar box-icon-inline box-icon-gray"></i>' . $drop_off_date . '</p>
<p><i class="fa fa-clock-o box-icon-inline box-icon-gray"></i>' . $drop_off_time . '</p>';
$logo = get_post_meta(get_the_ID(), 'cars_logo', true);
if (is_numeric($logo)) {
$logo = wp_get_attachment_url($logo);
}
if (!empty($logo)) {
$logo = '<img src="' . bfi_thumb($logo, array('width' => '120', 'height' => '120')) . '" alt="logo" />';
}
$about = get_post_meta(get_the_ID(), 'cars_about', true);
if (!empty($about)) {
$about = ' <h5>' . st_get_language('car_about') . '</h5>
<p>' . get_post_meta(get_the_ID(), 'cars_about', true) . '</p>';
}
return '<div class="booking-item-deails-date-location">
<ul>
<li class="text-center">
' . $logo . '
</li>
<li>
<p class="f-20 text-center">' . get_post_meta(get_the_ID(), 'cars_name', true) . '</p>
</li>
<li>
<h5>' . st_get_language('car_phone') . ':</h5>
<p><i class="fa fa-phone box-icon-inline box-icon-gray"></i>' . get_post_meta(get_the_ID(), 'cars_phone', true) . '</p>
</li>
<li>
<h5>' . st_get_language('car_email') . ':</h5>
<p><i class="fa fa-envelope-o box-icon-inline box-icon-gray"></i>' . get_post_meta(get_the_ID(), 'cars_email', true) . '</p>
</li>
<li>
' . $about . '
</li>
<li>' . $pick_up . '</li>
<li>' . $drop_off . '</li>
</ul>
<a href="#search-dialog" data-effect="mfp-zoom-out" class="btn btn-primary popup-text" href="#">' . st_get_language('change_location_and_date') . '</a>
</div>';
}
}