Make WordPress Core

Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#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)

is_admin-FIX.diff​ (1.5 KB ) - added by markjaquith 21 years ago.
Fix for WP 2.0 SVN

Download all attachments as: .zip

Change History (10)

#1 @skeltoac
21 years ago

Sebbi, are you testing is_admin() during plugin load, before is_*() are ready?

#2 @markjaquith
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?

#3 @markjaquith
21 years ago

  • Resolution → worksforme
  • Status new → closed

#4 @markjaquith
21 years ago

  • Milestone → 2.0
  • Resolution worksforme
  • Status closed → reopened
  • Version 1.5.2 → 2.0

@markjaquith
21 years ago

Fix for WP 2.0 SVN

#5 @markjaquith
21 years ago

  • Keywords bg|2nd-opinion bg|has-patch added
  • Owner changed from anonymous to markjaquith
  • Status reopened → new

#6 @markjaquith
21 years ago

  • Status new → assigned

#7 @markjaquith
21 years ago

  • Keywords bg|commit added; bg|2nd-opinion removed

#8 @ryan
21 years ago

  • Resolution → fixed
  • Status assigned → closed

(In [3286]) Fix is_admin() for situations where the query is not run. fixes #1741

#9 @(none)
20 years ago

  • Milestone 2.0

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.