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


PHP st_check_service_available函数代码示例

本文整理汇总了PHP中st_check_service_available函数的典型用法代码示例。如果您正苦于以下问题:PHP st_check_service_available函数的具体用法?PHP st_check_service_available怎么用?PHP st_check_service_available使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: init

 function init()
 {
     if (!st_check_service_available('st_hotel')) {
         return;
     }
     parent::init();
     //add_filter('st_data_custom_price',array($this,'_st_data_custom_price'));
 }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:8,代码来源:class.room.php

示例2: init

 function init()
 {
     if (!st_check_service_available('st_hotel')) {
         return;
     }
     parent::init();
     //$this->init_metabox();
     add_action('posts_where', array($this, '_alter_search_query'));
     add_filter('st_data_custom_price', array($this, '_st_data_custom_price'));
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:10,代码来源:class.room.php

示例3: __construct

 function __construct()
 {
     if (!st_check_service_available('st_rental')) {
         return;
     }
     parent::__construct();
     //add colum for rooms
     add_filter('manage_rental_room_posts_columns', array($this, 'add_col_header'), 10);
     add_action('manage_rental_room_posts_custom_column', array($this, 'add_col_content'), 10, 2);
     add_action('init', array($this, 'init_metabox'));
     add_filter('st_rental_room_layout', array($this, 'custom_rental_room_layout'));
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:12,代码来源:class.admin.rental.room.php

示例4: init_post_type

 /**
  *
  *
  *
  * */
 function init_post_type()
 {
     if (!st_check_service_available($this->post_type)) {
         return;
     }
     if (!function_exists('st_reg_post_type')) {
         return;
     }
     // Activity ==============================================================
     $labels = array('name' => __('Activity', ST_TEXTDOMAIN), 'singular_name' => __('Activity', ST_TEXTDOMAIN), 'menu_name' => __('Activity', ST_TEXTDOMAIN), 'name_admin_bar' => __('Activity', ST_TEXTDOMAIN), 'add_new' => __('Add New', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Activity', ST_TEXTDOMAIN), 'new_item' => __('New Activity', ST_TEXTDOMAIN), 'edit_item' => __('Edit Activity', ST_TEXTDOMAIN), 'view_item' => __('View Activity', ST_TEXTDOMAIN), 'all_items' => __('All Activity', ST_TEXTDOMAIN), 'search_items' => __('Search Activity', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Activity:', ST_TEXTDOMAIN), 'not_found' => __('No Activity found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No Activity 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('activity_permalink', 'st_activity')), 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array('author', 'title', 'editor', 'excerpt', 'thumbnail', 'comments'), 'menu_icon' => 'dashicons-tickets-alt-st');
     st_reg_post_type('st_activity', $args);
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:18,代码来源:class.admin.activity.php

示例5: _init_post_type

 /**
  * Init the 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;
     }
     // Tours ==============================================================
     $labels = array('name' => __('Tours', ST_TEXTDOMAIN), 'singular_name' => __('Tour', ST_TEXTDOMAIN), 'menu_name' => __('Tours', ST_TEXTDOMAIN), 'name_admin_bar' => __('Tour', ST_TEXTDOMAIN), 'add_new' => __('Add New', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Tour', ST_TEXTDOMAIN), 'new_item' => __('New Tour', ST_TEXTDOMAIN), 'edit_item' => __('Edit Tour', ST_TEXTDOMAIN), 'view_item' => __('View Tour', ST_TEXTDOMAIN), 'all_items' => __('All Tour', ST_TEXTDOMAIN), 'search_items' => __('Search Tour', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Tour:', ST_TEXTDOMAIN), 'not_found' => __('No Tours found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No Tours 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('tour_permalink', 'st_tour')), 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array('author', 'title', 'editor', 'excerpt', 'thumbnail', 'comments'), 'menu_icon' => 'dashicons-palmtree-st');
     st_reg_post_type('st_tours', $args);
     $labels = array('name' => __('Tours Type', 'taxonomy general name', ST_TEXTDOMAIN), 'singular_name' => __('Tours Type', 'taxonomy singular name', ST_TEXTDOMAIN), 'search_items' => __('Search Tours Type', ST_TEXTDOMAIN), 'popular_items' => __('Popular Tours Type', ST_TEXTDOMAIN), 'all_items' => __('All Tours Type', ST_TEXTDOMAIN), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __('Edit Tour Type', ST_TEXTDOMAIN), 'update_item' => __('Update Tour Type', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Pickup Feature', ST_TEXTDOMAIN), 'new_item_name' => __('New Tour Type Name', ST_TEXTDOMAIN), 'separate_items_with_commas' => __('Separate Tour Type with commas', ST_TEXTDOMAIN), 'add_or_remove_items' => __('Add or remove Tour Type', ST_TEXTDOMAIN), 'choose_from_most_used' => __('Choose from the most used Tour Type', ST_TEXTDOMAIN), 'not_found' => __('No Pickup Tour Type.', ST_TEXTDOMAIN), 'menu_name' => __('Tours Type', ST_TEXTDOMAIN));
     $args = array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug' => 'st_tour_type'));
     st_reg_taxonomy('st_tour_type', 'st_tours', $args);
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:21,代码来源:class.admin.tours.php

示例6: __construct

 /**
  *
  *
  * @update 1.1.3
  * */
 function __construct()
 {
     if (!st_check_service_available('st_hotel')) {
         return;
     }
     add_filter('st_hotel_room_layout', array($this, 'custom_hotel_room_layout'));
     add_action('init', array($this, 'init_metabox'));
     //alter where for search room
     add_filter('posts_where', array(__CLASS__, '_alter_search_query'));
     //Hotel Hook
     /*
      * todo Re-cal hotel min price
      * */
     add_action('update_post_meta', array($this, 'hotel_update_min_price'), 10, 4);
     add_action('updated_post_meta', array($this, 'meta_updated_update_min_price'), 10, 4);
     add_action('added_post_meta', array($this, 'hotel_update_min_price'), 10, 4);
     add_action('save_post', array($this, '_update_avg_price'), 50);
     parent::__construct();
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:24,代码来源:class.admin.room.php

示例7: init_post_type

 /**
  * Init the post type
  *
  * */
 function init_post_type()
 {
     if (!st_check_service_available($this->post_type)) {
         return;
     }
     if (!function_exists('st_reg_post_type')) {
         return;
     }
     $labels = array('name' => __('Hotels', ST_TEXTDOMAIN), 'singular_name' => __('Hotel Name', ST_TEXTDOMAIN), 'menu_name' => __('Hotels', ST_TEXTDOMAIN), 'name_admin_bar' => __('Hotel Name', ST_TEXTDOMAIN), 'add_new' => __('Add New', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Hotel', ST_TEXTDOMAIN), 'new_item' => __('New Hotel', ST_TEXTDOMAIN), 'edit_item' => __('Edit Hotel', ST_TEXTDOMAIN), 'view_item' => __('View Hotel', ST_TEXTDOMAIN), 'all_items' => __('All Hotels', ST_TEXTDOMAIN), 'search_items' => __('Search Hotels', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Hotels:', ST_TEXTDOMAIN), 'not_found' => __('No hotels found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No hotels found in Trash.', ST_TEXTDOMAIN));
     $args = array('labels' => $labels, 'menu_icon' => 'dashicons-building-yl', 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array('slug' => get_option('hotel_permalink', 'st_hotel')), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'));
     st_reg_post_type('st_hotel', $args);
     $labels = array('name' => __('Room(s)', ST_TEXTDOMAIN), 'singular_name' => __('Room', ST_TEXTDOMAIN), 'menu_name' => __('Room(s)', ST_TEXTDOMAIN), 'name_admin_bar' => __('Room', ST_TEXTDOMAIN), 'add_new' => __('Add New', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Room', ST_TEXTDOMAIN), 'new_item' => __('New Room', ST_TEXTDOMAIN), 'edit_item' => __('Edit Room', ST_TEXTDOMAIN), 'view_item' => __('View Room', ST_TEXTDOMAIN), 'all_items' => __('All Rooms', ST_TEXTDOMAIN), 'search_items' => __('Search Rooms', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Rooms:', ST_TEXTDOMAIN), 'not_found' => __('No rooms found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No rooms found in Trash.', ST_TEXTDOMAIN));
     $args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'), 'menu_icon' => 'dashicons-building-yl', 'exclude_from_search' => true);
     st_reg_post_type('hotel_room', $args);
     $name = __('Room Type', ST_TEXTDOMAIN);
     $labels = array('name' => $name, 'singular_name' => $name, 'search_items' => sprintf(__('Search %s', ST_TEXTDOMAIN), $name), 'all_items' => sprintf(__('All %s', ST_TEXTDOMAIN), $name), 'parent_item' => sprintf(__('Parent %s', ST_TEXTDOMAIN), $name), 'parent_item_colon' => sprintf(__('Parent %s', ST_TEXTDOMAIN), $name), 'edit_item' => sprintf(__('Edit %s', ST_TEXTDOMAIN), $name), 'update_item' => sprintf(__('Update %s', ST_TEXTDOMAIN), $name), 'add_new_item' => sprintf(__('New %s', ST_TEXTDOMAIN), $name), 'new_item_name' => sprintf(__('New %s', ST_TEXTDOMAIN), $name), 'menu_name' => $name);
     $args = array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_ui' => 'edit.php?post_type=st_hotel', 'query_var' => true);
     st_reg_taxonomy('room_type', 'hotel_room', $args);
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:23,代码来源:class.admin.hotel.php

示例8: _init_post_type

 /**
  * Init the 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;
     }
     // Tours ==============================================================
     $labels = array('name' => __('Food', ST_TEXTDOMAIN), 'singular_name' => __('Food', ST_TEXTDOMAIN), 'menu_name' => __('Food', ST_TEXTDOMAIN), 'name_admin_bar' => __('Food', ST_TEXTDOMAIN), 'add_new' => __('Add New', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Food', ST_TEXTDOMAIN), 'new_item' => __('New Food', ST_TEXTDOMAIN), 'edit_item' => __('Edit Food', ST_TEXTDOMAIN), 'view_item' => __('View Food', ST_TEXTDOMAIN), 'all_items' => __('All Food', ST_TEXTDOMAIN), 'search_items' => __('Search Food', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Food:', ST_TEXTDOMAIN), 'not_found' => __('No Food found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No Food 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('food_permalink', 'st_food')), 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array('author', 'title', 'editor', 'excerpt', 'thumbnail', 'comments'), 'menu_icon' => 'dashicons-carrot');
     st_reg_post_type('st_food', $args);
     $labels = array('name' => __('Cuisine Type', 'taxonomy general name', ST_TEXTDOMAIN), 'singular_name' => __('Cuisine Type', 'taxonomy singular name', ST_TEXTDOMAIN), 'search_items' => __('Search Cuisine Type', ST_TEXTDOMAIN), 'popular_items' => __('Popular Cuisine Type', ST_TEXTDOMAIN), 'all_items' => __('All Cuisine Type', ST_TEXTDOMAIN), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __('Edit Cuisine Type', ST_TEXTDOMAIN), 'update_item' => __('Update Cuisine Type', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Cuisine Feature', ST_TEXTDOMAIN), 'new_item_name' => __('New Cuisine Type Name', ST_TEXTDOMAIN), 'separate_items_with_commas' => __('Separate Cuisine Type with commas', ST_TEXTDOMAIN), 'add_or_remove_items' => __('Add or remove Cuisine Type', ST_TEXTDOMAIN), 'choose_from_most_used' => __('Choose from the most used Cuisine Type', ST_TEXTDOMAIN), 'not_found' => __('No Cuisine Type.', ST_TEXTDOMAIN), 'menu_name' => __('Cuisine Type', ST_TEXTDOMAIN));
     $args = array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug' => 'st_cuisine_type'));
     st_reg_taxonomy('st_cuisine_type', 'st_food', $args);
     $labels = array('name' => __('Restaurent', 'taxonomy general name', ST_TEXTDOMAIN), 'singular_name' => __('Restaurent', 'taxonomy singular name', ST_TEXTDOMAIN), 'search_items' => __('Search Restaurent', ST_TEXTDOMAIN), 'popular_items' => __('Popular Restaurent', ST_TEXTDOMAIN), 'all_items' => __('All Restaurent', ST_TEXTDOMAIN), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __('Edit Restaurent', ST_TEXTDOMAIN), 'update_item' => __('Update Restaurent', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Restaurent Feature', ST_TEXTDOMAIN), 'new_item_name' => __('New Restaurent Name', ST_TEXTDOMAIN), 'separate_items_with_commas' => __('Separate Restaurent with commas', ST_TEXTDOMAIN), 'add_or_remove_items' => __('Add or remove Restaurent', ST_TEXTDOMAIN), 'choose_from_most_used' => __('Choose from the most used Restaurent', ST_TEXTDOMAIN), 'not_found' => __('No Restaurent.', ST_TEXTDOMAIN), 'menu_name' => __('Restaurent', ST_TEXTDOMAIN));
     $args = array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug' => 'st_restaurent_type'));
     st_reg_taxonomy('st_restaurent_type', 'st_food', $args);
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:24,代码来源:class.admin.food.php

示例9: _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);
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:25,代码来源:class.admin.cars.php

示例10: _reg_post_type

 /**
  *
  *
  * @since 1.1.3
  * */
 function _reg_post_type()
 {
     if (!st_check_service_available($this->post_type)) {
         return;
     }
     if (!function_exists('st_reg_post_type')) {
         return;
     }
     // Rental ==============================================================
     $labels = array('name' => __('Rental', ST_TEXTDOMAIN), 'singular_name' => __('Rental', ST_TEXTDOMAIN), 'menu_name' => __('Rental', ST_TEXTDOMAIN), 'name_admin_bar' => __('Rental', ST_TEXTDOMAIN), 'add_new' => __('Add Rental', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Rental', ST_TEXTDOMAIN), 'new_item' => __('New Rental', ST_TEXTDOMAIN), 'edit_item' => __('Edit Rental', ST_TEXTDOMAIN), 'view_item' => __('View Rental', ST_TEXTDOMAIN), 'all_items' => __('All Rental', ST_TEXTDOMAIN), 'search_items' => __('Search Rental', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Rental:', ST_TEXTDOMAIN), 'not_found' => __('No Rental found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No Rental 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('rental_permalink', 'st_rental')), 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'), 'menu_icon' => 'dashicons-admin-home-st');
     st_reg_post_type('st_rental', $args);
     // post type rental
     /**
      *@since 1.1.3
      * Rental room
      **/
     $labels = array('name' => __('Room(s)', ST_TEXTDOMAIN), 'singular_name' => __('Room', ST_TEXTDOMAIN), 'menu_name' => __('Room(s)', ST_TEXTDOMAIN), 'name_admin_bar' => __('Room', ST_TEXTDOMAIN), 'add_new' => __('Add New', ST_TEXTDOMAIN), 'add_new_item' => __('Add New Room', ST_TEXTDOMAIN), 'new_item' => __('New Room', ST_TEXTDOMAIN), 'edit_item' => __('Edit Room', ST_TEXTDOMAIN), 'view_item' => __('View Room', ST_TEXTDOMAIN), 'all_items' => __('All Rooms', ST_TEXTDOMAIN), 'search_items' => __('Search Rooms', ST_TEXTDOMAIN), 'parent_item_colon' => __('Parent Rooms:', ST_TEXTDOMAIN), 'not_found' => __('No rooms found.', ST_TEXTDOMAIN), 'not_found_in_trash' => __('No rooms found in Trash.', ST_TEXTDOMAIN));
     $args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'), 'menu_icon' => 'dashicons-admin-home-st', 'exclude_from_search' => true, 'show_in_menu' => 'edit.php?post_type=st_rental');
     st_reg_post_type('rental_room', $args);
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:26,代码来源:class.admin.rental.php

示例11: _e

                <div class="panel-footer">
                    <span class="pull-left"><?php 
    _e("View Details", ST_TEXTDOMAIN);
    ?>
</span>
                    <span class="pull-right"><i class="fa fa-arrow-circle-right"></i></span>
                    <div class="clearfix"></div>
                </div>
            </a>
        </div>
    </div>
    <?php 
}
?>
    <?php 
if (st_check_service_available('st_activity')) {
    ?>
    <div class="col-md-4">
        <div class="panel panel-primary panel-st_activity panel-single">
            <div class="panel-heading">
                <div class="row">
                    <div class="col-xs-3">
                        <i class="fa <?php 
    echo apply_filters('st_post_type_st_activity_icon', '');
    ?>
 fa-5x"></i>
                    </div>
                    <div class="col-xs-9 text-right">
                        <div class="huge">
                            <?php 
    $price = $this_data_custom['post_type']['st_activity']['average_total'];
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:user-dashboard.php

示例12: st_vc_all_post_type_content_search

 function st_vc_all_post_type_content_search($attr, $content = false)
 {
     $default = array('st_style' => 1, 'st_number' => 5);
     $attr = wp_parse_args($attr, $default);
     extract($attr);
     if (!is_page_template('template-search-all-post-type.php')) {
         return "";
     }
     $html = '';
     global $wp_query, $st_search_query;
     $data_post_type = STInput::request('data_post_type', 'all');
     if ($data_post_type == 'all') {
         $data_post_type = array('st_hotel', 'st_rental', 'st_cars', 'st_tours', 'st_holidays', 'st_activity');
     } else {
         $data_post_type = array($data_post_type);
     }
     ///////////////////////////////
     ////// Hotel
     //////////////////////////////
     if (st_check_service_available('st_hotel') and in_array('st_hotel', $data_post_type)) {
         $hotel = new STHotel();
         add_action('pre_get_posts', array($hotel, 'change_search_hotel_arg'));
         query_posts(array('post_type' => 'st_hotel', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number));
         $st_search_query = $wp_query;
         $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr));
         $html .= '<br>';
         remove_action('pre_get_posts', array($hotel, 'change_search_hotel_arg'));
         $hotel->remove_alter_search_query();
         wp_reset_query();
     }
     ///////////////////////////////
     ////// Rental
     //////////////////////////////
     if (st_check_service_available('st_rental') and in_array('st_rental', $data_post_type)) {
         $rental = new STRental();
         add_action('pre_get_posts', array($rental, 'change_search_arg'));
         query_posts(array('post_type' => 'st_rental', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number));
         $st_search_query = $wp_query;
         $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr));
         $html .= '<br>';
         remove_action('pre_get_posts', array($rental, 'change_search_arg'));
         $rental->remove_alter_search_query();
         wp_reset_query();
     }
     ///////////////////////////////
     ////// Activity
     //////////////////////////////
     if (st_check_service_available('st_activity') and in_array('st_activity', $data_post_type)) {
         $activity = new STActivity();
         add_action('pre_get_posts', array($activity, 'change_search_activity_arg'));
         query_posts(array('post_type' => 'st_activity', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number));
         $st_search_query = $wp_query;
         $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr));
         $html .= '<br>';
         remove_action('pre_get_posts', array($activity, 'change_search_activity_arg'));
         $activity->remove_alter_search_query();
         wp_reset_query();
     }
     ///////////////////////////////
     ////// Cars
     //////////////////////////////
     if (st_check_service_available('st_cars') and in_array('st_cars', $data_post_type)) {
         $cars = new STCars();
         add_action('pre_get_posts', array($cars, 'change_search_cars_arg'));
         query_posts(array('post_type' => 'st_cars', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number));
         $st_search_query = $wp_query;
         $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr));
         $html .= '<br>';
         remove_action('pre_get_posts', array($cars, 'change_search_cars_arg'));
         $cars->remove_alter_search_query();
         wp_reset_query();
     }
     ///////////////////////////////
     ////// Tours
     //////////////////////////////
     if (st_check_service_available('st_tours') and in_array('st_tours', $data_post_type)) {
         $tours = new STTour();
         $tours->alter_search_query();
         add_action('pre_get_posts', array($tours, 'change_search_tour_arg'));
         query_posts(array('post_type' => 'st_tours', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number));
         $st_search_query = $wp_query;
         $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr));
         $html .= '<br>';
         $tours->remove_alter_search_query();
         wp_reset_query();
     }
     ///////////////////////////////
     ////// Holidays
     //////////////////////////////
     if (st_check_service_available('st_holidays') and in_array('st_holidays', $data_post_type)) {
         $holidays = new STHoliday();
         $holidays->alter_search_query();
         add_action('pre_get_posts', array($holidays, 'change_search_holiday_arg'));
         query_posts(array('post_type' => 'st_holidays', 's' => '', 'paged' => get_query_var('paged'), 'posts_per_page' => $st_number));
         $st_search_query = $wp_query;
         $html .= st()->load_template('search/search-all-post-type/content', 'all-post-type', array('attr' => $attr));
         $html .= '<br>';
         $holidays->remove_alter_search_query();
         wp_reset_query();
     }
