/**
  * Provides access to protected class properties.
  * @since  0.2.0
  * @param  boolean $key Specific CPT parameter to return
  * @return mixed        Specific CPT parameter or array of singular, plural and registered name
  */
 public function post_type($key = 'post_type')
 {
     if (!$this->overrides_processed) {
         $this->filter_values();
     }
     return parent::post_type($key);
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  * Register Custom Post Types. See documentation in CPT_Core, and in wp-includes/post.php
  *
  * @since 0.1.0
  * @return  null
  */
 public function __construct($plugin)
 {
     $this->plugin = $plugin;
     $this->hooks();
     // Register this cpt
     // First parameter should be an array with Singular, Plural, and Registered name
     parent::__construct(array($this->plugin->name . ' ' . __('Log', 'wds-log-post'), $this->plugin->name . ' ' . __('Logs', 'wds-log-post'), $this->plugin->key), array('supports' => false, 'menu_icon' => 'dashicons-book-alt', 'show_in_admin_bar' => false, 'public' => false, 'hierarchical' => false, 'menu_position' => 100, 'capabilities' => array('create_posts' => is_multisite() ? 'do_not_allow' : false, 'delete_posts' => 'delete_posts')));
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  * Register Custom Post Types. See documentation in CPT_Core, and in wp-includes/post.php
  *
  * @since 0.1.0
  * @return  null
  */
 public function __construct($plugin)
 {
     $this->plugin = $plugin;
     $this->hooks();
     // Register this cpt
     // First parameter should be an array with Singular, Plural, and Registered name
     parent::__construct(array(__('Chapter', 'sed-features'), __('Chapters', 'sed-features'), 'sedf-chapter'), array('supports' => array('title', 'editor', 'excerpt', 'thumbnail')));
 }
 /**
  * Constructor
  * Register Custom Post Types. See documentation in CPT_Core, and in wp-includes/post.php
  *
  * @since  0.1.0
  * @return void
  */
 public function __construct($plugin)
 {
     $this->plugin = $plugin;
     $this->hooks();
     // Register this cpt
     // First parameter should be an array with Singular, Plural, and Registered name
     parent::__construct(array(__('Announcement', 'wds-announcements'), __('Announcements', 'wds-announcements'), 'wds-announcements'), array('supports' => array('title'), 'menu_icon' => 'dashicons-megaphone'));
 }
Ejemplo n.º 5
0
 /**
  * Constructor
  *
  * @since 1.0.0
  * @return  null
  */
 public function __construct()
 {
     parent::__construct();
 }