WordPress.org

Make WordPress Core

Ticket #39676: 39676.diff

File 39676.diff, 909 bytes (added by milindmore22, 2 years ago)

removed entire clause as we can use the filter wpmu_validate_blog_signup fileter

  • src/wp-includes/ms-functions.php

    diff --git src/wp-includes/ms-functions.php src/wp-includes/ms-functions.php
    index b2b37d5..d1ebe8d 100644
    function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) { 
    576576        if ( in_array( $blogname, $illegal_names ) )
    577577                $errors->add('blogname',  __( 'That name is not allowed.' ) );
    578578
    579         if ( strlen( $blogname ) < 4 && !is_super_admin() )
    580                 $errors->add('blogname',  __( 'Site name must be at least 4 characters.' ) );
    581 
    582579        // do not allow users to create a blog that conflicts with a page on the main blog.
    583580        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 ) ) )
    584581                $errors->add( 'blogname', __( 'Sorry, you may not use that site name.' ) );