Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25312 closed defect (bug) (duplicate)

Video shortcode filter doesn't pass along original shortcode attributes

Reported by: ericlewis's profile ericlewis Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Media Keywords: has-patch
Focuses: Cc:


There is a single filter for modifying the markup made by the video shortcode, 'wp_video_shortcode'. However, the $atts variable, which once contained the shortcode attributes at the beginning of the function, gets replaced in the middle of the function with the attributes to be applied to the <video> element.

This means that if I'm trying to filter the shortcode and make my own markup, I have no access to specific video srcs passed into the video shortcode ( [video webm="video.webm" mp4="video.mp4"] ).

Attachments (1)

25312.patch (1.6 KB) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
11 years ago

Same for wp_audio_shortcode filter (mentioned in #24765).

#2 @SergeyBiryukov
11 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.7

#3 @ericlewis
11 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Closing this as a duplicate of #25313, as it looks like the fix there will fix this.

#4 @SergeyBiryukov
11 years ago

  • Milestone 3.7 deleted

My initial thought was that we should still pass the original shortcode attributes here, however we should probably add a filter for $atts in #24765 instead.

Note: See TracTickets for help on using tickets.