Opened 8 years ago
Last modified 5 years ago
#36293 new defect (bug)
video/audio object passed to wp_video_shortcode/wp_audio_shortcode is always null
Reported by: | gnotaras | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | docs | Cc: |
Description
Hi,
The following:
apply_filters( 'wp_video_shortcode', $output, $atts, $video, $post_id, $library ); apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library );
send the $video
and $audio
objects respectively to the filtering function.
However, these objects seem to be always null
.
By checking the relevant code I notice that these objects are only set when the $primary
variable is set to false
. The code does not clarify why the audio/video object is bound to that variable. Perhaps someone more familiar with the logic behind these functions should check this please.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Thanks for reporting @gnotaras.
We discussed the ticket briefly in a triage session in slack (the link is above the comment and requires slack registration to view).
In the triage session we didn't have time to look into this in depth, but I've moved this to the media component, so hopefully the ticket will get some eyes on it. There is also a shortcodes component, so questionable if it should live there.