Changeset 20075 for trunk/wp-includes/template.php
- Timestamp:
- 03/02/2012 06:56:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template.php
r20002 r20075 226 226 function get_page_template() { 227 227 $id = get_queried_object_id(); 228 $template = get_p ost_meta($id, '_wp_page_template', true);228 $template = get_page_template_slug(); 229 229 $pagename = get_query_var('pagename'); 230 230 231 if ( ! $pagename && $id > 0) {231 if ( ! $pagename && $id ) { 232 232 // If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object 233 233 $post = get_queried_object(); … … 235 235 } 236 236 237 if ( 'default' == $template ) 238 $template = ''; 239 240 $templates = array(); 241 if ( !empty($template) && !validate_file($template) ) 237 $templates = array(); 238 if ( $template && 0 === validate_file( $template ) ) 242 239 $templates[] = $template; 243 240 if ( $pagename )
Note: See TracChangeset
for help on using the changeset viewer.