Make WordPress Core

Ticket #37653: 37653.2.diff

File 37653.2.diff, 839 bytes (added by westonruter, 7 years ago)
  • src/wp-includes/query.php

    diff --git src/wp-includes/query.php src/wp-includes/query.php
    index c5c1ae6..b6691ec 100644
    class WP_Query { 
    44974497         */
    44984498        public function is_front_page() {
    44994499                // most likely case
    4500                 if ( 'posts' == get_option( 'show_on_front') && $this->is_home() )
     4500                if ( 'posts' == get_option( 'show_on_front') && $this->is_home() ) {
    45014501                        return true;
    4502                 elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $this->is_page( get_option( 'page_on_front' ) ) )
    4503                         return true;
    4504                 else
     4502                } elseif ( 'page' == get_option( 'show_on_front') ) {
     4503                        if ( ! get_option( 'page_on_front' ) ) {
     4504                                return $this->is_home();
     4505                        } else {
     4506                                return $this->is_page( get_option( 'page_on_front' ) );
     4507                        }
     4508                } else {
    45054509                        return false;
     4510                }
    45064511        }
    45074512
    45084513        /**