WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/07/2017 01:14:36 PM (4 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r40371 r40391  
    577577    if ( in_array( $blogname, $illegal_names ) )
    578578        $errors->add('blogname',  __( 'That name is not allowed.' ) );
     579
     580    if ( strlen( $blogname ) < 4 ) {
     581        $errors->add('blogname',  __( 'Site name must be at least 4 characters.' ) );
     582    }
    579583
    580584    // do not allow users to create a blog that conflicts with a page on the main blog.
Note: See TracChangeset for help on using the changeset viewer.