[wp-trac] [WordPress Trac] #37620: Give us a bit help, with IS_ADMIN and IS_LOGIN
WordPress Trac
noreply at wordpress.org
Fri Apr 5 19:28:10 UTC 2019
#37620: Give us a bit help, with IS_ADMIN and IS_LOGIN
------------------------------------+----------------------
Reporter: tazotodua | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Login and Registration | Version:
Severity: normal | Resolution: wontfix
Keywords: | Focuses:
------------------------------------+----------------------
Changes (by desrosj):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
Hi @tazotodua,
I appreciate your enthusiasm for this request. However, I also feel that
this is not something that should be added to WordPress Core.
The `is_admin()` function is not based on the page's URL, so if the URLs
are changed by a plugin, `is_admin()` should still return `true`. Also, as
@SergeyBiryukov [https://core.trac.wordpress.org/ticket/19898#comment:25
noted on #19898], constants are not an acceptable way to check for
context. They are not filterable and are hard to verify in unit tests (see
#25669).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37620#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list