Use WP_CONTENT_DIR in get_page_templates(). Props ionfish. see #7059
git-svn-id: https://develop.svn.wordpress.org/trunk@8051 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f88b6a9f92
commit
d9712588a0
@ -33,7 +33,7 @@ function get_page_templates() {
|
||||
|
||||
if ( is_array( $templates ) ) {
|
||||
foreach ( $templates as $template ) {
|
||||
$template_data = implode( '', file( ABSPATH.$template ));
|
||||
$template_data = implode( '', file( WP_CONTENT_DIR.$template ));
|
||||
|
||||
preg_match( '|Template Name:(.*)$|mi', $template_data, $name );
|
||||
preg_match( '|Description:(.*)$|mi', $template_data, $description );
|
||||
|
Loading…
Reference in New Issue
Block a user