mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Multisite: Partially revert [40295].
[40295] removed the restriction of a minimum amount of characters for new site names, which could cause unexpected behavior. That changeset is reverted here with the exception of the removal of the `is_super_admin()` check, which can safely be omitted. A new filter for the minimum site name length will be introduced later to be able to modify that behavior. See #39676, #37616. Built from https://develop.svn.wordpress.org/trunk@40391 git-svn-id: http://core.svn.wordpress.org/trunk@40298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
00e8704288
commit
ce6153d52a
@ -577,6 +577,10 @@ 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 ) {
|
||||
$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-40390';
|
||||
$wp_version = '4.8-alpha-40391';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user