WordPress.org

Make WordPress Core

Changeset 6442


Ignore:
Timestamp:
12/21/07 01:28:48 (9 years ago)
Author:
ryan
Message:

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

Location:
branches/2.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/wp-admin/admin.php

    r6113 r6442  
    11<?php 
     2define('WP_ADMIN', TRUE); 
     3 
    24if ( defined('ABSPATH') ) 
    35    require_once( ABSPATH . 'wp-config.php'); 
  • branches/2.3/wp-includes/query.php

    r6253 r6442  
    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.