Make WordPress Core

Changeset 6412


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

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin.php

    r6113 r6412  
    11<?php
     2define('WP_ADMIN', TRUE);
     3
    24if ( defined('ABSPATH') )
    35    require_once( ABSPATH . 'wp-config.php');
  • 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.