[wp-trac] [WordPress Trac] #17620: get_post_types check for supporting title

WordPress Trac wp-trac at lists.automattic.com
Mon May 30 18:06:49 UTC 2011


#17620: get_post_types check for supporting title
--------------------------+-------------------------
 Reporter:  GaryJ         |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Post Types    |     Version:  3.2
 Severity:  normal        |  Resolution:  worksforme
 Keywords:  close         |
--------------------------+-------------------------
Changes (by scribu):

 * status:  new => closed
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 {{{get_post_types( array( 'supports' => array( 'title' ) )}}}, regardless
 of operator, will only match post types that only support 'title'.

 Similarly, {{{get_post_types( array( 'supports' => array( 'title',
 'editor' ) )}}} will only match post types that only support 'title' and
 'editor'. No more, no less.

 You will just have to loop through each of them, using
 post_type_supports(), since there's no elegant way to define the operator
 between elements in the 'supports' array.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17620#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list