Embeds: Disable embeds on deactivated Multisite sites.

Props xknown, whyisjake, zieladam, peterwilsoncc.

Built from https://develop.svn.wordpress.org/branches/5.5@49374


git-svn-id: http://core.svn.wordpress.org/branches/5.5@49133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2020-10-29 16:54:05 +00:00
parent 180e707b2e
commit 8518cbeea9
2 changed files with 6 additions and 1 deletions

View File

@ -611,6 +611,11 @@ function get_oembed_response_data_for_url( $url, $args ) {
$sites = get_sites( $qv );
$site = reset( $sites );
// Do not allow embeds for deleted/archived/spam sites.
if ( ! empty( $site->deleted ) || ! empty( $site->spam ) || ! empty( $site->archived ) ) {
return false;
}
if ( $site && get_current_blog_id() !== (int) $site->blog_id ) {
switch_to_blog( $site->blog_id );
$switched_blog = true;

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5.2-alpha-49373';
$wp_version = '5.5.2-alpha-49374';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.