/** * * * @update 1.1.3 * */ function __construct() { add_action('init', array($this, '_init_post_type')); if (!st_check_service_available($this->post_type)) { return; } add_action('init', array($this, 'init_metabox')); /// add_action( 'save_post', array($this,'holidays_update_location') ); add_action('save_post', array($this, 'holidays_update_price_sale')); add_filter('manage_st_holidays_posts_columns', array($this, 'add_col_header'), 10); add_action('manage_st_holidays_posts_custom_column', array($this, 'add_col_content'), 10, 2); // ========================================================================== self::$booking_page = admin_url('edit.php?post_type=st_holidays&page=st_holidays_booking'); add_action('admin_menu', array($this, 'new_menu_page')); //Check booking edit and redirect if (self::is_booking_page()) { add_action('admin_enqueue_scripts', array(__CLASS__, 'add_edit_scripts')); add_action('admin_init', array($this, '_do_save_booking')); } if (isset($_GET['send_mail']) and $_GET['send_mail'] == 'success') { self::set_message(__('Email sent', ST_TEXTDOMAIN), 'updated'); } add_action('wp_ajax_st_room_select_ajax', array(__CLASS__, 'st_room_select_ajax')); add_action('save_post', array($this, 'meta_update_sale_price'), 10, 4); parent::__construct(); add_action('save_post', array($this, '_update_list_location'), 50, 2); add_action('save_post', array($this, '_update_duplicate_data'), 50, 2); add_action('before_delete_post', array($this, '_delete_data'), 50); add_action('wp_ajax_st_getInfoHoliday', array(__CLASS__, '_getInfoHoliday'), 9999); }
public function __construct() { parent::__construct(); add_action('after_switch_theme', array($this, 'redirect_after_set_up_theme')); add_action('admin_menu', array($this, 'st_create_submenu'), 11); add_action('admin_enqueue_scripts', array($this, 'add_script')); }
function __construct() { parent::__construct(); add_action('add_meta_boxes', array($this, 'add_item_metabox')); add_action('admin_enqueue_scripts', array($this, 'admin_queue_scripts')); add_action('wp_ajax_st_order_select', array($this, 'st_order_select')); add_action('wp_ajax_save_order_item', array($this, 'save_order_item')); add_action('wp_ajax_st_delete_order_item', array($this, 'st_delete_order_item')); }
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')); }
/** * * * @update 1.1.3 * */ function __construct() { add_action('init', array($this, 'init_post_type')); if (!st_check_service_available($this->post_type)) { return; } // Check class init if (self::$_is_inited) { return; } self::$_is_inited = TRUE; //Add metabox add_action('init', array($this, 'init_metabox')); // add_action( 'save_post', array($this,'activity_update_location') ); add_filter('manage_st_activity_posts_columns', array($this, 'add_col_header'), 10); add_action('manage_st_activity_posts_custom_column', array($this, 'add_col_content'), 10, 2); //=============================================================== self::$booking_page = admin_url('edit.php?post_type=st_activity&page=st_activity_booking'); add_action('admin_menu', array($this, 'add_menu_page')); //Check booking edit and redirect if (self::is_booking_page()) { add_action('admin_enqueue_scripts', array(__CLASS__, 'add_edit_scripts')); $section = isset($_GET['section']) ? $_GET['section'] : FALSE; switch ($section) { case "edit_order_item": $this->is_able_edit(); break; case "add_booking": if (isset($_POST['submit']) and $_POST['submit']) { $this->_add_booking(); } break; case 'resend_email_activity': add_action('init', array($this, '_resend_mail')); //$this->_resend_mail(); break; } } if (isset($_GET['send_mail']) and $_GET['send_mail'] == 'success') { self::set_message(__('Email sent', ST_TEXTDOMAIN), 'updated'); } add_action('wp_ajax_st_room_select_ajax', array(__CLASS__, 'st_room_select_ajax')); add_action('save_post', array($this, 'meta_update_sale_price'), 10, 4); parent::__construct(); }
function __construct() { add_action('init', array($this, '_reg_post_type')); if (!st_check_service_available($this->post_type)) { return; } //add colum for rooms add_filter('manage_st_rental_posts_columns', array($this, 'add_col_header'), 10); add_action('manage_st_rental_posts_custom_column', array($this, 'add_col_content'), 10, 2); self::$booking_page = admin_url('edit.php?post_type=st_rental&page=st_rental_booking'); //rental Hook /* * todo Re-cal rental min price * */ add_action('save_post', array($this, 'meta_update_sale_price'), 10, 4); add_action('admin_menu', array($this, 'new_menu_page')); //Check booking edit and redirect if (self::is_booking_page()) { add_action('admin_enqueue_scripts', array(__CLASS__, 'add_edit_scripts')); $section = isset($_GET['section']) ? $_GET['section'] : false; switch ($section) { case "edit_order_item": $this->is_able_edit(); break; case "add_booking": if (isset($_POST['submit']) and $_POST['submit']) { $this->_add_booking(); } break; case 'resend_email': add_action('init', array($this, '_resend_mail')); //$this->_resend_mail(); break; } } if (isset($_GET['send_mail']) and $_GET['send_mail'] == 'success') { self::set_message(__('Email sent', ST_TEXTDOMAIN), 'updated'); } add_action('wp_ajax_st_room_select_ajax', array(__CLASS__, 'st_room_select_ajax')); add_action('init', array($this, '_add_metabox')); add_action('st_search_fields_name', array($this, 'get_search_fields_name'), 10, 2); parent::__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(); }
/** * * * @update 1.1.3 * */ function __construct() { add_action('init', array($this, '_init_post_type')); if (!st_check_service_available($this->post_type)) { return; } add_action('init', array($this, 'get_list_value_taxonomy'), 98); add_action('init', array($this, 'init_metabox'), 99); //add_action( 'save_post', array($this,'cars_update_location') ); //=============================================================== self::$booking_page = admin_url('edit.php?post_type=st_cars&page=st_car_booking'); add_action('admin_menu', array($this, 'add_menu_page')); //Check booking edit and redirect if (self::is_booking_page()) { add_action('admin_enqueue_scripts', array(__CLASS__, 'add_edit_scripts')); $section = isset($_GET['section']) ? $_GET['section'] : FALSE; switch ($section) { case "edit_order_item": $this->is_able_edit(); break; case "add_booking": if (isset($_POST['submit']) and $_POST['submit']) { $this->_add_booking(); } break; case 'resend_email_cars': add_action('init', array($this, '_resend_mail')); //$this->_resend_mail(); break; } } if (isset($_GET['send_mail']) and $_GET['send_mail'] == 'success') { self::set_message(__('Email sent', ST_TEXTDOMAIN), 'updated'); } add_action('wp_ajax_st_room_select_ajax', array(__CLASS__, 'st_room_select_ajax')); add_action('save_post', array($this, 'meta_update_sale_price'), 10, 4); parent::__construct(); }
function __construct() { add_action('init', array($this, '_reg_post_type')); if (!st_check_service_available($this->post_type)) { return; } //add colum for rooms add_filter('manage_st_rental_posts_columns', array($this, 'add_col_header'), 10); add_action('manage_st_rental_posts_custom_column', array($this, 'add_col_content'), 10, 2); self::$booking_page = admin_url('edit.php?post_type=st_rental&page=st_rental_booking'); //rental Hook /* * todo Re-cal rental min price * */ add_action('save_post', array($this, 'meta_update_sale_price'), 10, 4); add_action('admin_menu', array($this, 'new_menu_page')); //Check booking edit and redirect if (self::is_booking_page()) { add_action('admin_enqueue_scripts', array(__CLASS__, 'add_edit_scripts')); add_action('admin_init', array($this, '_do_save_booking')); } if (isset($_GET['send_mail']) and $_GET['send_mail'] == 'success') { self::set_message(__('Email sent', ST_TEXTDOMAIN), 'updated'); } add_action('wp_ajax_st_room_select_ajax', array(__CLASS__, 'st_room_select_ajax')); add_action('init', array($this, '_add_metabox')); add_action('st_search_fields_name', array($this, 'get_search_fields_name'), 10, 2); /** *@since 1.1.6 **/ add_action('save_post', array($this, '_update_list_location'), 50, 2); add_action('save_post', array($this, '_update_duplicate_data'), 50, 2); add_action('before_delete_post', array($this, '_delete_data'), 50); parent::__construct(); add_action('wp_ajax_st_getRentalInfo', array(__CLASS__, 'getRentalInfo'), 9999); }
function __construct() { parent::__construct(); }