mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00: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. git-svn-id: https://develop.svn.wordpress.org/trunk@40391 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -64,6 +64,7 @@ class Tests_Multisite_WpmuValidateBlogSignup extends WP_UnitTestCase {
|
||||
array( '12345678', 'Site names must not consist of numbers only.' ),
|
||||
array( self::$existing_blog_name, 'Site names must not collide with an existing site name.' ),
|
||||
array( self::$existing_user_login, 'Site names must not collide with an existing user login.' ),
|
||||
array( 'foo', 'Site names must at least contain 4 characters.' ),
|
||||
);
|
||||
|
||||
$illegal_names = get_site_option( 'illegal_names' );
|
||||
@@ -85,14 +86,6 @@ class Tests_Multisite_WpmuValidateBlogSignup extends WP_UnitTestCase {
|
||||
$result = wpmu_validate_blog_signup( self::$existing_user_login, 'Foo Site Title', get_userdata( self::$existing_user_id ) );
|
||||
$this->assertEmpty( $result['errors']->get_error_codes() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 39676
|
||||
*/
|
||||
public function test_validate_short_blogname() {
|
||||
$result = wpmu_validate_blog_signup( 'foo', 'Foo Site Title', get_userdata( self::$super_admin_id ) );
|
||||
$this->assertEmpty( $result['errors']->get_error_codes() );
|
||||
}
|
||||
}
|
||||
|
||||
endif;
|
||||
|
||||
Reference in New Issue
Block a user