#32855 closed defect (bug) (fixed)
wp_audio_shortcode() and wp_video_shortcode() ignoring input $attr['id']
| Reported by: | thorbrink | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.3 |
| Component: | Media | Version: | 3.6 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
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
@
11 years ago
- Component Shortcodes → Media
- Keywords needs-patch added
- Type defect (bug) → enhancement
- Version 4.2.2 → 3.6
#2
@
11 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.
#6
@
11 years ago
- Resolution → fixed
- Status new → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi thorbrink, this is unlikely to change ... the
idis set dynamically so that it is guaranteed to be unique. If[audio|video]were to take anidparam, 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.