Ticket #23683: 23683.2.patch
File 23683.2.patch, 2.7 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/ms.php
695 695 </script> 696 696 <?php 697 697 } 698 699 /**700 * Whether or not we have a large network.701 *702 * The default criteria for a large network is either more than 10,000 users or more than 10,000 sites.703 * Plugins can alter this criteria using the 'wp_is_large_network' filter.704 *705 * @since 3.3.0706 * @param string $using 'sites or 'users'. Default is 'sites'.707 * @return bool True if the network meets the criteria for large. False otherwise.708 */709 function wp_is_large_network( $using = 'sites' ) {710 if ( 'users' == $using ) {711 $count = get_user_count();712 return apply_filters( 'wp_is_large_network', $count > 10000, 'users', $count );713 }714 715 $count = get_blog_count();716 return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count );717 } -
wp-includes/ms-functions.php
1977 1977 return min( $size, $fileupload_maxk ); 1978 1978 1979 1979 return min( $size, $fileupload_maxk, get_upload_space_available() ); 1980 } 1981 No newline at end of file 1980 } 1981 1982 /** 1983 * Whether or not we have a large network. 1984 * 1985 * The default criteria for a large network is either more than 10,000 users or more than 10,000 sites. 1986 * Plugins can alter this criteria using the 'wp_is_large_network' filter. 1987 * 1988 * @since 3.3.0 1989 * @param string $using 'sites or 'users'. Default is 'sites'. 1990 * @return bool True if the network meets the criteria for large. False otherwise. 1991 */ 1992 function wp_is_large_network( $using = 'sites' ) { 1993 if ( 'users' == $using ) { 1994 $count = get_user_count(); 1995 return apply_filters( 'wp_is_large_network', $count > 10000, 'users', $count ); 1996 } 1997 1998 $count = get_blog_count(); 1999 return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count ); 2000 } -
wp-includes/user.php
474 474 $search_columns = array('user_email'); 475 475 elseif ( is_numeric($search) ) 476 476 $search_columns = array('user_login', 'ID'); 477 elseif ( preg_match('|^https?://|', $search) && ! wp_is_large_network( 'users') )477 elseif ( preg_match('|^https?://|', $search) && ( ! is_multisite() || ! wp_is_large_network( 'users' ) ) ) 478 478 $search_columns = array('user_url'); 479 479 else 480 480 $search_columns = array('user_login', 'user_nicename');