[wp-trac] [WordPress Trac] #34009: Need ability to query what post_type_supports values plugins and themes might use

WordPress Trac noreply at wordpress.org
Fri Sep 25 10:11:31 UTC 2015


#34009: Need ability to query what post_type_supports values plugins and themes
might use
-------------------------------+-----------------------------
 Reporter:  bobbingwide        |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 A number of plugins and themes define their own values to pass to
 add_post_type_support(). e.g. Jetpack's `publicize`, and the Genesis theme
 framework's values prefixed with `genesis-`.

 I have a post type UI where I allow the user to decide which feature a
 post type supports. The current API does not allow me to find the full set
 of possible values.
 `$_wp_post_type_features` only lets me find out what's currently
 registered.

 I propose a new API `get_all_post_type_supports_features()` that invokes a
 filter  `post_type_supports` to allow plugins and themes to return a
 complete list of post type supports values, along with user friendly
 labels.

 Currently my routine returns the set I can get from
 `$_wp_post_type_features`
 and my filter function augments it with additional options.

 {{{
 array (
 'publicize' => "Publicize with Jetpack"
 'home' => "Display in blog home page"
 'genesis-layouts' => "Genesis layouts"
  ...
 )
 }}}

 WordPress core would respond to the `post_type_supports` filter with:
 title, editor, author, etcetera

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list