mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Embeds: Disable embeds on deactivated Multisite sites.
Props xknown, whyisjake, zieladam, peterwilsoncc. Merges [49374] to trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@49383 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -610,6 +610,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;
|
||||
|
||||
Reference in New Issue
Block a user