//.........这里部分代码省略.........
开发者ID:DaddyFool,项目名称:travelTest,代码行数:101,代码来源:st-all-post-type-content-search.php

示例13: is_available

 /**
  *
  * @since 1.1.3
  * */
 function is_available()
 {
     return st_check_service_available('st_activity');
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:8,代码来源:class.activity.php

示例14: vc_map

<?php

if (!st_check_service_available('st_holidays')) {
    return;
}
if (function_exists('vc_map')) {
    vc_map(array("name" => __("ST Detailed Holiday Gallery", ST_TEXTDOMAIN), "base" => "st_holiday_detail_photo", "content_element" => true, "icon" => "icon-st", "category" => 'Shinetheme', "params" => array(array("type" => "dropdown", "holder" => "div", "heading" => __("Style", ST_TEXTDOMAIN), "param_name" => "style", "description" => "", "value" => array(__('--Select--', ST_TEXTDOMAIN) => '', __('Slide', ST_TEXTDOMAIN) => 'slide', __('Grid', ST_TEXTDOMAIN) => 'grid')))));
}
if (!function_exists('st_vc_holiday_detail_photo')) {
    function st_vc_holiday_detail_photo($attr, $content = false)
    {
        $default = array('style' => 'slide');
        $attr = wp_parse_args($attr, $default);
        if (is_singular('st_holidays')) {
            return st()->load_template('holidays/elements/photo', null, array('attr' => $attr));
        }
    }
}
if (st_check_service_available('st_holidays')) {
    st_reg_shortcode('st_holiday_detail_photo', 'st_vc_holiday_detail_photo');
}
开发者ID:DaddyFool,项目名称:travelTest,代码行数:21,代码来源:st-holiday-photo.php

示例15: st_attribute_to_taxonomy

 /**
  *
  *
  * @update 1.1.3
  * */
 static function st_attribute_to_taxonomy()
 {
     $attributes = $attr = get_option('st_attribute_taxonomy');
     if (!empty($attributes) and is_array($attributes)) {
         foreach ($attributes as $key => $value) {
             $name = $value['name'];
             $slug = $key;
             $hierarchical = $value['hierarchical'];
             $post_type = $value['post_type'];
             // Add new taxonomy, make it hierarchical (like categories)
             if (st_check_service_available($post_type)) {
                 $labels = array('name' => $name, 'singular_name' => $name, 'search_items' => sprintf(__('Search %s', ST_TEXTDOMAIN), $name), 'all_items' => sprintf(__('All %s', ST_TEXTDOMAIN), $name), 'parent_item' => sprintf(__('Parent %s', ST_TEXTDOMAIN), $name), 'parent_item_colon' => sprintf(__('Parent %s', ST_TEXTDOMAIN), $name), 'edit_item' => sprintf(__('Edit %s', ST_TEXTDOMAIN), $name), 'update_item' => sprintf(__('Update %s', ST_TEXTDOMAIN), $name), 'add_new_item' => sprintf(__('New %s', ST_TEXTDOMAIN), $name), 'new_item_name' => sprintf(__('New %s', ST_TEXTDOMAIN), $name), 'menu_name' => $name);
                 $args = array('hierarchical' => $hierarchical, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true);
                 st_reg_taxonomy($slug, $post_type, $args);
             }
         }
     }
 }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:23,代码来源:class.traveler.php


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