WordPress.org

Make WordPress Core

Changeset 20053


Ignore:
Timestamp:
02/29/2012 11:04:25 PM (6 years ago)
Author:
nacin
Message:

Strict comparisons for the $allowed arg for wp_get_themes(). Otherwise 'network' does == true. see #20103.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r20040 r20053  
    5757    if ( is_multisite() && null !== $args['allowed'] ) {
    5858        if ( $allowed = $args['allowed'] ) {
    59             if ( 'network' == $allowed )
     59            if ( 'network' === $allowed )
    6060                $themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_network( $args['blog_id'] ) );
    61             elseif ( 'site' == $allowed )
     61            elseif ( 'site' === $allowed )
    6262                $themes = array_intersect_key( $themes, WP_Theme::get_allowed_on_site( $args['blog_id'] ) );
    6363            else
Note: See TracChangeset for help on using the changeset viewer.