Make WordPress Core

Ticket #29618: 29618.patch

File 29618.patch, 724 bytes (added by lancewillett, 12 years ago)
  • wp-includes/theme.php

     
    122122
    123123/**
    124124 * Whether a child theme is in use.
     125 * Check for a difference in stylesheet and template values, plus a non-empty
     126 * "Template" comment in the child theme stylesheet.
    125127 *
    126128 * @since 3.0.0
    127129 *
     
    128130 * @return bool true if a child theme is in use, false otherwise.
    129131 **/
    130132function is_child_theme() {
    131         return ( TEMPLATEPATH !== STYLESHEETPATH );
     133        $theme = wp_get_theme();
     134
     135        $template = $theme->get( 'Template' );
     136
     137        return ( TEMPLATEPATH !== STYLESHEETPATH && ! empty( $template ) );
    132138}
    133139
    134140/**