has_header_video() should be filtered
|Reported by:||wpweaver||Owned by:||SergeyBiryukov|
function has_header_video() is totally dependent on having a video URL set by the Header Media menu.
The returned value of the function should be filtered. It is easily possible to use 'header_video_settings' to replace the 'videoUrl' setting. But the fact that has_header_video() is used various places by the header video code, it makes it difficult to supply an alternate video if there is no get_theme_mod( 'external_header_video' ) set.
It is perfectly reasonable to want to use the Header Video script with 'header_video_settings', but having has_video_header() fail makes it really hard to do. If the result was filtered, then the plugin/theme could provide an alternative videoURL even when the 'external_header_video' has not been set.
All of the other critical elements have filters, but not having one for has_header_video() makes all of the other filters somewhat incomplete. The filter should obviously be named 'has_header_video'.
Change History (16)
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 4.7.2
7 weeks ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened