Ejemplo n.º 1
0
 /**
  * Registers the Metabox for the specified page(s)
  */
 public function register()
 {
     // Filter link Metaboxes
     $this->pages = array_diff($this->pages, array('link'));
     $res = parent::register();
     if ($res) {
         add_action('save_post', array($this, '_onSave'));
         add_action('delete_post', array($this, '_onDelete'));
     }
     return $res;
 }
Ejemplo n.º 2
0
 /**
  * Registers the Metabox for the specified page(s)
  */
 public function register()
 {
     // Force to link Metabox
     $this->pages = array('link');
     $res = parent::register();
     if ($res) {
         add_action('add_link', array($this, '_onSave'));
         add_action('edit_link', array($this, '_onSave'));
         add_action('delete_link', array($this, '_onDelete'));
     }
     return $res;
 }