Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_update_network_user_counts ›

Seit3.7.0
Veraltetn/v
wp_update_network_user_counts ( $network_id = null )
Parameter:
  • (int|null) $network_id ID of the network. Default is the current network.
    Erforderlich: Nein
    Standard: null
Definiert in:
Codex:
Changelog:
  • 4.8.0

Update the network-wide user count.



Quellcode

function wp_update_network_user_counts( $network_id = null ) {
	global $wpdb;

	$count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" );
	update_network_option( $network_id, 'user_count', $count );
}