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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36949 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Konstantin Obenland
2016-03-10 18:56:56 +00:00
parent 827bcc32a8
commit 6f69ca857e
2 changed files with 62 additions and 5 deletions
+5 -5
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.
*