diff --git a/wp-includes/ms-default-filters.php b/wp-includes/ms-default-filters.php index 5fa60baa30..eab4fc40bf 100644 --- a/wp-includes/ms-default-filters.php +++ b/wp-includes/ms-default-filters.php @@ -25,12 +25,16 @@ add_filter( 'wpmu_validate_user_signup', 'signup_nonce_check' ); 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_filter( 'sanitize_user', 'strtolower' ); // 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' ); diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 464d83ead5..53d13c5e9f 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -745,7 +745,20 @@ function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = a 'meta' => $meta ) ); - wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta); + /** + * Fires after site signup information has been written to the database. + * + * @since 4.4.0 + * + * @param string $domain The requested domain. + * @param string $path The requested path. + * @param string $title The requested site title. + * @param string $user The user's requested login name. + * @param string $user_email The user's email address. + * @param string $key The user's activation key + * @param array $meta By default, contains the requested privacy setting and lang_id. + */ + do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta ); } /** @@ -782,7 +795,17 @@ function wpmu_signup_user( $user, $user_email, $meta = array() ) { 'meta' => $meta ) ); - wpmu_signup_user_notification($user, $user_email, $key, $meta); + /** + * Fires after a user's signup information has been written to the database. + * + * @since 4.4.0 + * + * @param string $user The user's requested login name. + * @param string $user_email The user's email address. + * @param string $key The user's activation key + * @param array $meta Additional signup meta. By default, this is an empty array. + */ + do_action( 'after_signup_user', $user, $user_email, $key, $meta ); } /** @@ -1027,7 +1050,6 @@ function wpmu_activate_signup($key) { if ( isset( $user_already_exists ) ) return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup); - wpmu_welcome_user_notification( $user_id, $password, $meta ); /** * Fires immediately after a new user is activated. * @@ -1055,7 +1077,6 @@ function wpmu_activate_signup($key) { } $wpdb->update( $wpdb->signups, array('active' => 1, 'activated' => $now), array('activation_key' => $key) ); - wpmu_welcome_notification($blog_id, $user_id, $password, $signup->title, $meta); /** * Fires immediately after a site is activated. * diff --git a/wp-includes/version.php b/wp-includes/version.php index cec29d5959..9ec76c4df6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34111'; +$wp_version = '4.4-alpha-34112'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.