Networks and Sites: Trim site domain when creating a new site on Add New Site screen before further validation.
Props dharmin16, jeremyfelt, aubreypwd. Fixes #44808. Built from https://develop.svn.wordpress.org/trunk@45804 git-svn-id: http://core.svn.wordpress.org/trunk@45615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d85ba82d8e
commit
98ffc642a9
|
@ -42,6 +42,8 @@ if ( isset( $_REQUEST['action'] ) && 'add-site' == $_REQUEST['action'] ) {
|
||||||
|
|
||||||
$blog = $_POST['blog'];
|
$blog = $_POST['blog'];
|
||||||
$domain = '';
|
$domain = '';
|
||||||
|
|
||||||
|
$blog['domain'] = trim( $blog['domain'] );
|
||||||
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) {
|
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) {
|
||||||
$domain = strtolower( $blog['domain'] );
|
$domain = strtolower( $blog['domain'] );
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45803';
|
$wp_version = '5.3-alpha-45804';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue