public static function initialize() { if (!wskl_license_authorized('marketing')) { return; } /** * 블로그 자동 포스팅 메타 박스 */ add_action('add_meta_boxes', array(__CLASS__, 'meta_box_post_export'), 10, 0); add_action('save_post', array(__CLASS__, 'callback_save_post'), 99, 3); }
/** * @param $license_type * @param mixed $tabs * @param $callback * * @used-by Woosym_Korean_Localization::init_payment_modules() * @used-by Woosym_Korean_Localization::init_essential_modules() * @used-by Woosym_Korean_Localization::init_extension_modules() * @used-by Woosym_Korean_Localization::init_marketing_modules() * * @return bool */ private function admin_notice_unauthorized($license_type, $tabs, $callback) { $authorized = wskl_license_authorized($license_type); if (!$authorized && $this->is_request('admin')) { if (is_string($tabs)) { $tabs = array($tabs); } $page = wskl_GET('page'); $_tab = wskl_GET('tab'); if ($page == WSKL_MENU_SLUG && in_array($_tab, $tabs)) { add_action('admin_notices', $callback); } } return $authorized; }