[wp-trac] [WordPress Trac] #39512: has_header_video() should be filtered
WordPress Trac
noreply at wordpress.org
Sat Jan 21 19:06:02 UTC 2017
#39512: has_header_video() should be filtered
--------------------------+--------------------
Reporter: wpweaver | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.2
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+--------------------
Changes (by celloexpressions):
* keywords: has-patch => needs-patch
Comment:
Replying to [comment:5 SergeyBiryukov]:
> > 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.
>
> FWIW, `get_theme_mod()` is filterable, so it should be possible to set
an alternative video URL using `theme_mod_external_header_video` filter.
While it's possible to filter from the get_theme_mod, I think it makes
sense to introduce another filter here. However, I actually agree that a
filter on `get_header_video_url()` would be better than on
`has_header_video`, since that offers the most flexibility.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39512#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list