Ticket #6801: 6801.3.diff
| File 6801.3.diff, 2.4 KB (added by , 16 years ago) |
|---|
-
wp-includes/template-loader.php
23 23 if ( is_404() && $template = get_404_template() ) : 24 24 elseif ( is_search() && $template = get_search_template() ) : 25 25 elseif ( is_tax() && $template = get_taxonomy_template() ) : 26 elseif ( is_front_page() && $template = get_front_page_template() ) : 26 27 elseif ( is_home() && $template = get_home_template() ) : 27 28 elseif ( is_attachment() && $template = get_attachment_template() ) : 28 29 remove_filter('the_content', 'prepend_attachment'); … … 43 44 return; 44 45 endif; 45 46 46 ?> 47 No newline at end of file 47 ?> -
wp-includes/theme.php
847 847 } 848 848 849 849 /** 850 * Retrieve path of front-page template in current or parent template. 851 * 852 * First attempt is to look for a page specific template either based on 853 * the '_wp_page_template' page meta, the page slug and the page id. 854 * The second attempt is to look for 'front-page.php' before falling back 855 * to 'page.php' and ultimately falling back to 'index.php' if none of 856 * these exist. 857 * 858 * @since 3.0.0 859 * @uses apply_filters() Calls 'front_page_template' on file path of template. 860 * 861 * @return string 862 */ 863 function get_front_page_template() { 864 global $wp_query; 865 866 $templates = array(); 867 $templates[] = "front-page.php"; 868 869 // If we are showing a page on the front give priority to the page specific templates. 870 if ( 'page' == get_option('show_on_front') ) { 871 $templates[] = basename(get_page_template()); 872 } else if ( 'posts' == get_option('show_on_front') ) { 873 $templates[] = basename(get_home_template()); 874 } 875 876 return apply_filters('front_page_template', locate_template($templates)); 877 } 878 879 /** 850 880 * Retrieve path of page template in current or parent template. 851 881 * 852 882 * Will first look for the specifically assigned page template … … 983 1013 984 1014 $located = ''; 985 1015 foreach ( $template_names as $template_name ) { 1016 if ( !$template_name ) 1017 continue; 986 1018 if ( file_exists(STYLESHEETPATH . '/' . $template_name)) { 987 1019 $located = STYLESHEETPATH . '/' . $template_name; 988 1020 break;