[wp-trac] [WordPress Trac] #22080: add_theme_support should merge post-thumbnail post types by default (currently stomps)

WordPress Trac noreply at wordpress.org
Mon Apr 25 18:13:14 UTC 2016


#22080: add_theme_support should merge post-thumbnail post types by default
(currently stomps)
--------------------------------------+------------------
 Reporter:  alexkingorg               |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  4.6
Component:  Post Thumbnails           |     Version:  2.9
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------
Changes (by flixos90):

 * keywords:  has-patch needs-refresh => has-patch has-unit-tests
 * milestone:  Future Release => 4.6


Comment:

 The patch looks good. In [attachment:22080.2.diff] I fixed just a minor
 issue (function needs to return `void` instead of `true` when successful),
 plus I added some unit tests.

 Replying to [comment:28 jmichaelward]:
 > At this point, there is a question of intent. A developer who calls, for
 instance, `add_theme_support( 'post-thumbnails, array( 'post' ) );` may in
 fact be intending to disable post thumbnails for all other post types
 where it was previously supported, but as
 [https://core.trac.wordpress.org/ticket/22080#comment:9 @scribu
 indicated], there is another method to do that:
 `remove_post_type_support()`.

 I'll open another ticket to enhance `remove_theme_support()` so that it
 can be used to remove particular parts of what a theme supports so that
 this proposal can actually work. Without a change in
 `remove_theme_support()`, it wouldn't be possible to remove a specific
 post type (in case we explicitly don't want it to support post
 thumbnails).

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


More information about the wp-trac mailing list