Allow unit tests to override is_*_admin()
|Reported by:||ryan||Owned by:||ryan|
Unit tests sometimes need to fake being in the user, network, or blog admin or on the front page. This is currently impossible due to the use of constants. A possible solution is to consult the current screen if it is setup and fallback to the constants otherwise. Alternatively, add filters in the is_*_admin() functions.
Change History (11)
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed