WordPress.org

Make WordPress Core

Ticket #6801: 6801.003.diff

File 6801.003.diff, 1.2 KB (added by AaronCampbell, 10 years ago)
  • trunk/wp-includes/template-loader.php

     
    2323        } else if ( is_tax() && $template = get_taxonomy_template()) {
    2424                include($template);
    2525                return;
     26        } else if ( is_front_page() && 'page' == get_option('show_on_front') && $template = get_static_front_page_template() ) {
     27                include($template);
     28                return;
    2629        } else if ( is_home() && $template = get_home_template() ) {
    2730                include($template);
    2831                return;
  • trunk/wp-includes/theme.php

     
    399399        return get_query_template('date');
    400400}
    401401
     402function get_static_front_page_template() {
     403        $template = '';
     404
     405        $template = get_page_template();
     406        if ( in_array($template, array('page.php', '')) && file_exists(TEMPLATEPATH . "/front-page.php") ) {
     407                $template = TEMPLATEPATH . "/front-page.php";
     408        }
     409
     410        return apply_filters('static_front_page_template', $template);
     411}
     412
    402413function get_home_template() {
    403414        $template = '';
    404415