[wp-trac] [WordPress Trac] #15000: add_meta_box() should accept array of post types

WordPress Trac noreply at wordpress.org
Fri Jun 13 00:44:00 UTC 2014


#15000: add_meta_box() should accept array of post types
----------------------------+-----------------------
 Reporter:  coffee2code     |       Owner:
     Type:  enhancement     |      Status:  reopened
 Priority:  normal          |   Milestone:
Component:  Administration  |     Version:  3.0.1
 Severity:  minor           |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+-----------------------
Changes (by ericlewis):

 * keywords:  has-patch =>
 * status:  closed => reopened
 * resolution:  duplicate =>


Comment:

 I think we should do this. Passing arrays of post types is common practice
 in other APIs.

 Think

 `WP_Query( array( 'post_type' => array( 'post', 'page' ) ) );`

 which also supports

 `WP_Query( array( 'post_type' => 'post' ) );`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15000#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list