Opened 12 years ago
Closed 11 years ago
#24456 closed defect (bug) (fixed)
Add src attribute to embed shortcode
Reported by: | aaroncampbell | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Embeds | Keywords: | has-patch |
Focuses: | Cc: |
Description
The embed shortcode takes URL as its content, but a/v ones take an attribute — make both for both?
See: http://make.wordpress.org/core/2013/05/29/post-formats-ui-is-exiting-core-will-live-as-a-plugin/
Attachments (3)
Change History (11)
#2
@
12 years ago
one caveat here - for video, if you want to add subtitles (which we don't support yet - MediaElement does), the body of the shortcode might be a good place to put it:
<track kind="subtitles" src="subtitles.srt" srclang="en" />
Otherwise, HTML frags will have to be passed to the shortcode as attributes. Granted, one could filter 'wp_mediaelement_fallback'
, but that sounds super ghetto
#3
@
12 years ago
24456.diff adds support for URL as the shortcode content for audio and video callbacks, as well as a src attribute to the embed shortcode callback. The src attribute (if not empty) has a higher priority in all three shortcodes.
#4
@
11 years ago
I am going to suggest not doing this - see my above comment about <video>
, which can contain <track>
in its body
#5
@
11 years ago
- Component changed from Media to Embeds
- Milestone changed from 3.6 to Future Release
- Summary changed from Make audio/video shortcodes consistent with embed to Add src attribute to embed shortcode
I agree with wonderboymusic, so does MarkJaquith per IRC.
In that case, maybe we can add 'src' to [embed].
Punting out of 3.6 as it's not a necessity.
#6
@
11 years ago
24456.2.diff is just an update to the patch by kovshenin with only the src attribute for embed part
#7
@
11 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 4.0
24456.3.diff is a refresh and only sets the URL from attribute if the body (where the URL typically resides) is empty.
Related: #24458