Adjust get_file_description() to account for absolute paths. see #12843
git-svn-id: http://svn.automattic.com/wordpress/trunk@13994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
37faed2c03
commit
f925c3c2b4
|
@ -52,8 +52,8 @@ function get_file_description( $file ) {
|
|||
if ( isset( $wp_file_descriptions[basename( $file )] ) ) {
|
||||
return $wp_file_descriptions[basename( $file )];
|
||||
}
|
||||
elseif ( file_exists( WP_CONTENT_DIR . $file ) && is_file( WP_CONTENT_DIR . $file ) ) {
|
||||
$template_data = implode( '', file( WP_CONTENT_DIR . $file ) );
|
||||
elseif ( file_exists( $file ) && is_file( $file ) ) {
|
||||
$template_data = implode( '', file( $file ) );
|
||||
if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ))
|
||||
return _cleanup_header_comment($name[1]) . ' Page Template';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue