[wp-trac] [WordPress Trac] #36666: Enhance `remove_theme_support()` so that it can take additional arguments

WordPress Trac noreply at wordpress.org
Mon May 2 11:44:51 UTC 2016


#36666: Enhance `remove_theme_support()` so that it can take additional arguments
------------------------------------+------------------------------
 Reporter:  flixos90                |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Themes                  |     Version:  3.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by swissspidy):

 From what I've just read now, this ticket would benefit from one main
 thing: tests.

 For example, a quick look at [attachment:36666.4.diff] reveals that
 `_remove_theme_support( 'custom-header-uploads' )` won't work anymore with
 that patch because the function bails early for non-existent feature, thus
 breaking backwards compatibility.

 I'd suggest writing plenty of tests for the current behaviour of
 `remove_theme_support()`, then adding tests for the suggested `$args`
 param and finally the actual implementation.

 Regarding the patch, I wouldn't just add braces everywhere because we can,
 but only on lines we actually touch. Looks like a mess otherwise.

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


More information about the wp-trac mailing list