Make WordPress Core

Ticket #20899: 20899.2.diff

File 20899.2.diff, 1.4 KB (added by jubstuff, 9 years ago)
  • src/wp-includes/query.php

     
    17711771                if ( $this->is_feed && ( !empty($qv['withcomments']) || ( empty($qv['withoutcomments']) && $this->is_singular ) ) )
    17721772                        $this->is_comment_feed = true;
    17731773
    1774                 if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots ) )
     1774                if ( !( $this->is_singular || $this->is_archive || $this->is_search || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots ) )
    17751775                        $this->is_home = true;
    17761776
    17771777                // Correct is_* for page_on_front and page_for_posts
  • tests/phpunit/tests/feed/rss2.php

     
    113113        }
    114114
    115115        /**
     116         * @ticket 20899
     117         */
     118        function test_main_rss_should_be_home_and_feed() {
     119                $this->go_to( '/?feed=rss2' );
     120
     121                $this->assertTrue( is_home() && is_feed() );
     122        }
     123
     124        /**
    116125         * [test_channel_element description]
    117126         * @return [type] [description]
    118127         */