Make WordPress Core


Ignore:
Timestamp:
02/24/2014 06:07:51 PM (11 years ago)
Author:
wonderboymusic
Message:

Add core support for Playlists and Video Playlists.

  • Playlists operate like galleries in the admin.
  • Provide default UI and JS support in themes using MediaElement and Backbone.
  • The shortcodes are clickable, editable, and configurable using the media modal.
  • Playlists support images for each item, whether or not the current theme supports images for attachment:audio and attachment:video
  • Playlists respond to $content_width and resize videos accordingly.
  • All playlist data is included inline, using a script tag with type="application/json", allowing anyone to unenqueue the WP playlist JS and roll their own.
  • Playlist styles are minimal and work out of the box in the last 5 default themes. They inherit and adapt to the current theme's font styles, and their rules are easily overrideable.

See #26631.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r27143 r27239  
    412412    </script>
    413413
     414    <script type="text/html" id="tmpl-playlist-settings">
     415        <h3><?php _e('Playlist Settings'); ?></h3>
     416
     417        <label class="setting">
     418            <span><?php _e( 'Random Order' ); ?></span>
     419            <input type="checkbox" data-setting="_orderbyRandom" />
     420        </label>
     421
     422        <label class="setting">
     423            <span><?php _e('Style'); ?></span>
     424            <select class="style" data-setting="style">
     425                <option value="light">
     426                    <?php esc_attr_e('Light'); ?>
     427                </option>
     428                <option value="dark">
     429                    <?php esc_attr_e('Dark'); ?>
     430                </option>
     431            </select>
     432        </label>
     433
     434        <label class="setting">
     435            <span><?php _e( 'Show Tracklist' ); ?></span>
     436            <input type="checkbox" data-setting="_tracklist" />
     437        </label>
     438
     439        <label class="setting">
     440            <span><?php _e( 'Show Track Numbers' ); ?></span>
     441            <input type="checkbox" data-setting="_tracknumbers" />
     442        </label>
     443
     444        <label class="setting">
     445            <span><?php _e( 'Show Artist Name in Tracklist' ); ?></span>
     446            <input type="checkbox" data-setting="_artists" />
     447        </label>
     448
     449        <label class="setting">
     450            <span><?php _e( 'Show Images' ); ?></span>
     451            <input type="checkbox" data-setting="_images" />
     452        </label>
     453    </script>
     454
    414455    <script type="text/html" id="tmpl-embed-link-settings">
    415456        <label class="setting">
Note: See TracChangeset for help on using the changeset viewer.