Ejemplo n.º 1
0
 /**
  * Adds a metabox to a container
  * 
  * @param IfwPsn_Wp_Plugin_Metabox_Abstract $metabox
  */
 public function addMetabox(IfwPsn_Wp_Plugin_Metabox_Abstract $metabox)
 {
     if ($metabox instanceof IfwPsn_Wp_Plugin_Metabox_Abstract) {
         $this->_metaboxes[] = $metabox;
         add_meta_box($metabox->getId(), $metabox->getTitle(), array($metabox, 'render'), $this->_screen, $this->_context, $metabox->getPriority());
     }
 }
Ejemplo n.º 2
0
 /**
  * @param IfwPsn_Wp_Plugin_Manager $pm
  */
 public function __construct(IfwPsn_Wp_Plugin_Manager $pm, $ajaxRequest = null)
 {
     parent::__construct($pm);
     if ($ajaxRequest instanceof IfwPsn_Wp_Ajax_Request) {
         $this->_ajaxRequest = $ajaxRequest;
     }
 }