Make WordPress Core


Ignore:
Timestamp:
12/19/2007 05:56:16 PM (14 years ago)
Author:
ryan
Message:

Better is_admin() check from filosofo and pishmishy. fixes #5487

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r6397 r6412  
    3333
    3434function is_admin () {
    35     global $wp_query;
    36 
    37     return ($wp_query->is_admin || (stripos($_SERVER['REQUEST_URI'], 'wp-admin/') !== false));
     35    if ( defined('WP_ADMIN') )
     36        return WP_ADMIN;
     37    return false;
    3838}
    3939
Note: See TracChangeset for help on using the changeset viewer.