[wp-trac] [WordPress Trac] #37446: Introduce a filter for `self_admin_url()`
WordPress Trac
noreply at wordpress.org
Fri Jul 14 22:58:03 UTC 2017
#37446: Introduce a filter for `self_admin_url()`
--------------------------------------+------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.9
Component: Administration | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: multisite
--------------------------------------+------------------------
Changes (by flixos90):
* keywords: has-patch => has-patch has-unit-tests
* owner: => flixos90
* status: new => assigned
* milestone: Future Release => 4.9
Comment:
In [attachment:37446.3.diff] I added a few unit tests for
`self_admin_url()`.
It's currently not possible to test the function further without hacking
''a lot'', since there is no way to influence function outcomes from e.g.
`is_network_admin()`, since `WP_Screen` is final and cannot be mocked. The
few tests that are there now at least perform the most basic checks and
ensure the filter works.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37446#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list