[wp-trac] [WordPress Trac] #37865: Allow using the `$network_id` parameter of `get_blog_count()` again

WordPress Trac noreply at wordpress.org
Tue Oct 11 17:37:48 UTC 2016


#37865: Allow using the `$network_id` parameter of `get_blog_count()` again
-----------------------------------+------------------------------
 Reporter:  flixos90               |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Networks and Sites     |     Version:  3.7
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  multisite
-----------------------------------+------------------------------
Changes (by flixos90):

 * keywords:  has-patch => has-patch 2nd-opinion


Comment:

 An alternative approach could be:

 * introduce `get_network_site_count( $network = null )` (returns the value
 of the network option `blog_count`)
 * introduce `get_global_site_count()` (returns the sum of
 `get_network_site_count()` for all networks)
 * deprecate `get_blog_count()` and recommend `get_network_site_count()` as
 replacement
 * replace Core usages of `get_blog_count()` with either
 `get_network_site_count()` or `get_global_site_count()` (depending on
 context)

 Related to this ticket: #37866

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37865#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list