Embeds: In switched state, restore previous state if no post ID is found.

Fixes #40673.
Built from https://develop.svn.wordpress.org/trunk@41634


git-svn-id: http://core.svn.wordpress.org/trunk@41469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2017-09-28 16:29:45 +00:00
parent 0d629ec963
commit 9e097490af
2 changed files with 5 additions and 1 deletions

View File

@ -1106,6 +1106,10 @@ function wp_filter_pre_oembed_result( $result, $url, $args ) {
$post_id = apply_filters( 'oembed_request_post_id', $post_id, $url );
if ( ! $post_id ) {
if ( $switched_blog ) {
restore_current_blog();
}
return $result;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41633';
$wp_version = '4.9-alpha-41634';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.