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
This commit is contained in:
Peter Wilson 2022-04-08 06:31:02 +00:00
parent 8c29f283d7
commit 67e97dc748
2 changed files with 2 additions and 1 deletions

View File

@ -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 ),

View File

@ -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.