Make WordPress Core


Ignore:
Timestamp:
10/03/2011 04:30:07 PM (13 years ago)
Author:
ryan
Message:

Consolidate larg network criteria into wp_is_large_network(). Allow plugins to change this criteria via filter. Props PeteMall. fixes #18464

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-users-list-table.php

    r18562 r18871  
    3333        );
    3434
    35         $args['search'] = ltrim($args['search'], '*');
     35        if ( wp_is_large_network( 'users' ) )
     36            $args['search'] = ltrim( $args['search'], '*' );
    3637
    3738        if ( $role == 'super' ) {
     
    4243        // If the network is large and a search is not being performed, show only the latest users with no paging in order
    4344        // to avoid expensive count queries.
    44         if ( !$usersearch && ( get_blog_count() >= 10000 ) ) {
     45        if ( !$usersearch && wp_is_large_network( 'users' ) ) {
    4546            if ( !isset($_REQUEST['orderby']) )
    4647                $_GET['orderby'] = $_REQUEST['orderby'] = 'id';
Note: See TracChangeset for help on using the changeset viewer.