Make WordPress Core

Changeset 20524


Ignore:
Timestamp:
04/19/2012 03:33:42 AM (15 years ago)
Author:
nacin
Message:

Always return a WP_Theme object from wp_get_theme(). If we can't find the theme root, assume the default theme root. (Which will probably result in a WP_Theme object that returns false for the exists() method, which is fine.) see #20361.

File:
1 edited

Legend:

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

    r20520 r20524  
    9999                $theme_root = get_raw_theme_root( $stylesheet );
    100100                if ( false === $theme_root )
    101                         return false;
    102 
    103                 if ( ! in_array( $theme_root, (array) $wp_theme_directories ) )
     101                        $theme_root = WP_CONTENT_DIR . $theme_root;
     102                elseif ( ! in_array( $theme_root, (array) $wp_theme_directories ) )
    104103                        $theme_root = WP_CONTENT_DIR . $theme_root;
    105104        }
Note: See TracChangeset for help on using the changeset viewer.