[wp-trac] [WordPress Trac] #38639: Improve the user and developer experience for new custom header functions
WordPress Trac
noreply at wordpress.org
Wed Nov 2 23:10:26 UTC 2016
#38639: Improve the user and developer experience for new custom header functions
--------------------------+------------------------------
Reporter: bradyvercher | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by bradyvercher):
In [attachment:38639.diff]:
* Removes the `is_front_page()` conditional in `has_header_video()`
* Adds a `show_video` argument to `the_custom_header_markup()` that
defaults to only displaying video on the front page.
* Updates the `get_customer_header_markup()` to always output the
container div in the Customizer for selective refresh support.
* Updates the Twenty Seventeen and Twenty Fourteen implementations.
I've also added a bunch of "unit" tests.
* The changes in `_remove_theme_support()` were required, otherwise all
sorts of notices would be thrown, causing the tests to fail.
* #38633 and #38557 are required for the tests to pass.
* Calling `add_theme_support( 'custom-header' )` in the tests should be
avoided since it sets a number of constants, which would poison subsequent
tests. The `_add_theme_support()` method isn't ideal, but it's the only
way I could think of to get around the constants.
* The dummy video for the tests came from
[https://github.com/mathiasbynens/small this repo] and is public domain.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38639#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list