* * Copyright (c) 2013-2022, Michael Uno; Licensed under MIT */ abstract class AdminPageFramework_MetaBox extends AdminPageFramework_MetaBox_Controller { protected $_sStructureType = 'post_meta_box'; public function __construct($sMetaBoxID, $sTitle, $asPostTypeOrScreenID=array( 'post' ), $sContext='normal', $sPriority='default', $sCapability='edit_posts', $sTextDomain='admin-page-framework') { if (! $this->_isInstantiatable()) { return; } if (empty($asPostTypeOrScreenID)) { return; } $_sPropertyClassName = isset($this->aSubClassNames[ 'oProp' ]) ? $this->aSubClassNames[ 'oProp' ] : 'AdminPageFramework_Property_' . $this->_sStructureType; $this->oProp = new $_sPropertyClassName($this, get_class($this), $sCapability, $sTextDomain, $this->_sStructureType); $this->oProp->aPostTypes = is_string($asPostTypeOrScreenID) ? array( $asPostTypeOrScreenID ) : $asPostTypeOrScreenID; parent::__construct($sMetaBoxID, $sTitle, $asPostTypeOrScreenID, $sContext, $sPriority, $sCapability, $sTextDomain); } }