Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

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

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
204 function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
205      global $current_site;
206      $current_user = wp_get_current_user();
207
208      if ( ! is_wp_error($errors) ) {
209           $errors = new WP_Error();
210      }
211
212      // allow definition of default variables
213      $filtered_results = apply_filters('signup_another_blog_init', array('blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors ));
214      $blogname = $filtered_results['blogname'];
215      $blog_title = $filtered_results['blog_title'];
216      $errors = $filtered_results['errors'];
217
218      echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), $current_site->site_name ) . '</h2>';
219
220      if ( $errors->get_error_code() ) {
221           echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>';
222      }