public function __construct($oProp) { parent::__construct($oProp); if ($this->oProp->bIsAdmin) { add_action('wp_loaded', array($this, '_replyToDetermineToLoad')); } }
function __construct($sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework') { $this->oProp = isset($this->oProp) ? $this->oProp : new FetchTweets_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') { if (empty($asPostTypeOrScreenID)) { return; } $_sClassName = get_class($this); parent::__construct(isset($this->oProp) ? $this->oProp : new FetchTweets_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')); } }