[wp-trac] [WordPress Trac] #41739: Support a "source" attribute in post types, taxonomies, and post statuses

WordPress Trac noreply at wordpress.org
Mon Aug 28 02:27:56 UTC 2017


#41739: Support a "source" attribute in post types, taxonomies, and post statuses
-------------------------------+------------------------------
 Reporter:  johnjamesjacoby    |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  3.0
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by johnjamesjacoby):

 Replying to [comment:1 SergeyBiryukov]:
 > `WP_Post_Type::set_props()` already sets any custom properties you pass
 to `register_post_type()`, so this appears to be possible without any
 special support from WordPress core.

 > Just tested by adding `'source' => 'bbpress'` to the post types in
 `bbPress::register_post_types()` and checking `get_post_types( array(
 'source' => 'bbpress' ) )`.

 Yep! It will work, but... I think it's an idea worth officially endorsing
 and promoting as a best practice.

 (I added it to bbPress as I was creating this ticket:
 https://bbpress.trac.wordpress.org/changeset/6672)

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


More information about the wp-trac mailing list