Multisite: Remove restriction of minimum site name length in `wpmu_validate_blog_signup()`.
It is sometimes desirable to support shorter site names than 4 characters, therefore that restriction should be removed. It is still possible to manually enforce it by using the `wpmu_validate_blog_signup` filter. As a result of this change, another `is_super_admin()` call gets removed which affects the ongoing efforts of working on a network-wide role system. Props milindmore22. Fixes #39676. See #37616. Built from https://develop.svn.wordpress.org/trunk@40295 git-svn-id: http://core.svn.wordpress.org/trunk@40202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8e71ca0f94
commit
2295ed8031
|
@ -576,9 +576,6 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
|
|||
if ( in_array( $blogname, $illegal_names ) )
|
||||
$errors->add('blogname', __( 'That name is not allowed.' ) );
|
||||
|
||||
if ( strlen( $blogname ) < 4 && !is_super_admin() )
|
||||
$errors->add('blogname', __( 'Site name must be at least 4 characters.' ) );
|
||||
|
||||
// do not allow users to create a blog 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.' ) );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-40294';
|
||||
$wp_version = '4.8-alpha-40295';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue