[wp-trac] [WordPress Trac] #32928: Multisite: Allow the developer to filter the domain validation regex from /wp-admin/network/site-new.php line #41 (WP 4.2.2)
WordPress Trac
noreply at wordpress.org
Wed Jul 8 20:14:24 UTC 2015
#32928: Multisite: Allow the developer to filter the domain validation regex from
/wp-admin/network/site-new.php line #41 (WP 4.2.2)
--------------------------------+-----------------------------
Reporter: lordspace | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 4.2.2
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
I am working on a project that may have sites that are nested within
another path for example:
/faculty/
/faculty/sub-site/
/faculty/sub-site2/
etc.
Fix:
{{{
$ms_domain_validation_regex = apply_filters( 'ms_domain_validation_regex',
'|^([a-zA-Z0-9-])+$|' );
if ( preg_match( $ms_domain_validation_regex, $blog['domain'] ) ) {
$domain = strtolower( $blog['domain'] );
}
}}}
old:
{{{
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )
$domain = strtolower( $blog['domain'] );
}}}
Feel free to come up with a better name for the filter.
Related:
https://make.wordpress.org/core/2013/10/06/potential-roadmap-for-
multisite/
http://www.paulund.co.uk/wordpress-multisite-nested-paths
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32928>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list