mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Use WP_CONTENT_PATH to find find files. Props Terragg. fixes #7575 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@8716 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b6833bae8
commit
dd385234e4
@ -9,8 +9,8 @@ function get_file_description( $file ) {
|
||||
if ( isset( $wp_file_descriptions[basename( $file )] ) ) {
|
||||
return $wp_file_descriptions[basename( $file )];
|
||||
}
|
||||
elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) {
|
||||
$template_data = implode( '', file( ABSPATH . $file ) );
|
||||
elseif ( file_exists( WP_CONTENT_PATH . $file ) && is_file( WP_CONTENT_PATH . $file ) ) {
|
||||
$template_data = implode( '', file( WP_CONTENT_PATH . $file ) );
|
||||
if ( preg_match( "|Template Name:(.*)|i", $template_data, $name ))
|
||||
return $name[1];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user