wp/wp-includes/ms-default-filters.php
changeset 19 3d72ae0968f4
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    74 add_action( 'template_redirect', 'maybe_redirect_404' );
    74 add_action( 'template_redirect', 'maybe_redirect_404' );
    75 add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
    75 add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
    76 
    76 
    77 // Administration.
    77 // Administration.
    78 add_filter( 'term_id_filter', 'global_terms', 10, 2 );
    78 add_filter( 'term_id_filter', 'global_terms', 10, 2 );
    79 add_action( 'delete_post', '_update_posts_count_on_delete' );
    79 add_action( 'after_delete_post', '_update_posts_count_on_delete' );
    80 add_action( 'delete_post', '_update_blog_date_on_post_delete' );
    80 add_action( 'delete_post', '_update_blog_date_on_post_delete' );
    81 add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
    81 add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
    82 add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 3 );
    82 add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 3 );
    83 
    83 
    84 // Counts.
    84 // Counts.
    85 add_action( 'admin_init', 'wp_schedule_update_network_counts' );
    85 add_action( 'admin_init', 'wp_schedule_update_network_counts' );
    86 add_action( 'update_network_counts', 'wp_update_network_counts', 10, 0 );
    86 add_action( 'update_network_counts', 'wp_update_network_counts', 10, 0 );
    87 foreach ( array( 'user_register', 'deleted_user', 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action ) {
    87 foreach ( array( 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action ) {
    88 	add_action( $action, 'wp_maybe_update_network_user_counts', 10, 0 );
    88 	add_action( $action, 'wp_maybe_update_network_user_counts', 10, 0 );
    89 }
    89 }
       
    90 
       
    91 // These counts are handled by wp_update_network_counts() on Multisite:
       
    92 remove_action( 'admin_init', 'wp_schedule_update_user_counts' );
       
    93 remove_action( 'wp_update_user_counts', 'wp_schedule_update_user_counts' );
       
    94 
    90 foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action ) {
    95 foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action ) {
    91 	add_action( $action, 'wp_maybe_update_network_site_counts', 10, 0 );
    96 	add_action( $action, 'wp_maybe_update_network_site_counts', 10, 0 );
    92 }
    97 }
    93 unset( $action );
    98 unset( $action );
    94 
    99