Make WordPress Core


Ignore:
Timestamp:
09/25/2013 04:20:21 PM (12 years ago)
Author:
nacin
Message:

Live network counts of users and sites for small networks.

props adamsilverstein, jeremyfelt.
fixes #22917.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-default-filters.php

    r25618 r25621  
    3838add_action( 'delete_post', '_update_blog_date_on_post_delete' );
    3939add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
     40
     41// Counts
    4042add_action( 'admin_init', 'wp_schedule_update_network_counts');
    4143add_action( 'update_network_counts', 'wp_update_network_counts');
     44foreach ( array( 'user_register', 'deleted_user', 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action )
     45    add_action( $action, 'wp_maybe_update_network_user_counts' );
     46foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action )
     47    add_action( $action, 'wp_maybe_update_network_site_counts' );
     48unset( $action );
    4249
    4350// Files
Note: See TracChangeset for help on using the changeset viewer.