Make WordPress Core

Tagged: shortcodes Toggle Comment Threads | Keyboard Shortcuts

  • Daniel Bachhuber 11:41 pm on May 11, 2015 Permalink |
    Tags: , , shortcodes   

    Shortcake (Shortcode UI) chat summary – May 11th, 2015 

    Present: @danielbachhuber, @matth_eu, @goldenapples

    • Fusion pushed Image Shortcake to production today. It’s a plugin that uses Shortcake to replace with [img]. The biggest outstanding implementation issue is aligning an image left or write with text wrap. @goldenapples will continue to explore in Shortcake.
    • We’d like users to be able to edit shortcode attributes with a rich-text editor. However, core doesn’t easily support this use-case. For now, it looks like we’ll transparently encode and decode attributes with HTML values. @matth_eu will create a core ticket see how we can make this less of a hack.
    • We’re still looking to ship v0.4.0 on or around June 9th. Enhancements will be landing in the next couple of weeks so we can have a week or two of soaking before publishing to WordPress.org.

    Logs: https://wordpress.slack.com/archives/feature-shortcode/p1431371317000011

    Next chat: same time and place

    • Pat Hawks 11:57 pm on May 11, 2015 Permalink | Log in to Reply

      Replace *what* with `[img]`?

    • goldenapples 12:34 am on May 12, 2015 Permalink | Log in to Reply

      Replace `` tags or `` shortcodes inserted through the WP Editor using the *Add Media* function.

    • Jon Brown 1:49 am on May 12, 2015 Permalink | Log in to Reply

      As much as I’ve _long_ advocated for some sort of intelligent image object/element that themes & plugins could affect the markup on, shortcodes for this just feels wrong…. I’ll certainly be testing it, and am excited at the possibility, just skeptical that anything shortcode based is a reliable future theme change proof option.

  • Daniel Bachhuber 8:15 pm on April 27, 2015 Permalink |
    Tags: , , shortcodes   

    Shortcake (Shortcode UI) chat summary – April 27th, 2015 

    Present: @danielbachhuber, @matth_eu

    Logs: https://wordpress.slack.com/archives/feature-shortcode/p1430161317000487

    Next chat: same time and place

  • Daniel Bachhuber 7:55 pm on April 20, 2015 Permalink |
    Tags: , , shortcodes   

    Shortcake (Shortcode UI) chat summary – April 20th, 2015 

    Present: @danielbachhuber, @matth_eu

    • Meeting focused on clearing up some of the remaining issues in the v0.3 milestone.
    • In v0.4, we’re looking into de-coupling Shortcake from the Media Library experience. If you have opinions on this regard, you should follow along on this issue
    • Matt has done some exploration of repeatable fields. The crux of the problem is our field templates include the field, and label and description. Fieldmanager and CMB use prototype HTML for repeatable fields. However, before we go about reinventing Fieldmanager, we should reach out to Metadata API working group to see how they’re approaching.
    • Supporting rich text editor for a shortcode attribute is a nice idea but has a couple fundamental flaws: 1) HTML can’t easily be stored in shortcode attributes, 2) TinyMCE views gets funky when there’s HTML in the inner_content. The idea needs more technical baking before we can commit it to a milestone.
    • Goal is to have remaining v0.3 issues into Fusion production by tomorrow morning PT, and then ship Wednesday or Thursday.

    Logs: https://wordpress.slack.com/archives/feature-shortcode/p1429556549000347

    Next chat: same time and place

  • Daniel Bachhuber 10:59 pm on April 13, 2015 Permalink |
    Tags: , , shortcodes   

    Shortcake (Shortcode UI) chat summary – April 13th, 2015 

    Present: @danielbachhuber, @matth_eu

    • Not much development done in the past week.
    • Discussed HTML in our `description` attribute. User goal is to be able to use arbitrary formatting HTML in a field’s description. However, Underscores permits either no HTML or any HTML. It would be nice if we could use `$allowedposttags` or similar. Matt will be doing some research for any prior art.
    • Discussed whether we should use `switchEditors._wp_Nop` or roll our own. Matt will reach out to core to see why it’s private in the first place.
    • All of the issues in v0.3 have been assigned. By next Monday, we’ll be making the release decision. Code will be shipped to Fusion production throughout the week.

    Logs: https://wordpress.slack.com/archives/feature-shortcode/p1428951753000191

    Next chat: same time and place.

  • Daniel Bachhuber 7:57 pm on April 6, 2015 Permalink |
    Tags: , , shortcodes   

    Shortcake (Shortcode UI) chat summary – April 6th 

    Present: @danielbachhuber, @matth_eu, @obenland, @tnolte, @mattmedeiros

    • v0.2.2 released today with a compat fix for WordPress 4.2.
    • We had a bit of discussion about timeline for core integration. There’s no rush, because Shortcake works just fine as a standalone plugin. Furthermore, based on the existing commit activity, it appears TinyMCE Views needs a bit more maturity before it’s a reliable foundation. Lastly, Shortcake requires developer effort currently — will be more interesting when we’ve used Shortcake to rebuild audio / video shortcode UI, for example.
    • Fusion is working on an image shortcode based on Shortcake, and should coordinate with Image Flow to see what’s happening there.
    • Given Matt H-Y’s list of “field builder”, would be good to touch base with metadata and Customizer projects to see where there can be alignment.
    • v0.3 is scheduled for release on April 21st. It contains a grab bag of issues.
    • We want your help with documentation. Our wiki is available for anyone to edit, and documentation efforts could use a fresh pair of eyes. If you need technical assistance with your edits, feel free to open an issue.

    Logs: https://wordpress.slack.com/archives/feature-shortcode/p1428346927000055

    Next chat: same time and place.

  • Daniel Bachhuber 1:30 pm on April 1, 2015 Permalink |
    Tags: meetings, , shortcodes   

    Shortcake (Shortcode UI) has a weekly meeting time: Mondays at 7 pm UTC 

    The title says it all. Our next weekly meeting is Monday, April 6 at 19:00 UTC

    We also have a channel on Slack. Come join us in #feature-shortcode

    Shortcode-curious? Check out this recent WP Tavern post for the details on our latest release.

  • Daniel Bachhuber 6:54 pm on February 27, 2015 Permalink |
    Tags: , shortcodes   

    Next Shortcake (Shortcode UI) discussion: Monday, March 2nd 

    • What: Let’s chat about Shortcake (Shortcode UI), a proposed feature plugin that’s currently midway through its development cycle.
    • Why: Shortcake is nearing a v0.2.0 release (see all issues). We’d like to discuss where it’s at, and where we want to go with it in the future.
    • Where: #core channel on Slack
    • When: March 2, 2015 22:00 UTC
    • Who: Shortcode aficionados. See you there!
    • Matthew Haines-Young 12:50 am on March 3, 2015 Permalink | Log in to Reply

      Notes from shortcode UI meeting.

      Attendees: @mattheu, @danielbachhuber, @kaiser, @brashrebel, @paaljoachim, @pbearne

      Chat Logs: https://wordpress.slack.com/archives/core/p1425333778000816

      Progress since last meeting has been good and we’re nearing a 2.0 release – mostly behind the scenes stuff – but everything is a bit simpler and more robust 😉

      Looking forward

      • UX/UI Review.
        • How should this UI fit into the editor experience? Should it be part of the media modal, part of the editor toolbar, separate, or perhaps replace/augment the media modal entirely?
        • Action item – I’ll put together some wireframes. Would be good to get some feedback from this.
        • Consideration – there work in progress on the UI of the media modal. @drew found #29989
      • Better define end goals of project. Is it more about shortcodes, or more about content blocks.
        • My opinion and initial motivation for this – definitely more about content blocks – shortcodes were just a simple way to achieve this.
        • Content blocks – might be good to get some feedback from those involved in this project.
      • What can we actually do to improve shortcodes in core.
      • Long term – inline editing
        • Some experiments with editable fields inside a sandboxed preview in the MCE editor indicate this could be achievable.
        • Would be good to do mockups/wireframes
        • But inline editing would take a fair bit of custom UI work to implement for each module.
        • If supporting only this was the goal – I think theres a lot of the current functionality that wouldn’t be needed

      Thanks for attending. Next meeting Monday 23rd March @ 22:00 UTC.

  • Daniel Bachhuber 11:23 pm on February 2, 2015 Permalink |
    Tags: , shortcodes   

    Shortcode UI Chat Summary, February 2nd 

    Attendees: @jdgrimes @danielbachhuber @samuelsidler @matth_eu @bobbingwide @michaelarestad

    Full conversation: https://wordpress.slack.com/archives/core/p1422914584001521


    • Background: Fusion (a media company using WordPress) is using shortcodes increasingly to embed content within other content. Given the historically bad UX for shortcodes, we thought we’d invest a bit of development effort. The primary pain points for shortcodes we’re solving are discoverability (what shortcodes are there), and usability (what arguments do I need for this shortcode). @matth_eu (from Human Made) has done a substantial amount of development, along with other contributors.
    • We discussed whether, for pragmatic purposes, shortcodes are content blocks. Answer: Kind of, to a limited degree. We’d need to determine which types of shortcodes are safe to deal with.
    • Everyone agreed inline editing would be nice for the shortcodes that support it well, and take Shortcode UI from good to great. @michaelarestad offered to do some wireframes.
    • @bobbingwide opened a number of Github issues this morning that largely represent useful enhancements.
    • Because Shortcake makes use of JavaScript templates, @kaiser mentioned it would be nice to declare the templates as dependencies of specific scripts. @danielbachhuber agreed, and suggested opening a core ticket.

    Next chat: February 16, 2015 22:00 UTC (two weeks from now)

  • Daniel Bachhuber 12:38 am on January 28, 2015 Permalink |
    Tags: , shortcodes   

    Kickoff Shortcake (Shortcode UI) Discussion 

    • What: Let’s chat about Shortcake (Shortcode UI), a proposed feature plugin that’s currently midway through its development cycle.
    • Why: To get a better sense of interest in the project, answer any questions people have, and discuss what might need to be done to make it a candidate for core.
    • Where: #core channel on Slack
    • When: February 2, 2015 22:00 UTC
    • Who: Shortcode aficionados. See you there!
  • Scott Taylor 9:57 pm on April 8, 2013 Permalink
    Tags: , , , , shortcodes,   

    Audio / Video support in Core 

    Post Formats are a big feature in WordPress 3.6. What you may not know is: there is now native support for Audio and Video in core! There has been great support for embeds by way of WP_Embed and oEmbed providers for a while, but, if you wanted to play an MP3 from your Media Library, you had to install a plugin. Supporting audio and video in core gives bands, podcasters, vloggers, et al the ability to easily and beautifully expresses themselves through sounds and moving pictures without using an external service.

    How does this work?

    At the core of the experience is the fantastic library, MediaElement.js. MediaElement is the facade layer that gives us maximum file support and cross-browser compatibility. While some libraries require a Flash-only solution to make your media work cross-environment, MediaElement lets you use HTML5 audio / video tags in every browser, and, only when necessary, will use a Flash or Silverlight plugin in the background to make incompatible media work. Translation, things like this: <audio> tag works in old IE, Windows Media files work in Chrome.

    MediaElement uses the same HTML markup, regardless of playback implementation, and you can use CSS to skin the players.


    MediaElement’s great, but we don’t want to be locked in to one external library forever. Instead of using MediaElement-specific markup everywhere, we expose audio and video markup through shortcodes: [audio] and [video].

    For the following scenarios:

    • I have an old post that has a video in the Media Library attached to it, and I want to use the new shortcode: [video]
    • I have the URL for a video, from the Media Library or external, that I want to play:
      [video src="video-source.mp4"]
    • I have a source URL and fallbacks for other HTML5-supported filetypes:
      [video width="600" height="480" mp4="source.mp4" ogv="source.ogv" webm="source.webm"]

    Same goes for audio:

    • I have an old post that has an audio file in the Media Library attached to it, and I want to use the new shortcode: [audio]
    • I have the URL for an MP3, from the Media Library or external, that I want to play: [audio src="audio-source.mp3"]
    • I have a source URL and fallbacks for other HTML5-supported filetypes:
      [audio mp3="source.mp3" ogg="source.ogg" wav="source.wav"]

    Shortcodes focus on the “what” and abstract the “how.” If you want to use a library that is not MediaElement, you can! Just look at what to filter: here


    There are also new embed handlers for audio and video. Using them is easy as dropping a media link on a line by itself in the editor:

    I like this song because it is really cool!

    Works for both audio and video with URLs matching the allowed (and filterable) list of extensions (see: here and here)


    Using the new post formats UI, it is even easier to get directly at the audio and video in your Media Library. When selecting, the media modal opens to your library, filtered by media type.


    In previous versions of WP, you could upload audio and video, but we were not generating metadata like we do for images. In 3.6, using the getID3 library, we are able to extract data from audio and video like cover art, song length, artist, album, song title, genre, codec, etc. It’s pretty great. We will soon be exposing more of this data in the admin as well, along with inline previews on the Edit Media page:


    Themers can get in on the action, too, using structured-post-formats in their theme (Twenty Thirteen is a great place to look). The admin gives users flexibility when associating media with a post. the_post_format_audio() and the_post_format_video() will automagically retrieve and output your media in the front end.

    • sourceforge 10:09 pm on April 8, 2013 Permalink | Log in to Reply

      thank you, is this the html5 vid player? looks good, newer java based audio player is also needed, flash is always prone to attacks

    • Manny Fleurmond 10:11 pm on April 8, 2013 Permalink | Log in to Reply

      How does this handle m4a files?

    • Konstantin Obenland 10:59 pm on April 8, 2013 Permalink | Log in to Reply

      The attentive reader might have noticed how the buffer- and play-time-bars in the first and second screenshot have different colors.

      Themes can style these elements of the players. The first example is a screenshot from Twenty Thirteen, with a white buffer bar, an orange play time bar and no border-radius.

    • John Saddington 11:11 pm on April 8, 2013 Permalink | Log in to Reply

      this is fantastic. john dyer’s MEJS is amazing.

    • AK Ted 11:32 pm on April 8, 2013 Permalink | Log in to Reply

      This is great news! Can’t wait for stable to play with, no time atm for beta. :(

      Small grammar correction: “ability to easily and beautifully expresses themselves” (in first paragraph), should be “express”.

    • Michael Beckwith 11:51 pm on April 8, 2013 Permalink | Log in to Reply

      That’s pretty hot

    • Ipstenu (Mika Epstein) 1:07 am on April 9, 2013 Permalink | Log in to Reply

      What’s the fallback? Like if I use

      and they don’t allow for HTML5 (yes, I have people who don’t), what shows? Right now I made an html5video shortcode that has, at the bottom ‘Can’t see a video? Click here…’ and it defaults to the MP4.

      • Scott Taylor 2:47 am on April 9, 2013 Permalink | Log in to Reply

        I am pretty sure MP4 will win and play via Flash. If no flash and no HTML5, there will be a link that goes straight to the file.

    • Jon Brown 1:09 am on April 9, 2013 Permalink | Log in to Reply

      Not sure how I missed this on trac, but “YAY!!! & Oh No!!!!”.

      I just spent a month (not continuously) trying to figure out why MediaElements.js conflicted with Soliloquy (Flex based Slider) when both appeared on the same page on mobile. Only on mobile, everything worked fine everywhere else. I finally gave up, ditched ME.js for Video.js.

      I’m now about to test that site on 3.6 just out of curiosity as to what happens.

      I too really dislike this using shortcodes and my bigger concern is what this does to other plugins that use the shortcode already.

      Always seemed to me WP ought to follow best naming practices and use [wp_gallery], [wp_video], etc…

      • Jon Brown 1:26 am on April 9, 2013 Permalink | Log in to Reply

        That was easy to test… still conflicting somehow. I’ve let Thomas know with urls to dev/staging/live servers showing it all. It’s really bizzare that it only happens on mobile browsers (iOS chrome and safari) anbd throws no errors. Either works fine on it’s own, and we’ve recreated it on vanila WP running 2010.

    • Beau Lebens 1:42 am on April 9, 2013 Permalink | Log in to Reply


    • Tomas 4:01 am on April 9, 2013 Permalink | Log in to Reply

      WoW! This is good news!

    • Robert Chapin (miqrogroove) 1:48 pm on April 9, 2013 Permalink | Log in to Reply

      That’s hot! 😀

    • redwallhp 10:35 pm on April 9, 2013 Permalink | Log in to Reply

      Awesome! The assimilation of the Crowd Favorite post format UI and MediaElement.js support in one version.

    • Frank 10:46 am on April 10, 2013 Permalink | Log in to Reply

      Yeah, this is cool. And I miss some important points to have this as a useable feature for real blogger’s life: mejs is out of the box not resonsible and this allone makes the joy half at the first glance. Yes, there is a dev’s tip for videos out there, that, if you set the width to “100%” it will work. And it does, indeed! Maybe this width issue of mejs videos should go into core?

      Responsive mejs audio seems to be more complicated. A simple width attribute setting does not work. At this time the width of the audio bar overlaps the standard width of 480 even in modern smartphones.

      Regarding video: the poster attribute of the shortcode is rather important, since it leeds to a screenshot like above, showing this nice preview picture for the video – but it’s not as easy to implement as it looks like. If you take an image from the media library with its predefinded sizes, it is to small or you’ll have an overlapping picture. For me setting the CSS class “mejs-container” to “overflow: hidden;” seems to resolve the issue as a quick hack.

      I think, the feature of having core supported video and audio is great, and it should be delivered in a way, that avoids frustration of users. The poster feature for videos is essential I think, the contra responsive issues should disappear as well.

      Keep up the good work!

    • Eric Andrew Lewis 11:18 am on April 10, 2013 Permalink | Log in to Reply

      Totally wow.

    • Angelo Mandato 7:03 pm on April 10, 2013 Permalink | Log in to Reply

      I see a lot of potential for the post formats. I see many problems though.

      If it is in WP core, it should be capable of both themes and plugins to utilize the functionality. At present the formats are hard coded and there’s no way for themes/plugins to add additional formats. Worse yet, if a theme only implements the audio/ format, it appears to process all 6. (line 203 of wp-admin/functions/post.php). There are no action hooks / filters either.

      The post formats still display even though older themes do not call the function add_theme_support( ‘post-formats’, …). Plus if a theme only specifies 1-2 formats, only those specified formats should be available when editing posts. It does not appear to let you add custom formats either, which would be the bee’s knees.

      Who ever is managing (supervisor or committee chair) of the post formats features could contact me, that be great. My email is cio [at] rawvoice dot com.

    • hearvox 12:22 am on April 11, 2013 Permalink | Log in to Reply

      any hooks yet for skinning the default MEjs player?

    • rilwis 2:22 pm on April 11, 2013 Permalink | Log in to Reply

      This feature is really great and useful for all people. I’ve been using MEjs and it’s really great. Nice UI, great support.

    • johndyer 10:48 pm on April 11, 2013 Permalink | Log in to Reply

      So glad to hear it! Glad to have “contributed” :)

    • Maor Chasen 6:15 pm on April 12, 2013 Permalink | Log in to Reply


    • Anderton 9:06 am on April 15, 2013 Permalink | Log in to Reply

      Have been playing around with it while developing a couple of themes for 3.6. It’s lovely, and easy to style. Have been using MediaElements,js before, and when i found out that it would be included in the Core, i was thrilled. Good move!

    • Bjarni Wark 10:25 pm on April 16, 2013 Permalink | Log in to Reply

      Really good news, thanks for the efforts of making this happen.

    • Maeve Lander 4:58 am on April 17, 2013 Permalink | Log in to Reply

      Just wondering how will this affect existing audio/video plugins? Any potential problems, conflicts, things plugin developers could do better to integrate with this etc?

    • esmi 7:49 pm on April 17, 2013 Permalink | Log in to Reply

      I have to say, I’m really disappointed that there’s no mechanism for people to add captions for videos or provide text transcripts with audio files. come on, people! We need to be encouraging people to do this kind of stuff but unless WordPress provides the methods, it just won’t happen.

      • Scott Taylor 7:57 pm on April 17, 2013 Permalink | Log in to Reply


      • Ipstenu (Mika Epstein) 8:18 pm on April 17, 2013 Permalink | Log in to Reply

        Speaking as someone totally ignorant of this, how DO you add captions to videos? Can I include a transcript.txt file like I do for different video versions?

        • Joe Dolson 11:26 pm on April 17, 2013 Permalink | Log in to Reply

          There are various formats for captions, but yes, essentially it amounts to referencing a text file with captions. Mediaelement.js supports .srt and .vtt caption formats, and they’re referenced as

          In this context, you should treat the terms ‘subtitles’ and ‘captions’ synonymously, although technically they are different.

          All the WP system needs to do for captions is provide a mechanism to upload them and auto-generate the relevant track elements, basically.

    • esmi 8:11 pm on April 17, 2013 Permalink | Log in to Reply

      We’ve only just picked this up in the make.wordpress.accessible group but, yes, we will be trying to come up with some patches if we can :)

    • FranciscoAMK 8:19 pm on April 21, 2013 Permalink | Log in to Reply

      Is the featured image set as the “poster” for the video post format?

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc
Skip to toolbar