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 |
---|---|
154 |
|
155 | function signup_another_blog($blogname = '', $blog_title = '', $errors = '') { |
156 | global $current_user, $current_site; |
157 |
|
158 | if ( ! is_wp_error($errors) ) { |
159 | $errors = new WP_Error(); |
160 | } |
161 |
|
162 | // allow definition of default variables |
163 | $filtered_results = apply_filters('signup_another_blog_init', array('blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors )); |
164 | $blogname = $filtered_results['blogname']; |
165 | $blog_title = $filtered_results['blog_title']; |
166 | $errors = $filtered_results['errors']; |
167 |
|
168 | echo '<h2>' . sprintf( __( 'Get <em>another</em> %s site in seconds' ), $current_site->site_name ) . '</h2>'; |
169 |
|
170 | if ( $errors->get_error_code() ) { |
171 | echo '<p>' . __( 'There was a problem, please correct the form below and try again.' ) . '</p>'; |
172 | } |