/** * Hanlde Metabox initialization process * * @return void * * @access public */ public function metaboxes() { global $post; //make sure that nobody is playing with screen options if ($post instanceof WP_Post) { $screen = $post->post_type; } elseif ($screen_object = get_current_screen()) { $screen = $screen_object->id; } else { $screen = ''; } if (AAM_Core_Request::get('init') == 'metabox') { $model = new AAM_Backend_Metabox(); $model->initialize($screen); } else { AAM::getUser()->getObject('metabox')->filterBackend($screen); } }
/** * Construct the view object * * @return void * * @access protected */ protected function __construct() { $classname = 'AAM_Core_Subject_' . ucfirst(AAM_Core_Request::request('subject')); if (class_exists($classname)) { $this->setSubject(new $classname(AAM_Core_Request::request('subjectId'))); } //register default features AAM_Backend_Menu::register(); AAM_Backend_Metabox::register(); AAM_Backend_Capability::register(); AAM_Backend_Post::register(); AAM_Backend_Extension::register(); //feature registration hook do_action('aam-feature-registration'); }