Make WordPress Core

Changeset 34112


Ignore:
Timestamp:
09/14/2015 03:27:47 AM (11 years ago)
Author:
boonebgorges
Message:

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..

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r32611 r34112  
    2626add_action( 'wpmu_new_user', 'newuser_notify_siteadmin' );
    2727add_action( 'wpmu_activate_user', 'add_new_user_to_blog', 10, 3 );
     28add_action( 'wpmu_activate_user', 'wpmu_welcome_user_notification', 10, 3 );
     29add_action( 'after_signup_user', 'wpmu_signup_user_notification', 10, 4 );
    2830add_filter( 'sanitize_user', 'strtolower' );
    2931
     
    3234add_action( 'wpmu_new_blog', 'wpmu_log_new_registrations', 10, 2 );
    3335add_action( 'wpmu_new_blog', 'newblog_notify_siteadmin', 10, 2 );
     36add_action( 'wpmu_activate_blog', 'wpmu_welcome_notification', 10, 5 );
     37add_action( 'after_signup_site', 'wpmu_signup_blog_notification', 10, 7 );
    3438
    3539// Register Nonce
  • trunk/src/wp-includes/ms-functions.php

    r33952 r34112  
    746746        ) );
    747747
    748         wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta);
     748        /**
     749         * Fires after site signup information has been written to the database.
     750         *
     751         * @since 4.4.0
     752         *
     753         * @param string $domain     The requested domain.
     754         * @param string $path       The requested path.
     755         * @param string $title      The requested site title.
     756         * @param string $user       The user's requested login name.
     757         * @param string $user_email The user's email address.
     758         * @param string $key        The user's activation key
     759         * @param array  $meta       By default, contains the requested privacy setting and lang_id.
     760         */
     761        do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta );
    749762}
    750763
     
    783796        ) );
    784797
    785         wpmu_signup_user_notification($user, $user_email, $key, $meta);
     798        /**
     799         * Fires after a user's signup information has been written to the database.
     800         *
     801         * @since 4.4.0
     802         *
     803         * @param string $user       The user's requested login name.
     804         * @param string $user_email The user's email address.
     805         * @param string $key        The user's activation key
     806         * @param array  $meta       Additional signup meta. By default, this is an empty array.
     807         */
     808        do_action( 'after_signup_user', $user, $user_email, $key, $meta );
    786809}
    787810
     
    10281051                        return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
    10291052
    1030                 wpmu_welcome_user_notification( $user_id, $password, $meta );
    10311053                /**
    10321054                 * Fires immediately after a new user is activated.
     
    10561078
    10571079        $wpdb->update( $wpdb->signups, array('active' => 1, 'activated' => $now), array('activation_key' => $key) );
    1058         wpmu_welcome_notification($blog_id, $user_id, $password, $signup->title, $meta);
    10591080        /**
    10601081         * Fires immediately after a site is activated.
Note: See TracChangeset for help on using the changeset viewer.