[wp-trac] [WordPress Trac] #18464: Relax network wildcard restrictions

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 17 21:03:09 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         |  Resolution:
 Keywords:                 |
---------------------------+------------------
Description changed by nacin:

Old description:

> 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 );
> }
> }}}

New description:

 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 > 10000,
 'sites', $count );
 }
 }}}

--

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18464#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list