[wp-trac] [WordPress Trac] #21742: Allow unit tests to override is_*_admin()
WordPress Trac
wp-trac at lists.automattic.com
Fri Aug 31 17:16:47 UTC 2012
#21742: Allow unit tests to override is_*_admin()
-------------------------+------------------------------
Reporter: ryan | Owner: ryan
Type: enhancement | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Unit Tests | Version: 3.4.1
Severity: normal | Resolution: fixed
Keywords: |
-------------------------+------------------------------
Changes (by ryan):
* owner: => ryan
* status: new => closed
* resolution: => fixed
Comment:
In [21687]:
{{{
#!CommitTicketReference repository="" revision="21687"
Introduce WP_Screen::in_admin() for determining which admin the screen is
in.
Change is_*_admin() to reference in_admin() with fallback to the
WP_*_ADMIN constants during early bootstrap. This allows unit tests and
ajax handlers to set the admin context.
fixes #21742
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21742#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list