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 |
|---|---|
| 578 | $errors->add('blogname', __( 'That name is not allowed.' ) ); |
| 579 | |
| 580 | /** |
| 581 | * Filters the minimum site name length required when validating a site signup. |
| 582 | * |
| 583 | * @since 4.8.0 |
| 584 | * |
| 585 | * @param int $length The minimum site name length. Default 4. |
| 586 | */ |
| 587 | $minimum_site_name_length = apply_filters( 'minimum_site_name_length', 4 ); |
| 588 | |
| 589 | if ( strlen( $blogname ) < $minimum_site_name_length ) { |
| 590 | /* translators: %s: minimum site name length */ |
| 591 | $errors->add( 'blogname', sprintf( _n( 'Site name must be at least %s character.', 'Site name must be at least %s characters.', $minimum_site_name_length ), number_format_i18n( $minimum_site_name_length ) ) ); |
| 592 | } |
| 593 | |
| 594 | // do not allow users to create a blog that conflicts with a page on the main blog. |
| 595 | if ( !is_subdomain_install() && $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM " . $wpdb->get_blog_prefix( $current_network->site_id ) . "posts WHERE post_type = 'page' AND post_name = %s", $blogname ) ) ) |
| 596 | $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) ); |