function __construct()
 {
     if (self::$_is_inited) {
         return;
     }
     self::$_is_inited = true;
     $this->plugin_name = 'traveler-code';
     parent::__construct();
     $file = array('travel-helper', 'admin/class.stadmin', 'st.customvc', 'helpers/st-languages', 'class/class.travelobject', 'class/class.hotel', 'class/class.room', 'class/class.review', 'class/class.order', 'st.customvc', 'class/class.hotel', 'helpers/class.validate', 'class/class.payment_gateways', 'class/class.cart', 'class/class.paypal', 'class/class.user', 'class/class.location', 'class/class.cars', 'class/class.tour', 'class/class.rental', 'class/class.cruise', 'class/class.cabin', 'class/class.activity', 'class/class.coupon', 'class/class.featured', 'class/class.woocommerce', 'helpers/class.date', 'helpers/class.social.login', 'helpers/class.analytics', 'helpers/class.cool-captcha', 'plugins/custom-option-tree/custom-option-tree', 'plugins/custom-select-post/custom-select-post', 'helpers/class.iconpicker', 'helpers/st-car-helpers');
     $this->load_libs($file);
     $this->_load_abstract();
     $this->_load_modules();
     self::$booking_type = apply_filters('st_booking_post_type', array('st_hotel', 'st_activity', 'st_tours', 'st_cars', 'st_rental'));
     if (function_exists('st_reg_post_type') and function_exists('st_reg_taxonomy')) {
         add_action('init', array($this, 'st_attribute_to_taxonomy'));
         add_action('init', array($this, 'st_location_init'));
         add_action('init', array($this, 'st_order_init'));
     }
     if (function_exists('st_reg_shortcode')) {
         /**
          * Load widget, shortcodes and vc elements. No need use it from plugins
          *
          *
          * @since 1.0.7
          * */
         $this->loadWidgets();
         $this->loadShortCodes();
         if (class_exists('Vc_Manager')) {
             add_action('init', array($this, 'loadVcElements'), 20);
         }
     }
 }
 function add_location_type_meta()
 {
     /*
      * prefix of meta keys, optional
      */
     $prefix = 'st_';
     /*
      * configure your meta box
      */
     $config = array('id' => 'st_extra_infomation', 'title' => __('Extra Information', ST_TEXTDOMAIN), 'pages' => array('st_location_type'), 'context' => 'normal', 'fields' => array(), 'local_images' => false, 'use_with_theme' => false);
     if (!class_exists('Tax_Meta_Class')) {
         STFramework::write_log('Tax_Meta_Class not found in class.attribute.php line 121');
         return;
     }
     /*
      * Initiate your meta box
      */
     $my_meta = new Tax_Meta_Class($config);
     /*
      * Add fields to your meta box
      */
     //text field
     $my_meta->addSelect($prefix . 'label', array('default' => __('Default', ST_TEXTDOMAIN), 'primary' => __('Primary', ST_TEXTDOMAIN), 'success' => __('Success', ST_TEXTDOMAIN), 'info' => __('Info', ST_TEXTDOMAIN), 'warning' => __('Warning', ST_TEXTDOMAIN), 'danger' => __('Danger', ST_TEXTDOMAIN)), array('name' => __('Label Type', ST_TEXTDOMAIN)));
     //Image field
     //$my_meta->addImage($prefix.'image',array('name'=> __('Image ',ST_TEXTDOMAIN),
     // 'desc'=>__('If dont like the icon, you can use image instead',ST_TEXTDOMAIN)));
     //file upload field
     /*
      * Don't Forget to Close up the meta box decleration
      */
     //Finish Meta Box Decleration
     $my_meta->Finish();
 }
 function add_meta_field()
 {
     if (is_admin()) {
         $attr_list = $this->get_attributes();
         $pages = array();
         if (!empty($attr_list)) {
             foreach ($attr_list as $key => $value) {
                 $pages[] = $key;
             }
         }
         /*
          * prefix of meta keys, optional
          */
         $prefix = 'st_';
         /*
          * configure your meta box
          */
         $config = array('id' => 'st_extra_infomation', 'title' => __('Extra Information', ST_TEXTDOMAIN), 'pages' => $pages, 'context' => 'normal', 'fields' => array(), 'local_images' => false, 'use_with_theme' => false);
         if (!class_exists('Tax_Meta_Class')) {
             STFramework::write_log('Tax_Meta_Class not found in class.attribute.php line 121');
             return;
         }
         /*
          * Initiate your meta box
          */
         $my_meta = new Tax_Meta_Class($config);
         /*
          * Add fields to your meta box
          */
         //select field
         $my_meta->addText($prefix . 'icon', array('name' => __('Icon', ST_TEXTDOMAIN), 'desc' => __('You can upload your font-icon file in the site by navigating to Traveler Settings -> Importer Fonticon', ST_TEXTDOMAIN)));
         //Image field
         //$my_meta->addImage($prefix.'image',array('name'=> __('Image ',ST_TEXTDOMAIN),
         // 'desc'=>__('If dont like the icon, you can use image instead',ST_TEXTDOMAIN)));
         //file upload field
         /*
          * Don't Forget to Close up the meta box decleration
          */
         //Finish Meta Box Decleration
         $my_meta->Finish();
     }
 }
Esempio n. 4
0
 function __construct()
 {
     $this->plugin_name = 'traveler-code';
     parent::__construct();
 }
Esempio n. 5
0
 function add_meta_field()
 {
     if (is_admin()) {
         $pages = array('st_cars_pickup_features');
         /*
          * prefix of meta keys, optional
          */
         $prefix = 'st_';
         /*
          * configure your meta box
          */
         $config = array('id' => 'st_extra_infomation_cars', 'title' => __('Extra Information', ST_TEXTDOMAIN), 'pages' => $pages, 'context' => 'normal', 'fields' => array(), 'local_images' => FALSE, 'use_with_theme' => FALSE);
         if (!class_exists('Tax_Meta_Class')) {
             STFramework::write_log('Tax_Meta_Class not found in class.attribute.php line 121');
             return;
         }
         /*
          * Initiate your meta box
          */
         $my_meta = new Tax_Meta_Class($config);
         /*
          * Add fields to your meta box
          */
         //text field
         $my_meta->addText($prefix . 'icon', array('name' => __('Icon', ST_TEXTDOMAIN), 'desc' => __('Example: <br>Input "fa-desktop" for <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank" >Fontawesome</a>,<br>Input "im-pool" for <a href="https://icomoon.io/" target="_blank">Icomoon</a>  ', ST_TEXTDOMAIN)));
         //Image field
         //$my_meta->addImage($prefix.'image',array('name'=> __('Image ',ST_TEXTDOMAIN),
         // 'desc'=>__('If dont like the icon, you can use image instead',ST_TEXTDOMAIN)));
         //file upload field
         /*
          * Don't Forget to Close up the meta box decleration
          */
         //Finish Meta Box Decleration
         $my_meta->Finish();
     }
 }