Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: invite_user

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
102                /**
103                 * Fires immediately after a user is invited to join a site, but before the notification is sent.
104                 *
105                 * @since 4.4.0
106                 *
107                 * @param int    $user_id     The invited user's ID.
108                 * @param array  $role        The role of invited user.
109                 * @param string $newuser_key The key of the invitation.
110                 */
111                do_action( 'invite_user', $user_id, $role, $newuser_key );
112
113                $switched_locale = switch_to_locale( get_user_locale( $user_details ) );
114
115                /* translators: 1: Site title, 2: Site URL, 3: User role, 4: Activation URL. */
116                $message = __(
117                     'Hi,
118
119 You\'ve been invited to join \'%1$s\' at
120 %2$s with the role of %3$s.