[wp-trac] [WordPress Trac] #38738: Remove front page restrictions from new custom header functions
WordPress Trac
noreply at wordpress.org
Tue Nov 15 01:00:39 UTC 2016
#38738: Remove front page restrictions from new custom header functions
--------------------------------------------------+--------------------
Reporter: peterwilsoncc | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd-opinion | Focuses:
--------------------------------------------------+--------------------
Comment (by bradyvercher):
Replying to [comment:24 flixos90]:
> Sorry I somehow overlooked the constants being defined. Regarding the
global though, I think we should make sure it is reset to its original
value afterwards, I think this should be the case in any unit tests where
a global is modified as this can also poison subsequent tests.
No worries! The global should be reset in the `tearDown()` method when it
calls `remove_theme_support( 'custom-header' );`. Here's where that
happens in core:
https://github.com/WordPress/WordPress/blob/8e6753ceadab17e132baf53f52f3e7fa8cc76798
/wp-includes/theme.php#L2338
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38738#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list