Changeset 12135
- Timestamp:
- 11/01/2009 10:18:34 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r12134 r12135 828 828 * Retrieve path of page template in current or parent template. 829 829 * 830 * First attempt is to look for the file in the '_wp_page_template' page meta831 * data. The second attempt, if the first has a file and is not empty, is to832 * look for 'page.php'.830 * Will first look for the specifically assigned page template 831 * The will search for 'page-{slug}.php' followed by 'page-id.php' 832 * and finally 'page.php' 833 833 * 834 834 * @since 1.5.0 … … 841 841 $id = (int) $wp_query->post->ID; 842 842 $template = get_post_meta($id, '_wp_page_template', true); 843 $pagename = get_query_var('pagename'); 843 844 844 845 if ( 'default' == $template ) … … 848 849 if ( !empty($template) && !validate_file($template) ) 849 850 $templates[] = $template; 850 851 if ( $pagename ) 852 $templates[] = "page-$pagename.php"; 853 if ( $id ) 854 $templates[] = "page-$id.php"; 851 855 $templates[] = "page.php"; 852 856
Note: See TracChangeset
for help on using the changeset viewer.