Ejemplo n.º 1
0
 public function init($args = array())
 {
     $this->type = "learnout";
     $this->label = "Learn. Outcome";
     $this->menu_pos = 0;
     parent::init(array('supports' => array('title')));
 }
Ejemplo n.º 2
0
 public function init($args = array())
 {
     $this->menu_pos = -1;
     $this->type = "review";
     $this->label = "Item Review";
     parent::init(array('supports' => false, 'taxonomies' => array()));
     // TODO: delete review
     add_filter('post_updated_messages', array($this, 'WPCB_post_updated_messages'));
 }
Ejemplo n.º 3
0
 public function init($args = array())
 {
     if (!isset($this->type)) {
         $this->type = "item";
         $this->label = "Item";
         $this->menu_pos = 0;
     }
     parent::init();
     $classname = get_called_class();
     add_filter('post_updated_messages', array($this, 'WPCB_post_updated_messages'));
     add_action('contextual_help', array($this, 'WPCB_contextual_help'), 10, 3);
     if ($this->type != "itembasket") {
         add_action("save_post_revision", array("eal_{$this->type}", 'save'), 10, 2);
     }
     add_filter('wp_get_revision_ui_diff', array($this, 'WPCB_wp_get_revision_ui_diff'), 10, 3);
     add_filter('posts_search', array($this, 'WPCB_post_search'), 10, 2);
     /* hide shortlink block */
     add_filter('get_sample_permalink_html', '__return_empty_string', 10, 5);
     add_filter('pre_get_shortlink', '__return_empty_string');
 }