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 |
---|---|
117 | $add_user_errors = $user_details[ 'errors' ]; |
118 | } else { |
119 | /** |
120 | * Filter the user_login, also known as the username, before it is added to the site. |
121 | * |
122 | * @since 2.0.3 |
123 | * |
124 | * @param string $user_login The sanitized username. |
125 | */ |
126 | $new_user_login = apply_filters( 'pre_user_login', sanitize_user( wp_unslash( $_REQUEST['user_login'] ), true ) ); |
127 | if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { |
128 | add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email |
129 | } |
130 | wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ); |
131 | if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { |
132 | $key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $_REQUEST[ 'email' ] ) ); |
133 | wpmu_activate_signup( $key ); |
134 | $redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' ); |
135 | } else { |