Introduce get_page_template_slug( $id = null ) to return a page's template (like "showcase.php"). Returns false if post ID is not a page, and an empty string for the default page template. Use the function across core. props billerickson for initial patch. fixes #18750.

git-svn-id: https://develop.svn.wordpress.org/trunk@20075 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-03-02 18:56:54 +00:00
parent 8112ac28b7
commit 11fd4b45c0
4 changed files with 34 additions and 24 deletions

View File

@@ -1177,7 +1177,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Get the author info.
$author = get_userdata($page->post_author);
$page_template = get_post_meta( $page->ID, '_wp_page_template', true );
$page_template = get_page_template_slug( $page->ID );
if ( empty( $page_template ) )
$page_template = 'default';