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 |
---|---|
304 | if ( !empty( $_POST['newuser'] ) ) { |
305 | $newuser = $_POST['newuser']; |
306 | $userid = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM " . $wpdb->users . " WHERE user_login = %s", $newuser ) ); |
307 | if ( $userid ) { |
308 | $user = $wpdb->get_var( "SELECT user_id FROM " . $wpdb->usermeta . " WHERE user_id='$userid' AND meta_key='{$blog_prefix}capabilities'" ); |
309 | if ( $user == false ) |
310 | add_user_to_blog( $id, $userid, $_POST['new_role'] ); |
311 | } |
312 | } |
313 | do_action( 'wpmu_update_blog_options' ); |
314 | restore_current_blog(); |
315 | wp_redirect( add_query_arg( array( 'updated' => 'true', 'action' => 'editblog', 'id' => $id ), wp_get_referer() ) ); |
316 | break; |
317 |
|
318 | case 'deleteblog': |
319 | check_admin_referer('deleteblog'); |
320 | if ( ! current_user_can( 'manage_sites' ) ) |
321 | wp_die( __( 'You do not have permission to access this page.' ) ); |
322 |
|