Opened 6 years ago
Closed 5 years ago
#46718 closed defect (bug) (invalid)
Loading from source in WP_Widget_Media_Video
Reported by: | spacedmonkey | Owned by: | desrosj |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.8 |
Component: | Widgets | Keywords: | has-patch |
Focuses: | Cc: |
Description
The video widget allow for src url. However, checks are for attachment that are unnecessary.
Attachments (2)
Change History (12)
#4
@
5 years ago
- Milestone changed from Awaiting Review to 5.4
- Owner set to audrasjb
- Status changed from new to accepted
#8
@
5 years ago
- Keywords commit removed
- Resolution fixed deleted
- Status changed from closed to reopened
I'm reopening this to revert.
After committing some tests started failing so I dug a bit deeper.
Even though the $attachment
check appears redundant, the intention of including it is to ensure the attachment's src
is passed through wp_video_shortcode()
and the associated filters. The else
condition should only be used for videos that are not attachments, and those that do not match the special scenarios (YouTube/Vimeo).
I am going to close this out after reverting, but if this assessment seems incorrect, please let me know!
Note: See
TracTickets for help on using
tickets.
if ( $src )
seems to be redundant, given theif ( empty( $src ) ) { return; }
check above.