Use WP_CONTENT_PATH to find find files. Props Terragg. fixes #7575 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@8716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-08-22 22:55:30 +00:00
parent 50683ea4ad
commit 35dfa69559
1 changed files with 2 additions and 2 deletions

View File

@ -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];
}