$minimum_site_name_length =
apply_filters( 'minimum_site_name_length', 4
);
if ( strlen( $blogname ) <
$minimum_site_name_length ) { /* translators: %s: Minimum site name length. */
$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 ) ) );
} // Do not allow users to create a site that conflicts with a page on the main blog.
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 ) ) ) { $errors->
add( 'blogname',
__( 'Sorry, you may not use that site name.'
) );
} // All numeric?
if ( preg_match( '/^[0-9]*$/',
$blogname ) ) { $errors->
add( 'blogname',
__( 'Sorry, site names must have letters too!'
) );
} /**
* Filters the new site name during registration.
*
* The name is the site's subdomain or the site's subdirectory
* path depending on the network settings.
*
* @since MU (3.0.0)
*
* @param string $blogname Site name.
*/