[wp-trac] [WordPress Trac] #39512: has_header_video() should be filtered

WordPress Trac noreply at wordpress.org
Sat Jan 7 00:56:30 UTC 2017


#39512: has_header_video() should be filtered
--------------------------+-----------------------------
 Reporter:  wpweaver      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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'.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39512>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list