[wp-trac] [WordPress Trac] #37866: Introduce `$network_id` parameter in `get_user_count()`
WordPress Trac
noreply at wordpress.org
Tue Oct 11 17:41:15 UTC 2016
#37866: Introduce `$network_id` parameter in `get_user_count()`
-----------------------------------+------------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version:
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:
* adjust logic in `wp_update_network_user_counts()` to count only users in
the current network instead of all users
* introduce `get_network_user_count( $network = null )` (returns the value
of the network option `user_count`)
* introduce `get_global_user_count()` (returns the sum of
`get_network_user_count()` for all networks)
* deprecate `get_user_count()` and recommend `get_global_user_count()` as
replacement
* replace Core usages of `get_user_count()` with either
`get_network_user_count()` or `get_global_user_count()` (depending on
context)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37866#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list