[wp-trac] [WordPress Trac] #38172: Enable Video Headers in Custom Headers
WordPress Trac
noreply at wordpress.org
Thu Oct 27 14:53:14 UTC 2016
#38172: Enable Video Headers in Custom Headers
-------------------------------------+-------------------------------------
Reporter: davidakennedy | Owner: joemcgill
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 4.7
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch ui-feedback | Focuses: ui, accessibility,
ux-feedback dev-feedback has- | javascript
screenshots |
-------------------------------------+-------------------------------------
Comment (by joemcgill):
One thing I noticed that makes the developer experience a bit strange is
the mismatch between the new function `the_custom_header()` which prints
the markup for custom headers, and `get_custom_header()`, which returns an
object containing the settings for custom headers. Generally, our
`the_{name of thing}()` functions are wrappers for their `get_{name of
thing}()` counterparts.
In [attachment:38172.14.diff] I'm proposing the we rename
`the_custom_header()` to `the_custom_header_html()` which is a wrapper for
a new `get_the_custom_header_html()` function. This also adds a
`has_custom_header()` function that can be used in
`get_custom_header_html()` and also by themes before printing their custom
header markup. I've updated both Twenty Seventeen and Twenty Fourteen to
use the new function names.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38172#comment:68>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list