コード例 #1
0
ファイル: rental_room.php プロジェクト: DaddyFool/travelTest
    function st_rental_room_review()
    {
        if (get_post_type() == 'rental_room') {
            if (comments_open() and st()->get_option('rental_review') == 'on') {
                ob_start();
                comments_template('/reviews/reviews.php');
                return @ob_get_clean();
            }
        }
    }
    st_reg_shortcode('st_rental_room_review', 'st_rental_room_review');
}
/**
* ST Room rental facility
* @since 1.1.4
**/
if (function_exists('vc_map')) {
    vc_map(array('name' => __("ST Rental Room Facility", ST_TEXTDOMAIN), 'base' => 'st_rental_room_facility', 'content_element' => true, 'icon' => 'icon-st', 'category' => 'Hotel', 'show_settings_on_create' => true, 'params' => array(array('type' => 'checkbox', 'heading' => __('Choose taxonomies', ST_TEXTDOMAIN), 'param_name' => 'choose_taxonomies', 'description' => __('Will be shown in layout', ST_TEXTDOMAIN), 'value' => STRental::listTaxonomy()))));
}
if (!function_exists('st_rental_room_facility_ft')) {
    function st_rental_room_facility_ft($attr, $content = null)
    {
        $default = array('choose_taxonomies' => '');
        $attr = wp_parse_args($attr, $default);
        if (get_post_type() == 'rental_room') {
            return st()->load_template('vc-elements/st-rental-room/st_rental_room_facility', false, array('args' => $attr));
        }
        return false;
    }
    st_reg_shortcode('st_rental_room_facility', 'st_rental_room_facility_ft');
}