WordPress.org

Make WordPress Core

Changeset 20756


Ignore:
Timestamp:
05/09/12 17:20:22 (2 years ago)
Author:
ryan
Message:

Set split_the_query to false if more than 500 rows requested. Props SergeyBiryukov. fixes #20628

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r20740 r20756  
    26272627        } 
    26282628 
    2629         $split_the_query = apply_filters( 'split_the_query', ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits) ), $this ); 
     2629        $split_the_query = ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 ); 
     2630        $split_the_query = apply_filters( 'split_the_query', $split_the_query, $this ); 
    26302631 
    26312632        if ( $split_the_query ) { 
Note: See TracChangeset for help on using the changeset viewer.