Source View: signup_blog_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.

  • 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
299      <?php
300      do_action( 'signup_finished' );
301 }
302
303 function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
304      if ( !is_wp_error($errors) )
305           $errors = new WP_Error();
306
307      // allow definition of default variables
308      $filtered_results = apply_filters('signup_blog_init', array('user_name' => $user_name, 'user_email' => $user_email, 'blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors ));
309      $user_name = $filtered_results['user_name'];
310      $user_email = $filtered_results['user_email'];
311      $blogname = $filtered_results['blogname'];
312      $blog_title = $filtered_results['blog_title'];
313      $errors = $filtered_results['errors'];
314
315      if ( empty($blogname) )
316           $blogname = $user_name;
317      ?>