Make WordPress Core

Ticket #23329: 23329.3.patch

File 23329.3.patch, 595 bytes (added by c3mdigital, 12 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. Use the current query object method, $query->is_main_query(), instead' ), '3.7' );
     725
    723726        global $wp_query;
    724727        return $wp_query->is_main_query();
    725728}