#1741 closed defect (bug) (fixed)
is_admin() always returns false?
| Reported by: | Sebbi | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 2.0 |
| Severity: | trivial | Keywords: | is_admin bg|commit bg|has-patch |
| Cc: | Focuses: |
Description
I don't know why that happens, but I noticed that the is_admin()-function returns false at least in the moderation.php, maybe always?
Attachments (1)
Change History (10)
#2
@
21 years ago
I think you have to wait for the query to be run, which means that you either need to use it within a theme file, or using the template_redirect hook. "init" and "plugins_loaded" may be too early to use it. Don't take that as Gospel... but I think that's right.
Sebbi, how are you using is_admin()? In what context?
#4
@
21 years ago
- Milestone → 2.0
- Resolution worksforme
- Status closed → reopened
- Version 1.5.2 → 2.0
#5
@
21 years ago
- Keywords bg|2nd-opinion bg|has-patch added
- Owner changed from to
- Status reopened → new
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Sebbi, are you testing is_admin() during plugin load, before is_*() are ready?