Opened 7 years ago
Closed 6 years ago
#46718 closed defect (bug) (invalid)
Loading from source in WP_Widget_Media_Video
| Reported by: | spacedmonkey | Owned by: | desrosj |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Widgets | Version: | 4.8 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
The video widget allow for src url. However, checks are for attachment that are unnecessary.
Attachments (2)
Change History (12)
#8
@
6 years ago
- Keywords commit removed
- Resolution fixed
- Status closed → 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!
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
if ( $src )seems to be redundant, given theif ( empty( $src ) ) { return; }check above.