[wp-trac] [WordPress Trac] #42993: WordPress Multisite: Allow for different ports
WordPress Trac
noreply at wordpress.org
Wed Jan 3 11:24:50 UTC 2018
#42993: WordPress Multisite: Allow for different ports
--------------------------------+------------------------------
Reporter: Blackbam | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------------+------------------------------
Changes (by enrico.sorcinelli):
* keywords: needs-patch => has-patch
* type: feature request => enhancement
Comment:
I was opening a similiar ticket for a patch I made for this.
The proposal patch adds `allowed_multisite_ports` new filter that allows
to define differents ports in Multisite installs other than `80` and
`443`. For example:
{{{
add_filter( 'allowed_multisite_ports', function( $ports ) {
$ports[] = ':8000';
return $ports;
} );
}}}
I thought it was better to explicitly add differents ports instead of
allow differents ports by default (or by defining constant like `define(
MULTISITE_ALLOW_DIFFERENT_PORTS, true )`).
PS: Currently I used filter for `sanitize_user()` (used in
`wpmu_create_blog()`) in order to allow ports in domain string, even if
the best way would be to add a `sanitize_domain()` dedicated function
since the first one allows also underscores.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42993#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list