From 7a21b05378db6468f929c2d31256a568478b20a5 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 25 Feb 2014 19:29:49 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@27269 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index edb50029b5..ebcfa0e387 100644 --- a/src/wp-includes/media.php +++ b/src/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="">>