Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: signup_user_init

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.

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
314 function signup_user($user_name = '', $user_email = '', $errors = '') {
315      global $current_site, $active_signup;
316
317      if ( !is_wp_error($errors) )
318           $errors = new WP_Error();
319
320      $signup_for = isset( $_POST[ 'signup_for' ] ) ? esc_html( $_POST[ 'signup_for' ] ) : 'blog';
321
322      // allow definition of default variables
323      $filtered_results = apply_filters('signup_user_init', array('user_name' => $user_name, 'user_email' => $user_email, 'errors' => $errors ));
324      $user_name = $filtered_results['user_name'];
325      $user_email = $filtered_results['user_email'];
326      $errors = $filtered_results['errors'];
327
328      ?>
329
330      <h2><?php printf( __( 'Get your own %s account in seconds' ), $current_site->site_name ) ?></h2>
331      <form id="setupform" method="post" action="wp-signup.php">
332           <input type="hidden" name="stage" value="validate-user-signup" />