[wp-trac] [WordPress Trac] #38557: Format for registering a default header image is ambiguous
WordPress Trac
noreply at wordpress.org
Fri Oct 28 23:49:20 UTC 2016
#38557: Format for registering a default header image is ambiguous
--------------------------+------------------------------
Reporter: bradyvercher | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Changes (by bradyvercher):
* keywords: => has-patch
* component: General => Themes
Comment:
The easy fix would be to handle the replacements in the two files
mentioned, but in [attachment:38557.diff] I tried doing the replacements
when registering default images instead. That should move a bunch of
similar logic to a single location, remove duplicate code, and reduce
ambiguity when calling `get_theme_support( 'custom-header', 'default-
image' )`.
If there's any external code that relies on `$_wp_default_headers`, it
could potentially have trouble, but I'd expect that to be an extreme edge
case. Otherwise, I can't think of any reason the replacements need to
happen when reading the value instead of during assignment.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38557#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list