Strict comparisons for the $allowed arg for wp_get_themes(). Otherwise 'network' does == true. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20053 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
76a0adc5e2
commit
b57da5a92a
|
@ -56,9 +56,9 @@ function wp_get_themes( $args = array() ) {
|
||||||
|
|
||||||
if ( is_multisite() && null !== $args['allowed'] ) {
|
if ( is_multisite() && null !== $args['allowed'] ) {
|
||||||
if ( $allowed = $args['allowed'] ) {
|
if ( $allowed = $args['allowed'] ) {
|
||||||
if ( 'network' == $allowed )
|
if ( 'network' === $allowed )
|
||||||
$themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_network( $args['blog_id'] ) );
|
$themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_network( $args['blog_id'] ) );
|
||||||
elseif ( 'site' == $allowed )
|
elseif ( 'site' === $allowed )
|
||||||
$themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_site( $args['blog_id'] ) );
|
$themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_site( $args['blog_id'] ) );
|
||||||
else
|
else
|
||||||
$themes = array_intersect_key( $themes, WP_Theme::get_allowed( $args['blog_id'] ) );
|
$themes = array_intersect_key( $themes, WP_Theme::get_allowed( $args['blog_id'] ) );
|
||||||
|
|
Loading…
Reference in New Issue