WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/02/2012 06:56:54 PM (8 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r20074 r20075  
    11781178            $author = get_userdata($page->post_author);
    11791179
    1180             $page_template = get_post_meta( $page->ID, '_wp_page_template', true );
     1180            $page_template = get_page_template_slug( $page->ID );
    11811181            if ( empty( $page_template ) )
    11821182                $page_template = 'default';
Note: See TracChangeset for help on using the changeset viewer.