• Resolved Duke

    (@dukessa)


    Hello! Love the plugin, so thank you!!!

    One issue: why did you set the subdomain to contain letters as mandatory??
    Subdomains can be just numbers (eg. 2019.site.com)

    I’ll use a search and replace to fix this, but I think you should remove the limitation.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Never Settle

    (@neversettle)

    Hi @dukessa – thanks for the kind words and feedback!

    We use WP’s built-in wpmu_validate_blog_signup() function to validate subdomains, and that’s actually what makes letters mandatory – we didn’t decide to make it that way. We’ve discussed changing the validation to not use that function (have the same rules as when an admin creates a site rather than when a new user creates a site), so we’ll take your feedback into consideration on that point. Thanks!

    Thread Starter Duke

    (@dukessa)

    I figured. The rest of the functions seems solid, it’s just that part

    // all numeric?
        if ( preg_match( '/^[0-9]*$/', $blogname ) ) {
            $errors->add( 'blogname', __( 'Sorry, site names must have letters too!' ) );
        }

    and honestly this part too is unnecesary (min lenght = 1 should be enough.. why 4?!)

    $minimum_site_name_length = apply_filters( 'minimum_site_name_length', 4 );
        if ( strlen( $blogname ) < $minimum_site_name_length ) {
            /* translators: %s: minimum site name length */
            $errors->add( 'blogname', sprintf( _n( 'Site name must be at least %s character.', 'Site name must be at least %s characters.', $minimum_site_name_length ), number_format_i18n( $minimum_site_name_length ) ) );
        }

    that you could remove, from a custom function.

    I need to clone a few more sites soon, do you think this could be implemented relateively soon?
    Thank you for taking it into consideration!

    • This reply was modified 5 years, 2 months ago by Duke.
    • This reply was modified 5 years, 2 months ago by Duke.
    • This reply was modified 5 years, 2 months ago by Duke.
    Thread Starter Duke

    (@dukessa)

    Fantastic!!! ??
    Thank you guys!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why are letters mandatory in subdomain?!’ is closed to new replies.