From 85d3345e050e1edae515f60e2a656d9d0da8decc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 25 Aug 2015 17:48:21 +0000 Subject: [PATCH] Multisite: Add `'invite_user'` action that fires immediately after a user is invited to join a site, but before the notification is sent. props ebinnion, MikeHansenMe, DrewAPicture. fixes #33008. Built from https://develop.svn.wordpress.org/trunk@33732 git-svn-id: http://core.svn.wordpress.org/trunk@33700 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/user-new.php | 12 ++++++++++++ wp-includes/version.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index 33fd41d662..631c746a57 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -79,6 +79,18 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) { $roles = get_editable_roles(); $role = $roles[ $_REQUEST['role'] ]; + + /** + * Fires immediately after a user is invited to join a site, but before the notification is sent. + * + * @since 4.4.0 + * + * @param int $user_id The invited user's ID. + * @param array $role The role of invited user. + * @param string $newuser_key The key of the invitation. + */ + do_action( 'invite_user', $user_id, $role, $newuser_key ); + /* translators: 1: Site name, 2: site URL, 3: role, 4: activation URL */ $message = __( 'Hi, diff --git a/wp-includes/version.php b/wp-includes/version.php index 3c476ab815..e78a96b770 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33731'; +$wp_version = '4.4-alpha-33732'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.