Add arrays together in WP_Theme::get_allowed() to preserve keys (theme names could be numeric). props ocean90, fixes #15306.
git-svn-id: https://develop.svn.wordpress.org/trunk@20481 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f107d5e049
commit
aa450a1d3a
@ -1140,7 +1140,7 @@ final class WP_Theme implements ArrayAccess {
|
|||||||
* @return array Array of stylesheet names.
|
* @return array Array of stylesheet names.
|
||||||
*/
|
*/
|
||||||
public static function get_allowed( $blog_id = null ) {
|
public static function get_allowed( $blog_id = null ) {
|
||||||
return array_merge( self::get_allowed_on_network(), self::get_allowed_on_site( $blog_id ) );
|
return self::get_allowed_on_network() + self::get_allowed_on_site( $blog_id );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1214,7 +1214,7 @@ final class WP_Theme implements ArrayAccess {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $allowed_themes[ $blog_id ];
|
return (array) $allowed_themes[ $blog_id ];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user