WordPress.org

Make WordPress Core

Ticket #10959: child_templates.diff

File child_templates.diff, 532 bytes (added by scribu, 4 years ago)

In child themes, allow first level page templates to be used

  • wp-admin/includes/theme.php

     
    138138                                $name = _cleanup_header_comment($name[1]); 
    139139 
    140140                        if ( !empty( $name ) ) { 
    141                                 $page_templates[trim( $name )] = str_replace(get_template_directory(), '', $template); 
     141                                $page_templates[trim( $name )] = str_replace(array(get_template_directory(), get_stylesheet_directory()), '', $template); 
    142142                        } 
    143143                } 
    144144        }