Make WordPress Core

Ticket #36402: patch.diff

File patch.diff, 714 bytes (added by cristovaov, 9 years ago)

Patch function get_front_page_template()

  • template.php

     
    298298 *
    299299 * @return string Full path to front page template file.
    300300 */
    301 function get_front_page_template() {
    302         $templates = array('front-page.php');
    303 
    304         return get_query_template( 'front_page', $templates );
     301function get_front_page_template() { 
     302  $templates = array('front-page.php');
     303 
     304  // Ignore the parents 'front-page.php' if a child theme is used.
     305        if( !is_child_theme() || ( is_child_theme() && file_exists( STYLESHEETPATH . '/' . $templates[0] ) ) ) {
     306        return get_query_template( 'front_page', $templates );
     307  }
    305308}
    306309
    307310/**