WordPress.org

Make WordPress Core

Ticket #23329: 23329.2.patch

File 23329.2.patch, 525 bytes (added by ethitter, 5 years ago)
  • wp-includes/query.php

     
    720720 * @return bool
    721721 */
    722722function is_main_query() {
     723        if ( 'pre_get_posts' == current_filter() )
     724                _doing_it_wrong( __FUNCTION__, __( 'is_main_query() should not be used within the pre_get_posts action as it may not reflect the current query object.' ), '3.6' );
     725
    723726        global $wp_query;
    724727        return $wp_query->is_main_query();
    725728}