[wp-trac] [WordPress Trac] #47415: is_network_admin() is not checking if the context install is a multisite - documentation improvement
WordPress Trac
noreply at wordpress.org
Tue May 28 06:57:08 UTC 2019
#47415: is_network_admin() is not checking if the context install is a multisite -
documentation improvement
--------------------------------+-----------------------------
Reporter: svovaf | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version:
Severity: minor | Keywords:
Focuses: docs, multisite |
--------------------------------+-----------------------------
The multisite-related function `is_network_admin()` will return `true`
when visiting `/wp-admin/network/*` URLs regardless if the site is regular
or a multisite network. That behavior is confusing and unexpected, and in
some edge-cases, can lead to bugs (yes, we were those lucky ones).
My suggestion is to simply add a comment to the documentation of the
function making it clear that it:
> ''Does not check if the site is a multisite network; Use
`is_multisite()` for checking if the site is a multisite network or not.''
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47415>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list