Tests: Introduce multisite unit tests.

Makes sure custom logo functions work for other sites within a network.
Fixes a bug in `get_custom_logo()` where the correct logo was returned, but
linked to the wrong site.

H/t ocean90.
See #33755, #36086.

Built from https://develop.svn.wordpress.org/trunk@36949


git-svn-id: http://core.svn.wordpress.org/trunk@36917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2016-03-10 18:57:26 +00:00
parent d21d537280
commit 3e82e111e1
2 changed files with 6 additions and 6 deletions

View File

@ -876,11 +876,7 @@ function get_custom_logo( $blog_id = 0 ) {
}
$custom_logo_id = get_theme_mod( 'custom_logo' );
if ( is_multisite() && ms_is_switched() ) {
restore_current_blog();
}
$size = get_theme_support( 'custom-logo', 'size' );
$size = get_theme_support( 'custom-logo', 'size' );
// We have a logo. Logo is go.
if ( $custom_logo_id ) {
@ -902,6 +898,10 @@ function get_custom_logo( $blog_id = 0 ) {
);
}
if ( is_multisite() && ms_is_switched() ) {
restore_current_blog();
}
/**
* Filter the custom logo output.
*

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-beta3-36948';
$wp_version = '4.5-beta3-36949';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.