From c4cd842c29272060e597c1805ecc7e3cd31ca9b0 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 25 Feb 2014 19:30:14 +0000 Subject: [PATCH] Make sure `data.meta` always exists when rendering tracklists. Use `$theme_width` when rendering media tag in playlist template instead of recalculating. Props helen. Built from https://develop.svn.wordpress.org/trunk@27269 git-svn-id: http://core.svn.wordpress.org/trunk@27125 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index edb50029b5..ebcfa0e387 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1070,9 +1070,9 @@ function wp_get_playlist( $attr, $type ) { 'description' => wptexturize( $attachment->post_content ) ); + $track['meta'] = array(); $meta = wp_get_attachment_metadata( $attachment->ID ); if ( ! empty( $meta ) ) { - $track['meta'] = array(); $keys = array( 'title', 'artist', 'band', 'album', 'genre', 'year', 'length', 'length_formatted' ); foreach ( $keys as $key ) { @@ -1154,7 +1154,7 @@ function wp_get_playlist( $attr, $type ) {
- < controls="controls" preload="metadata" width="">> + < controls="controls" preload="metadata" width="">>