[wp-trac] [WordPress Trac] #18464: Relax network wildcard restrictions
WordPress Trac
wp-trac at lists.automattic.com
Wed Aug 17 21:02:06 UTC 2011
#18464: Relax network wildcard restrictions
---------------------------+-----------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.3
Component: Network Admin | Version:
Severity: normal | Keywords:
---------------------------+-----------------
The network wildcard restrictions added in #15170 are useful for scaling
up big networks.
But there's a very small number of networks that have greater than 10,000
blogs. Let's aim for the majority here and scrap the wildcard restrictions
when we're dealing with smaller networks.
Here's a function we can use to replace our current ad-hoc checks against
get_user_count() and get_blog_count():
{{{
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 > 1000,
'sites', $count );
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18464>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list