[wp-trac] [WordPress Trac] #21077: Add support for custom ports in multisite site addresses
WordPress Trac
noreply at wordpress.org
Wed Mar 30 13:32:41 UTC 2022
#21077: Add support for custom ports in multisite site addresses
----------------------------------------+-----------------------------
Reporter: djzone | Owner: (none)
Type: enhancement | Status: reopened
Priority: normal | Milestone: Future Release
Component: Bootstrap/Load | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-unit-tests has-patch | Focuses: multisite
----------------------------------------+-----------------------------
Comment (by spacedmonkey):
I spent another couple of hours hacking on this problem, still finding
issues. The issue, as I see, it where to store the custom port. If you
store it as part of a domain, then that makes issues all over core, when
domain is no longer domain but domain + port. I had to make lots of
changes to get multisite to even bootstrap. The best place to store port
number is in site ( blog ) meta. This keep the port number close to the
site in meta but does not break anything.
I prototyped how this might work in
[https://gist.github.com/spacedmonkey/bf9f9cacb4d3aa8e99c1faaa4e51a447
this] sunrise.php dropin.
What made it hard to test, was the lack of this filter.
{{{#!php
$allowed_ports = apply_filters( 'allowed_multisite_ports', array( ':80',
':443' ) );
}}}
To help third parties be able to work out their own solution for this, I
recommend a new ticket to add this filter. That way this functionality is
not blocked while we work on another solution.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21077#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list