ホームページの予約システム
WORDPRESSの予約システムプラグインで人気のMTS-SIMPLE-BOOKING
通常は管理者権限でのみスケジュールの管理が出来ますが、
これを編集者権限などでも可能にする方法。(ビジネス版で確認)
mts-simple-booking.php を編集します。
230行目あたりの'administrator'を全て'publish_pages'に変更するだけです。
【変更前】
/** * 管理画面メニュー登録 * */ public function add_admin_menu() { add_menu_page(__('MTS Simple Booking', self::DOMAIN), __('Simple Booking', self::DOMAIN), 'administrator', self::ADMIN_MENU, array($this, 'menu_calendar')); add_submenu_page(self::ADMIN_MENU, __('Calendar', self::DOMAIN), __('Calendar', self::DOMAIN), 'administrator', self::ADMIN_MENU, array($this, 'menu_calendar')); $blistHook = add_submenu_page(self::ADMIN_MENU, __('List Booking', self::DOMAIN), __('List Booking', self::DOMAIN), 'administrator', self::PAGE_LIST, array($this, 'menu_list')); add_action('load-' . $blistHook, array($this, 'loadListBooking')); add_submenu_page(self::ADMIN_MENU, __('Add & Edit', self::DOMAIN), __('Add & Edit', self::DOMAIN), 'administrator', self::PAGE_BOOKING, array($this, 'menu_booking')); add_submenu_page(self::ADMIN_MENU, __('Schedule', self::DOMAIN), __('Schedule', self::DOMAIN), 'administrator', self::PAGE_SCHEDULE, array($this, 'menu_schedule')); add_submenu_page(self::ADMIN_MENU, __('Option', self::DOMAIN), __('Option', self::DOMAIN), 'administrator', self::PAGE_OPTION, array($this, 'menu_option')); add_submenu_page(self::ADMIN_MENU, __('Mail Template', self::DOMAIN), __('Mail Template', self::DOMAIN), 'administrator', self::PAGE_MAIL_TEMPLATE, array($this, 'menu_mail_template')); add_submenu_page(self::ADMIN_MENU, __('Settings', self::DOMAIN), __('Settings', self::DOMAIN), 'administrator', self::PAGE_SETTINGS, array($this, 'menu_settings')); }
【変更後】
/** * 管理画面メニュー登録 * */ public function add_admin_menu() { add_menu_page(__('MTS Simple Booking', self::DOMAIN), __('Simple Booking', self::DOMAIN), 'publish_pages', self::ADMIN_MENU, array($this, 'menu_calendar')); add_submenu_page(self::ADMIN_MENU, __('Calendar', self::DOMAIN), __('Calendar', self::DOMAIN), 'publish_pages', self::ADMIN_MENU, array($this, 'menu_calendar')); $blistHook = add_submenu_page(self::ADMIN_MENU, __('List Booking', self::DOMAIN), __('List Booking', self::DOMAIN), 'publish_pages', self::PAGE_LIST, array($this, 'menu_list')); add_action('load-' . $blistHook, array($this, 'loadListBooking')); add_submenu_page(self::ADMIN_MENU, __('Add & Edit', self::DOMAIN), __('Add & Edit', self::DOMAIN), 'publish_pages', self::PAGE_BOOKING, array($this, 'menu_booking')); add_submenu_page(self::ADMIN_MENU, __('Schedule', self::DOMAIN), __('Schedule', self::DOMAIN), 'publish_pages', self::PAGE_SCHEDULE, array($this, 'menu_schedule')); add_submenu_page(self::ADMIN_MENU, __('Option', self::DOMAIN), __('Option', self::DOMAIN), 'publish_pages', self::PAGE_OPTION, array($this, 'menu_option')); add_submenu_page(self::ADMIN_MENU, __('Mail Template', self::DOMAIN), __('Mail Template', self::DOMAIN), 'publish_pages', self::PAGE_MAIL_TEMPLATE, array($this, 'menu_mail_template')); add_submenu_page(self::ADMIN_MENU, __('Settings', self::DOMAIN), __('Settings', self::DOMAIN), 'publish_pages', self::PAGE_SETTINGS, array($this, 'menu_settings')); }
コメントは受け付けていません。