Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_update_network_counts [ WordPress Function ]

wp_update_network_counts ( No parameters )
Defined at:



Update the network-wide counts for the current network.

@since 3.1.0

Source


<?php
function wp_update_network_counts() {
    global 
$wpdb;

    
$count $wpdb->get_var$wpdb->prepare("SELECT COUNT(blog_id) as c FROM $wpdb->blogs WHERE site_id = %d AND spam = '0' AND deleted = '0' and archived = '0'"$wpdb->siteid) );
    
update_site_option'blog_count'$count );

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

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics