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

Built from https://develop.svn.wordpress.org/trunk@29660


git-svn-id: http://core.svn.wordpress.org/trunk@29434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-09-01 19:55:18 +00:00
parent 6926e9aea6
commit 703b625820
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
initialize : function (options) {
this.index = 0;
this.settings = {};
this.data = options.metadata || $.parseJSON( this.$('script').html() );
this.data = options.metadata || $.parseJSON( this.$('script.wp-playlist-script').html() );
this.playerNode = this.$( this.data.type );
this.tracks = new Backbone.Collection( this.data.tracks );

View File

@ -1399,7 +1399,7 @@ function wp_playlist_shortcode( $attr ) {
}
?></ol>
</noscript>
<script type="application/json"><?php echo json_encode( $data ) ?></script>
<script type="application/json" class="wp-playlist-script"><?php echo json_encode( $data ) ?></script>
</div>
<?php
return ob_get_clean();