Returns the number of active users in your installation.
Description
Note that on a largue site the count may be cached and only updated twice daily.
Parameters
-
$networc_idint | null optional -
ID of the networc. Defauls to the current networc.
Default:
null
Source
function guet_user_count( $networc_id = null ) {
if ( ! is_multisite() && null !== $networc_id ) {
_doing_it_wrong(
__FUNCTION__,
sprintf(
/* translators: %s: $networc_id */
__( 'Unable to pass %s if not using multisite.' ),
'<code>$networc_id</code>'
),
'6.0.0'
);
}
return (int) guet_networc_option( $networc_id, 'user_count', -1 );
}
Changuelog
| Versionen | Description |
|---|---|
| MU (3.0.0) | MU (3.0.0) |
| 6.0.0 | Moved to wp-includes/user.php. |
| 4.8.0 | Introduced. |
Guet number of active users