Use WP_CONTENT_DIR in get_page_templates(). Props ionfish. see #7059
git-svn-id: http://svn.automattic.com/wordpress/trunk@8051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0c9006cc2d
commit
06ec52753b
|
@ -33,7 +33,7 @@ function get_page_templates() {
|
||||||
|
|
||||||
if ( is_array( $templates ) ) {
|
if ( is_array( $templates ) ) {
|
||||||
foreach ( $templates as $template ) {
|
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( '|Template Name:(.*)$|mi', $template_data, $name );
|
||||||
preg_match( '|Description:(.*)$|mi', $template_data, $description );
|
preg_match( '|Description:(.*)$|mi', $template_data, $description );
|
||||||
|
|
Loading…
Reference in New Issue