WordPress Media in a post-Koop Universe

  • Published on
    26-Aug-2014

  • View
    178

  • Download
    0

DESCRIPTION

Presentation from WordCamp NYC 2014

Transcript

WordPress Media In a post-Koop Universe Scott Taylor • Core Committer • Sr. Software Engineer, The New York Times • @wonderboymusic • I like music • I like Mexican food How I got started with WordPress How I got started contributing How I got started with Backbone How I got started with MEDIA MEDIA! WordPress 3.5 WordPress 3.9 MORE MEDIA! Backbone/Underscore • Views • Models • Collections • Frames • Regions • States Underscore • Utility belt • Does not require jQuery • Smells like Ruby • List iterators Backbone • Un-opinionated • MVC • Ruby-like • Hard to know what you are doing right/wrong MediaElement • Facade layer for HTML5 media • Cross-browser compatibility • It just works [audio], [video], [playlist] Shortcodes • Containers for data • Placeholders • Forward-compatible • Shortcode API Use what exists • Galleries are playlists • Video is audio • Video playlists are audio playlists • Things are collections • Embed are media $( ‘.thing’ ).mediaelementplayer(); Front End JS • Needs to automagically work for every possible use-case • Needs to not be overly bloated Admin • TinyMCE view • JS version of PHP code • Iframe sandboxes • WYSIWYG wp.media.audio = { // click the view edit: { . . . }, ! // shortcode returned to the editor shortcode: { . . . }, // default props } wp.mce.views.register( ‘audio’, . . . )