/** * admin_init アクションで処理しなければならないモジュール処理 * */ public function admin_init() { if (isset($_REQUEST['page'])) { $page = $_REQUEST['page']; // WP options.phpでオプションデータ保存のためのホワイトリスト登録 } else { if (isset($_POST['option_page']) && isset($_POST['mts_page_tag'])) { $page = $_POST['mts_page_tag']; } else { return; } } switch ($page) { case self::ADMIN_MENU: //case self::PAGE_CALENDAR : if (!class_exists('MTSSB_Calendar_Admin')) { require_once 'mtssb-calendar-admin.php'; } $this->calendar = MTSSB_Calendar_Admin::get_instance(); break; case self::PAGE_LIST: if (!class_exists('MTSSB_List_Admin')) { require_once 'mtssb-list-admin.php'; } $this->blist = MTSSB_List_Admin::get_instance(); break; case self::PAGE_BOOKING: if (!class_exists('MTSSB_Booking_Admin')) { require_once 'mtssb-booking-admin.php'; } $this->booking = MTSSB_Booking_Admin::get_instance(); break; case self::PAGE_SETTINGS: if (!class_exists('MTSSB_Settings_Admin')) { require_once 'mtssb-settings-admin.php'; } $this->settings = MTSSB_Settings_Admin::get_instance(); break; case self::PAGE_SCHEDULE: if (!class_exists('MTSSB_Schedule_Admin')) { require_once 'mtssb-schedule-admin.php'; } $this->schedule = MTSSB_Schedule_Admin::get_instance(); break; default: break; } }
/** * 管理画面 予約リストモジュールのロード * */ public function loadListBooking() { if (!class_exists('MTSSB_List_Admin')) { require_once 'mtssb-list-admin.php'; } $this->blist = MTSSB_List_Admin::get_instance(); }