예제 #1
0
 function __construct($post_type, $post_parent = null)
 {
     global $post_type_object;
     $this->post_type = $post_type;
     $this->post_parent = $post_parent;
     parent::__construct();
     $post_type_object = get_post_type_object($this->post_type);
 }
 function __construct($args = array())
 {
     global $frontend_uploader;
     $screen = get_current_screen();
     if ($screen->post_type == '') {
         $screen->post_type = 'post';
     }
     add_filter("{$screen->post_type}_row_actions", array($this, '_add_row_actions'), 10, 2);
     parent::__construct(array('screen' => $screen));
 }
 function __construct()
 {
     global $frontend_uploader;
     $screen = get_current_screen();
     if ($screen->post_type == '') {
         $screen->post_type = 'post';
     }
     foreach ((array) $frontend_uploader->settings['enabled_post_types'] as $post_type) {
         add_filter("{$post_type}_row_actions", array($this, '_add_row_actions'), 10, 2);
     }
     parent::__construct(array('screen' => $screen));
 }
예제 #4
0
 /**
  * Create a new posts list
  *
  * @param string $post_type
  */
 public function __construct($post_type = 'post')
 {
     // set local properties
     $this->post_type = $post_type;
     // set this is for wp_query (yeah, i know)
     $_GET['post_type'] = $this->post_type;
     // run parent constructor
     parent::__construct();
 }
예제 #5
0
 /**
  * Sets object properties and calls parent constructor
  *
  * @param int[] $article_ids IDs of articles to display
  */
 function __construct($article_ids)
 {
     $this->article_ids = $article_ids;
     parent::__construct(['screen' => EDW_PRINT_ISSUE_CPT]);
 }