WordPress.org

Make WordPress Core

Ticket #10953: 10953.diff

File 10953.diff, 512 bytes (added by sivel, 6 years ago)

$template contains the full path of the template. Don't prepend WP_CONTENT_DIR to the template path.

  • wp-admin/includes/theme.php

     
    131131 
    132132        if ( is_array( $templates ) ) { 
    133133                foreach ( $templates as $template ) { 
    134                         $template_data = implode( '', file( WP_CONTENT_DIR.$template )); 
     134                        $template_data = implode( '', file( $template ) ); 
    135135 
    136136                        $name = ''; 
    137137                        if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) )