WordPress.org

Make WordPress Core

Changeset 13994


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

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

File:
1 edited

Legend:

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

    r13993 r13994  
    5353        return $wp_file_descriptions[basename( $file )]; 
    5454    } 
    55     elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) { 
    56         $template_data = implode( '', file( WP_CONTENT_DIR . $file ) ); 
     55    elseif ( file_exists( $file ) && is_file( $file ) ) { 
     56        $template_data = implode( '', file( $file ) ); 
    5757        if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name )) 
    5858            return _cleanup_header_comment($name[1]) . ' Page Template'; 
Note: See TracChangeset for help on using the changeset viewer.