mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
Fix fatal error in WP_User_Query when searching users by URL. Move wp_is_large_network() to wp-includes. fixes #23683 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@23664 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -695,23 +695,3 @@ var tb_pathToImage = "../../wp-includes/js/thickbox/loadingAnimation.gif";
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not we have a large network.
|
||||
*
|
||||
* The default criteria for a large network is either more than 10,000 users or more than 10,000 sites.
|
||||
* Plugins can alter this criteria using the 'wp_is_large_network' filter.
|
||||
*
|
||||
* @since 3.3.0
|
||||
* @param string $using 'sites or 'users'. Default is 'sites'.
|
||||
* @return bool True if the network meets the criteria for large. False otherwise.
|
||||
*/
|
||||
function wp_is_large_network( $using = 'sites' ) {
|
||||
if ( 'users' == $using ) {
|
||||
$count = get_user_count();
|
||||
return apply_filters( 'wp_is_large_network', $count > 10000, 'users', $count );
|
||||
}
|
||||
|
||||
$count = get_blog_count();
|
||||
return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user