Add arrays together in WP_Theme::get_allowed() to preserve keys (theme names could be numeric). props ocean90, fixes #15306.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c2422f4596
commit
bd7ad45234
|
@ -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