WordPress.org

Make WordPress Core

Changeset 14257


Ignore:
Timestamp:
04/27/10 21:07:26 (4 years ago)
Author:
nacin
Message:

Adjust get_file_description() to account for absolute paths. fixes #12843 for 2.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.9/wp-admin/includes/file.php

    r12545 r14257  
    5050        return $wp_file_descriptions[basename( $file )]; 
    5151    } 
    52     elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) { 
    53         $template_data = implode( '', file( WP_CONTENT_DIR . $file ) ); 
     52    elseif ( file_exists( $file ) && is_file( $file ) ) { 
     53        $template_data = implode( '', file( $file ) ); 
    5454        if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name )) 
    5555            return _cleanup_header_comment($name[1]) . ' Page Template'; 
Note: See TracChangeset for help on using the changeset viewer.