WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 104 | /** |
| 105 | * Fires immediately after an existing user is invited to join the site, but before the notification is sent. |
| 106 | * |
| 107 | * @since 4.4.0 |
| 108 | * |
| 109 | * @param int $user_id The invited user's ID. |
| 110 | * @param array $role Array containing role information for the invited user. |
| 111 | * @param string $newuser_key The key of the invitation. |
| 112 | */ |
| 113 | do_action( 'invite_user', $user_id, $role, $newuser_key ); |
| 114 | |
| 115 | $switched_locale = switch_to_user_locale( $user_id ); |
| 116 | |
| 117 | if ( '' !== get_option( 'blogname' ) ) { |
| 118 | $site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); |
| 119 | } else { |
| 120 | $site_title = parse_url( home_url(), PHP_URL_HOST ); |
| 121 | } |
| 122 | |