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:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user