[wp-trac] [WordPress Trac] #25333: Can't remove theme support for certain custom header arguments

WordPress Trac noreply at wordpress.org
Thu Nov 14 12:59:28 UTC 2013


#25333: Can't remove theme support for certain custom header arguments
--------------------------+------------------------------
 Reporter:  kovshenin     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Themes        |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by kovshenin):

 * keywords:  needs-patch 2nd-opinion => has-patch


Comment:

 Sooooo, more back compat code, yey! [attachment:25333.diff] makes sure
 that values from defines is read only once and doesn't set any defines
 before `wp_loaded` runs. With this approach, child themes can override the
 parent theme's values by providing them first, either with a `define` or
 with `add_theme_support`.

 However, any theme or plugin at any stage can use `remove_theme_support`
 and `add_theme_support` to provide new values, regardless of any defines
 and prior calls to `add_theme_support`. Tests included with the patch. And
 since our tests run after `wp_loaded` I also created a little
 [https://gist.github.com/kovshenin/7465664 plugin] to test those defines.

 If this works, we can use the same approach for the defines in custom
 background.

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


More information about the wp-trac mailing list