#32855 closed defect (bug) (fixed)
wp_audio_shortcode() and wp_video_shortcode() ignoring input $attr['id']
Reported by: | thorbrink | Owned by: | |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Media | Keywords: | needs-patch |
Focuses: | Cc: |
Description
wp_audio_shortcode() and wp_video_shortcode() both takes an id as a part of the first input parameter. Both of these functions ignore the id input and sets the value of the id-attribute to default value.
Change History (8)
#1
@
9 years ago
- Component changed from Shortcodes to Media
- Keywords needs-patch added
- Type changed from defect (bug) to enhancement
- Version changed from 4.2.2 to 3.6
#2
@
9 years ago
I agree with @wonderboymusic here, but would add that we should fix the documentation on those functions so that we aren't telling people they can pass in an ID.
#5
@
9 years ago
- Milestone changed from Awaiting Review to 4.3
- Type changed from enhancement to defect (bug)
#6
@
9 years ago
- Resolution set to fixed
- Status changed from new to closed
The docs have been fixed - this should alleviate the confusion here. I would say wontfix for now on the id
attribute, which is unused by JS anyways.
Note: See
TracTickets for help on using
tickets.
Hi thorbrink, this is unlikely to change ... the
id
is set dynamically so that it is guaranteed to be unique. If[audio|video]
were to take anid
param, it would probably represent an attachment's id in the database. Currently, the implementation is URL-based. This allows you to write the shortcodes by hand and easily point at an asset stored on a CDN. It is also difficult to associate sub-attachments through our current UI by linking attachment IDs in a parent-child relationship.I'll leave this open in case you or others can come up with a clever idea to support custom HTML IDs.