* * Copyright (c) 2013-2022, Michael Uno; Licensed under MIT */ abstract class AdminPageFramework_PageMetaBox_Router extends AdminPageFramework_MetaBox_View { protected $oResource; protected function _isInstantiatable() { if ($this->_isWordPressCoreAjaxRequest()) { return false; } return true; } protected function _isInThePage() { if (! $this->oProp->bIsAdmin) { return false; } $_sPageSlug = $this->oUtil->getElement($this->oProp->aQuery, array( 'page' ), ''); if (! $this->___isAddedPage($_sPageSlug)) { return false; } return true; } private function ___isAddedPage($sPageSlug) { if (! $this->oUtil->isAssociative($this->oProp->aPageSlugs)) { return in_array($sPageSlug, $this->oProp->aPageSlugs, true); } return in_array($sPageSlug, array_keys($this->oProp->aPageSlugs), true); } protected function _isValidAjaxReferrer() { return true; } }