[wp-trac] [WordPress Trac] #23282: Add shortcodes for inline HTML5 audio / video

WordPress Trac noreply at wordpress.org
Sun Mar 3 02:25:09 UTC 2013


#23282: Add shortcodes for inline HTML5 audio / video
-----------------------------+--------------------
 Reporter:  wonderboymusic   |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  3.6
Component:  Media            |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |
-----------------------------+--------------------

Comment (by wonderboymusic):

 attachment:mediaelement.zip is updated. Adds a few lines to wp-
 mediaelement.js to add mime-type aliases for `.wmv` and `.wma` files which
 trigger the Silverlight plugin when applicable.

 attachment:23282.10.diff​ adds some changes to PHP and doesn't dip into
 Post Formats heavily, remains generic as other patches will depend on
 these functions.

 Adds `shortcode_exists( $tag )` and `has_shortcode( $content, $tag )` - we
 were / will be repeating ourselves in a bunch of places without them.

 '''If anyone wants to do easy testing:'''

 - clone me and checkout the post-formats/23282 branch:
 https://github.com/staylor/WordPress
 - contains an MU plugin that will create a bunch of posts for you:
 https://github.com/staylor/WordPress/tree/post-formats/23282/wp-content
 /mu-plugins . The plugin runs on every page load but only adds posts if
 they aren't there. If you set your homepage to show 40 posts, you can test
 every file type on one page. The MU plugin also contains all of the media
 files in dir "media/*". If you want to test the shortcodes with attached
 media, drag all of the files in "media" into the Media Library uploader
 and attach them to the posts with the same name as their extension i.e.
 "small.mp3" attaches to "MP3"
 - 3 posts are created for every file type: Shortcode, Link, Link with
 commentary. Example for MP3 type, posts titled: MP3, MP3 Link, MP3 Link
 with commentary
  - the shortcode doesn't work until you attach the media item to the post
  - the link is scooped up by the embed handler, same for link with
 commentary, which is why they work without a shortcode

 I would appreciate any and all code feedback so we can make changes to get
 this commit-ready. Once this is committed, we can do a much more thorough
 compatibility check for audio / video post format scenarios.

 xoxo

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23282#comment:39>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list