Make WordPress Core


Ignore:
Timestamp:
03/17/2017 02:35:08 PM (8 years ago)
Author:
flixos90
Message:

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.

File:
1 edited

Legend:

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

    r39920 r40295  
    576576    if ( in_array( $blogname, $illegal_names ) )
    577577        $errors->add('blogname',  __( 'That name is not allowed.' ) );
    578 
    579     if ( strlen( $blogname ) < 4 && !is_super_admin() )
    580         $errors->add('blogname',  __( 'Site name must be at least 4 characters.' ) );
    581578
    582579    // 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.