Adjust get_file_description() to account for absolute paths. see #12843
git-svn-id: https://develop.svn.wordpress.org/trunk@13994 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
812222bac3
commit
4c2edbc0d7
@ -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
Block a user