WordPress.org

Make WordPress Core

Ticket #18677: 18677.diff

File 18677.diff, 733 bytes (added by nacin, 21 months ago)
  • wp-includes/query.php

     
    715715        return $wp_query->is_404(); 
    716716} 
    717717 
     718/** 
     719 * Is the query the main query? 
     720 * 
     721 * @since 3.3.0 
     722 * 
     723 * @return bool 
     724 */ 
     725function is_main_query() { 
     726        global $wp_query; 
     727        return $wp_query->is_main_query(); 
     728} 
     729 
    718730/* 
    719731 * The Loop.  Post loop control. 
    720732 */ 
     
    34673479        function is_404() { 
    34683480                return (bool) $this->is_404; 
    34693481        } 
     3482 
     3483        /** 
     3484         * Is the query the main query? 
     3485         * 
     3486         * @since 3.3.0 
     3487         * 
     3488         * @return bool 
     3489         */ 
     3490        function is_main_query() { 
     3491                global $wp_the_query; 
     3492                return $wp_the_query === $this; 
     3493        } 
    34703494} 
    34713495 
    34723496/**