Welcome, visitor! Log in
 

Source View: edit_user_profile_update

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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: 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.

Source View

Line Code
73
74 check_admin_referer('update-user_' . $user_id);
75
76 if ( !current_user_can('edit_user', $user_id) )
77      wp_die(__('You do not have permission to edit this user.'));
78
79 if ( IS_PROFILE_PAGE )
80      do_action('personal_options_update', $user_id);
81 else
82      do_action('edit_user_profile_update', $user_id);
83
84 $errors = edit_user($user_id);
85
86 if ( !is_wp_error( $errors ) ) {
87      $redirect = (IS_PROFILE_PAGE ? "profile.php?" : "user-edit.php?user_id=$user_id&"). "updated=true";
88      $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect);
89      wp_redirect($redirect);
90      exit;
91 }