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:
parent
50683ea4ad
commit
35dfa69559
|
@ -9,8 +9,8 @@ function get_file_description( $file ) {
|
||||||
if ( isset( $wp_file_descriptions[basename( $file )] ) ) {
|
if ( isset( $wp_file_descriptions[basename( $file )] ) ) {
|
||||||
return $wp_file_descriptions[basename( $file )];
|
return $wp_file_descriptions[basename( $file )];
|
||||||
}
|
}
|
||||||
elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) {
|
elseif ( file_exists( WP_CONTENT_PATH . $file ) && is_file( WP_CONTENT_PATH . $file ) ) {
|
||||||
$template_data = implode( '', file( ABSPATH . $file ) );
|
$template_data = implode( '', file( WP_CONTENT_PATH . $file ) );
|
||||||
if ( preg_match( "|Template Name:(.*)|i", $template_data, $name ))
|
if ( preg_match( "|Template Name:(.*)|i", $template_data, $name ))
|
||||||
return $name[1];
|
return $name[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue