public function __construct($sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework') { if (!$this->_isInstantiatable()) { return; } parent::__construct($sOptionKey, $sCallerPath ? trim($sCallerPath) : ($sCallerPath = is_admin() && (isset($GLOBALS['pagenow']) && in_array($GLOBALS['pagenow'], array('plugins.php')) || isset($_GET['page'])) ? FetchTweets_AdminPageFramework_Utility::getCallerScriptPath(__FILE__) : null), $sCapability, $sTextDomain); $this->oUtil->addAndDoAction($this, 'start_' . $this->oProp->sClassName, $this); }
public function __construct($sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_network', $sTextDomain = 'admin-page-framework') { if (!$this->_isInstantiatable()) { return; } add_action('network_admin_menu', array($this, '_replyToBuildMenu'), 98); $sCallerPath = $sCallerPath ? $sCallerPath : FetchTweets_AdminPageFramework_Utility::getCallerScriptPath(__FILE__); $this->oProp = new FetchTweets_AdminPageFramework_Property_NetworkAdmin($this, $sCallerPath, get_class($this), $sOptionKey, $sCapability, $sTextDomain); parent::__construct($sOptionKey, $sCallerPath, $sCapability, $sTextDomain); }
public function __construct($sPostType, $aArgs = array(), $sCallerPath = null, $sTextDomain = 'admin-page-framework') { if (empty($sPostType)) { return; } $this->oProp = new FetchTweets_AdminPageFramework_Property_PostType($this, $sCallerPath ? trim($sCallerPath) : (is_admin() && isset($GLOBALS['pagenow']) && in_array($GLOBALS['pagenow'], array('edit.php', 'post.php', 'post-new.php', 'plugins.php', 'tags.php', 'edit-tags.php')) ? FetchTweets_AdminPageFramework_Utility::getCallerScriptPath(__FILE__) : null), get_class($this), 'publish_posts', $sTextDomain, 'post_type'); $this->oProp->sPostType = FetchTweets_AdminPageFramework_WPUtility::sanitizeSlug($sPostType); $this->oProp->aPostTypeArgs = $aArgs; parent::__construct($this->oProp); $this->oUtil->addAndDoAction($this, "start_{$this->oProp->sClassName}", $this); }
public function __get($sName) { if ('aScriptInfo' === $sName) { $this->sCallerPath = $this->sCallerPath ? $this->sCallerPath : FetchTweets_AdminPageFramework_Utility::getCallerScriptPath(__FILE__); $this->aScriptInfo = $this->getCallerInfo($this->sCallerPath); return $this->aScriptInfo; } if ('aOptions' === $sName) { $this->aOptions = $this->_getOptions(); return $this->aOptions; } if ('aLastInput' === $sName) { $this->aLastInput = $this->_getLastInput(); return $this->aLastInput; } }