Make WordPress Core

Changeset 53106


Ignore:
Timestamp:
04/08/2022 06:29:26 AM (3 years ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-oembed.php

    r51909 r53106  
    5353            '#https?://((m|www)\.)?youtube\.com/watch.*#i' => array( 'https://www.youtube.com/oembed', true ),
    5454            '#https?://((m|www)\.)?youtube\.com/playlist.*#i' => array( 'https://www.youtube.com/oembed', true ),
     55            '#https?://((m|www)\.)?youtube\.com/shorts/*#i' => array( 'https://www.youtube.com/oembed', true ),
    5556            '#https?://youtu\.be/.*#i'                     => array( 'https://www.youtube.com/oembed', true ),
    5657            '#https?://(.+\.)?vimeo\.com/.*#i'             => array( 'https://vimeo.com/api/oembed.{format}', true ),
Note: See TracChangeset for help on using the changeset viewer.