Make WordPress Core


Ignore:
Timestamp:
03/27/2014 05:57:30 PM (12 years ago)
Author:
wonderboymusic
Message:

There is no more video-playlist shortcode. To use video, it is now [playlist type="video" ....]. Also deleting core playlist styles. The style attribute is still supported, defaulting to light. Our core style support was 4-5 CSS rules.

See #27552. Leaving open for comments and potential bugs.

File:
1 edited

Legend:

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

    r27777 r27785  
    518518        <h3><?php _e( 'Playlist Settings' ); ?></h3>
    519519
    520         <?php
    521         $playlist_styles = array(
    522             'light' => _x( 'Light', 'playlist theme' ),
    523             'dark'  => _x( 'Dark', 'playlist theme' )
    524         );
    525 
    526         /** This filter is documented in wp-includes/media.php */
    527         $styles = apply_filters( 'playlist_styles', $playlist_styles );
    528 
    529         if ( ! empty( $styles ) ): ?>
     520        <# var emptyModel = _.isEmpty( data.model );  #>
     521
    530522        <label class="setting">
    531             <span><?php _e( 'Style' ); ?></span>
    532             <select class="style" data-setting="style">
    533                 <?php foreach ( $styles as $slug => $label ): ?>
    534                 <option value="<?php echo esc_attr( $slug ) ?>">
    535                     <?php echo $label ?>
    536                 </option>
    537                 <?php endforeach ?>
    538             </select>
    539         </label>
    540         <?php endif; ?>
    541 
    542         <#
    543             var playlist = 'playlist-edit' === data.controller.id, emptyModel = _.isEmpty(data.model);
    544         #>
    545         <label class="setting">
    546             <input type="checkbox" data-setting="_orderbyRandom" />
    547             <span><?php _e( 'Random Order' ); ?></span>
    548         </label>
    549 
    550         <label class="setting">
    551             <input type="checkbox" data-setting="tracklist" <# if ( playlist && emptyModel ) { #>
     523            <input type="checkbox" data-setting="tracklist" <# if ( emptyModel ) { #>
    552524                checked="checked"
    553525            <# } #> />
     
    556528
    557529        <label class="setting">
    558             <input type="checkbox" data-setting="tracknumbers" <# if ( playlist && emptyModel ) { #>
     530            <input type="checkbox" data-setting="tracknumbers" <# if ( emptyModel ) { #>
    559531                checked="checked"
    560532            <# } #> />
     
    562534        </label>
    563535
    564         <# if ( playlist ) { #>
     536        <# if ( 'audio' === data.model.type ) { #>
    565537        <label class="setting">
    566             <input type="checkbox" data-setting="artists" <# if ( playlist && emptyModel ) { #>
     538            <input type="checkbox" data-setting="artists" <# if ( emptyModel ) { #>
    567539                checked="checked"
    568540            <# } #> />
Note: See TracChangeset for help on using the changeset viewer.