From d93ca46c4f4af31f854fa3aeef381ab4df533697 Mon Sep 17 00:00:00 2001 From: "David A. Kennedy" Date: Sat, 5 Nov 2016 00:44:28 +0000 Subject: [PATCH] Twenty Seventeen: Fix playlists not rendering on blog/archive pages when using video or audio post format TwentySeventeen attempts to highlight media found in post content by using `get_media_embedded_in_content()` to extract videos from the content and display their HTML differently. However, the HTML being generated by the playlist shortcode relies on JavaScript to update the video element with the markup needed to display the playlist properly. The `get_media_embedded_in_content()` function wasn't designed to handle this use case. The patch looks for the presence of `wp-playlist-script` in the content and shows the standard content rather than trying to pluck the media elements from the content using `get_media_embedded_in_content()`. Props joemcgill. Fixes #38390. git-svn-id: https://develop.svn.wordpress.org/trunk@39146 602fd350-edb4-49c9-b593-d223f7449a82 --- .../twentyseventeen/template-parts/post/content-audio.php | 8 +++++++- .../twentyseventeen/template-parts/post/content-video.php | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php b/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php index 4b64427a56..19c79acb2a 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php @@ -41,7 +41,13 @@ diff --git a/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php b/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php index 95abee412a..cfa37554bf 100644 --- a/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php +++ b/src/wp-content/themes/twentyseventeen/template-parts/post/content-video.php @@ -40,7 +40,12 @@