From 67e97dc74854369eb537cefd930be6bfea1dd341 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 8 Apr 2022 06:31:02 +0000 Subject: [PATCH] Embeds: Add YouTube shorts to the allow list. YouTube shorts URLs have a different structure to other YouTube videos. This adds support for the structure for YouTube embeds. Props danielbachhuber, johnbillion, mukesh27. Fixes #55528. Built from https://develop.svn.wordpress.org/trunk@53106 git-svn-id: http://core.svn.wordpress.org/trunk@52695 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-oembed.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-oembed.php b/wp-includes/class-wp-oembed.php index 78297780bc..ca54dfa838 100644 --- a/wp-includes/class-wp-oembed.php +++ b/wp-includes/class-wp-oembed.php @@ -52,6 +52,7 @@ class WP_oEmbed { $providers = array( '#https?://((m|www)\.)?youtube\.com/watch.*#i' => array( 'https://www.youtube.com/oembed', true ), '#https?://((m|www)\.)?youtube\.com/playlist.*#i' => array( 'https://www.youtube.com/oembed', true ), + '#https?://((m|www)\.)?youtube\.com/shorts/*#i' => array( 'https://www.youtube.com/oembed', true ), '#https?://youtu\.be/.*#i' => array( 'https://www.youtube.com/oembed', true ), '#https?://(.+\.)?vimeo\.com/.*#i' => array( 'https://vimeo.com/api/oembed.{format}', true ), '#https?://(www\.)?dailymotion\.com/.*#i' => array( 'https://www.dailymotion.com/services/oembed', true ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 0ba014b718..3f24f76a46 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53105'; +$wp_version = '6.0-alpha-53106'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.