mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Send multisite site/user signup emails via hooked functions.
Site and user signup notifications are moved to the new actions `'after_signup_site'` and `'after_signup_user'`. Site and user activation notifications are moved to the existing actions `'wpmu_activate_blog'` and `'wpmu_activate_user'`. Props dshanske, thomaswm, jeremyfelt. See #33587.. Built from https://develop.svn.wordpress.org/trunk@34112 git-svn-id: http://core.svn.wordpress.org/trunk@34080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ecc4106ed1
commit
49803a45f3
@ -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' );
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user