WordPress.org

Make WordPress Core

Changeset 29660


Ignore:
Timestamp:
09/01/2014 07:54:44 PM (4 years ago)
Author:
azaozz
Message:

Media: add a class to the <script> tag for the JSON encoded playlist data so it can be easily selected in WPPlaylistView. Props SergeyBiryukov, fixes #29383

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/mediaelement/wp-playlist.js

    r29277 r29660  
    88            this.index = 0;
    99            this.settings = {};
    10             this.data = options.metadata || $.parseJSON( this.$('script').html() );
     10            this.data = options.metadata || $.parseJSON( this.$('script.wp-playlist-script').html() );
    1111            this.playerNode = this.$( this.data.type );
    1212
  • trunk/src/wp-includes/media.php

    r29655 r29660  
    14001400    ?></ol>
    14011401    </noscript>
    1402     <script type="application/json"><?php echo json_encode( $data ) ?></script>
     1402    <script type="application/json" class="wp-playlist-script"><?php echo json_encode( $data ) ?></script>
    14031403</div>
    14041404    <?php
Note: See TracChangeset for help on using the changeset viewer.