mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Embeds: Disable embeds on deactivated Multisite sites.
Props xknown, whyisjake, zieladam, peterwilsoncc. Merges [49374] to trunk. Built from https://develop.svn.wordpress.org/trunk@49383 git-svn-id: http://core.svn.wordpress.org/trunk@49142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cad4a1a3d7
commit
025f5a62a2
@ -611,6 +611,11 @@ function get_oembed_response_data_for_url( $url, $args ) {
|
|||||||
$sites = get_sites( $qv );
|
$sites = get_sites( $qv );
|
||||||
$site = reset( $sites );
|
$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 ) {
|
if ( $site && get_current_blog_id() !== (int) $site->blog_id ) {
|
||||||
switch_to_blog( $site->blog_id );
|
switch_to_blog( $site->blog_id );
|
||||||
$switched_blog = true;
|
$switched_blog = true;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-beta2-49382';
|
$wp_version = '5.6-beta2-49383';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user