wp/wp-includes/ms-default-filters.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
--- a/wp/wp-includes/ms-default-filters.php	Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-includes/ms-default-filters.php	Mon Oct 14 17:39:30 2019 +0200
@@ -13,6 +13,8 @@
  * @since 3.0.0
  */
 
+add_action( 'init', 'ms_subdomain_constants' );
+
 // Functions
 add_action( 'update_option_blog_public', 'update_blog_public', 10, 2 );
 add_filter( 'option_users_can_register', 'users_can_register_signup_filter' );
@@ -23,12 +25,22 @@
 add_action( 'init', 'maybe_add_existing_user_to_blog' );
 add_action( 'wpmu_new_user', 'newuser_notify_siteadmin' );
 add_action( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );
+add_action( 'wpmu_activate_user', 'wpmu_welcome_user_notification', 10, 3 );
+add_action( 'after_signup_user', 'wpmu_signup_user_notification', 10, 4 );
+add_action( 'network_site_new_created_user',   'wp_send_new_user_notifications' );
+add_action( 'network_site_users_created_user', 'wp_send_new_user_notifications' );
+add_action( 'network_user_new_created_user',   'wp_send_new_user_notifications' );
 add_filter( 'sanitize_user', 'strtolower' );
 
+// Roles
+add_action( 'switch_blog', 'wp_switch_roles_and_user', 1, 2 );
+
 // Blogs
 add_filter( 'wpmu_validate_blog_signup', 'signup_nonce_check' );
 add_action( 'wpmu_new_blog', 'wpmu_log_new_registrations', 10, 2 );
 add_action( 'wpmu_new_blog', 'newblog_notify_siteadmin', 10, 2 );
+add_action( 'wpmu_activate_blog', 'wpmu_welcome_notification', 10, 5 );
+add_action( 'after_signup_site', 'wpmu_signup_blog_notification', 10, 7 );
 
 // Register Nonce
 add_action( 'signup_hidden_fields', 'signup_nonce_fields' );
@@ -42,15 +54,15 @@
 add_action( 'delete_post', '_update_posts_count_on_delete' );
 add_action( 'delete_post', '_update_blog_date_on_post_delete' );
 add_action( 'transition_post_status', '_update_blog_date_on_post_publish', 10, 3 );
-add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 2 );
+add_action( 'transition_post_status', '_update_posts_count_on_transition_post_status', 10, 3 );
 
 // Counts
 add_action( 'admin_init', 'wp_schedule_update_network_counts');
-add_action( 'update_network_counts', 'wp_update_network_counts');
+add_action( 'update_network_counts', 'wp_update_network_counts', 10, 0 );
 foreach ( array( 'user_register', 'deleted_user', 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action )
-	add_action( $action, 'wp_maybe_update_network_user_counts' );
+	add_action( $action, 'wp_maybe_update_network_user_counts', 10, 0 );
 foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action )
-	add_action( $action, 'wp_maybe_update_network_site_counts' );
+	add_action( $action, 'wp_maybe_update_network_site_counts', 10, 0 );
 unset( $action );
 
 // Files
@@ -75,10 +87,11 @@
 remove_filter( 'option_siteurl', '_config_wp_siteurl' );
 remove_filter( 'option_home',    '_config_wp_home'    );
 
-// Some options changes should trigger blog details refresh.
-add_action( 'update_option_blogname',   'refresh_blog_details', 10, 0 );
-add_action( 'update_option_siteurl',    'refresh_blog_details', 10, 0 );
-add_action( 'update_option_post_count', 'refresh_blog_details', 10, 0 );
+// Some options changes should trigger site details refresh.
+add_action( 'update_option_blogname',   'clean_site_details_cache', 10, 0 );
+add_action( 'update_option_siteurl',    'clean_site_details_cache', 10, 0 );
+add_action( 'update_option_post_count', 'clean_site_details_cache', 10, 0 );
+add_action( 'update_option_home',       'clean_site_details_cache', 10, 0 );
 
 // If the network upgrade hasn't run yet, assume ms-files.php rewriting is used.
 add_filter( 'default_site_option_ms_files_rewriting', '__return_true' );