public function __construct($oProp) { parent::__construct($oProp); if ($this->oProp->bIsAdmin) { add_action('wp_loaded', array($this, '_replyToDetermineToLoad')); } }
public function _replyToLoadComponents() { if ('plugins.php' === $this->oProp->sPageNow) { $this->oLink = $this->_replyTpSetAndGetInstance_oLink(); } parent::_replyToLoadComponents(); }
public function __construct($oProp) { parent::__construct($oProp); if (!$this->oProp->bIsAdmin) { return; } $this->oUtil->registerAction('current_screen', array($this, '_replyToDetermineToLoad')); add_action('set_up_' . $this->oProp->sClassName, array($this, '_replyToSetUpHooks')); }
function __construct($sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework') { // Objects $this->oProp = isset($this->oProp) ? $this->oProp : new AdminPageFramework_Property_Page($this, $sCallerPath, get_class($this), $sOptionKey, $sCapability, $sTextDomain); parent::__construct($this->oProp); if ($this->oProp->bIsAdminAjax) { return; } if ($this->oProp->bIsAdmin) { add_action('wp_loaded', array($this, 'setup_pre')); } }
public function __construct($sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array('post'), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework') { parent::__construct($this->oProp); $this->oProp->sMetaBoxID = $sMetaBoxID ? $this->oUtil->sanitizeSlug($sMetaBoxID) : strtolower($this->oProp->sClassName); $this->oProp->sTitle = $sTitle; $this->oProp->sContext = $sContext; $this->oProp->sPriority = $sPriority; if (!$this->oProp->bIsAdmin) { return; } $this->oUtil->registerAction('current_screen', array($this, '_replyToDetermineToLoad')); }
/** * Redirects undefined callback methods or to the appropriate methods. * * @since 3.2.0 * @internal */ public function __call($sMethodName, $aArgs = null) { if ('setup_pre' === $sMethodName) { $this->_setUp(); $this->oUtil->addAndDoAction($this, "set_up_{$this->oProp->sClassName}", $this); $this->oProp->_bSetupLoaded = true; return; } if (has_filter($sMethodName)) { return isset($aArgs[0]) ? $aArgs[0] : null; } parent::__call($sMethodName, $aArgs); }
public function __construct($sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array('post'), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'admin-page-framework') { if (empty($asPostTypeOrScreenID)) { return; } $_sClassName = get_class($this); parent::__construct(isset($this->oProp) ? $this->oProp : new AdminPageFramework_Property_MetaBox($this, $_sClassName, $sCapability)); $this->oProp->sMetaBoxID = $sMetaBoxID ? $this->oUtil->sanitizeSlug($sMetaBoxID) : strtolower($_sClassName); $this->oProp->sTitle = $sTitle; $this->oProp->sContext = $sContext; $this->oProp->sPriority = $sPriority; if ($this->oProp->bIsAdmin) { add_action('current_screen', array($this, '_replyToDetermineToLoad')); } }
public function __call($sMethodName, $aArgs = null) { $_sPageSlug = $this->oProp->getCurrentPageSlug(); $_sTabSlug = $this->oProp->getCurrentTabSlug($_sPageSlug); $_mFirstArg = $this->oUtil->getElement($aArgs, 0); $_aKnownMethodPrefixes = array('section_pre_', 'field_pre_', 'load_pre_'); switch ($this->_getCallbackName($sMethodName, $_sPageSlug, $_aKnownMethodPrefixes)) { case 'setup_pre': $this->_doSetUp(); return; case $this->oProp->sClassHash . '_page_' . $_sPageSlug: return $this->_renderPage($_sPageSlug, $_sTabSlug); case 'section_pre_': return $this->_renderSectionDescription($sMethodName); case 'field_pre_': return $this->_renderSettingField($_mFirstArg, $_sPageSlug); case 'load_pre_': return $this->_doPageLoadCall($sMethodName, $_sPageSlug, $_sTabSlug, $_mFirstArg); default: return parent::__call($sMethodName, $aArgs); } }
public function __construct($oProp) { parent::__construct($oProp); $this->oUtil->registerAction('widgets_init', array($this, '_replyToDetermineToLoad')); }
/** * Redirects undefined callback methods. * @internal * @since 3.0.0 * @deprecated */ function ___call($sMethodName, $aArgs = null) { if (has_filter($sMethodName)) { return isset($aArgs[0]) ? $aArgs[0] : null; } return parent::__call($sMethodName, $aArgs); }