[wp-trac] [WordPress Trac] #40044: A little strange logic in get_header_video_url() function
WordPress Trac
noreply at wordpress.org
Wed Nov 27 04:13:21 UTC 2019
#40044: A little strange logic in get_header_video_url() function
-------------------------+------------------------------
Reporter: Tkama | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+------------------------------
Changes (by dlh):
* keywords: => needs-patch
* version: 4.7.2 => 4.7
Comment:
It does look like the `external_header_video` theme mod needs to be
retrieved only when there's no `$id`.
The use of `esc_url()` on the raw theme mod also seems premature since
it's not known whether the value will be used for display, although there
could be some other reason it's present.
I would say escaping on output in `the_header_video_url()` is correct,
though, since that is for-sure for display, and there's no guarantee that
the value will have been escaped beforehand.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40044#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list