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 |
---|---|
1290 | if ( empty( $details ) || is_wp_error( add_existing_user_to_blog( $details ) ) ) |
1291 | wp_die( sprintf(__('An error occurred adding you to this site. Back to the <a href="%s">homepage</a>.'), site_url() ) ); |
1292 |
|
1293 | wp_die( sprintf(__('You have been added to this site. Please visit the <a href="%s">homepage</a> or <a href="%s">login</a> using your username and password.'), site_url(), admin_url() ), __('Success') ); |
1294 | } |
1295 |
|
1296 | function add_existing_user_to_blog( $details = false ) { |
1297 | if ( is_array( $details ) ) { |
1298 | $result = add_user_to_blog( '', $details[ 'user_id' ], $details[ 'role' ] ); |
1299 | do_action( 'added_existing_user', $details[ 'user_id' ], $result ); |
1300 | } |
1301 | return $result; |
1302 | } |
1303 |
|
1304 | function add_new_user_to_blog( $user_id, $email, $meta ) { |
1305 | global $current_site; |
1306 | if ( $meta[ 'add_to_blog' ] ) { |
1307 | $blog_id = $meta[ 'add_to_blog' ]; |
1308 | $role = $meta[ 'new_role' ]; |