Make WordPress Core


Ignore:
Timestamp:
03/27/2008 06:30:20 AM (17 years ago)
Author:
ryan
Message:

Allow register_taxonomy() to be called before init for back compat with impatient plugins.

File:
1 edited

Legend:

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

    r7526 r7545  
    159159    $args = wp_parse_args($args, $defaults);
    160160
    161     if ( false !== $args['query_var'] ) {
     161    if ( false !== $args['query_var'] && !empty($wp) ) {
    162162        if ( empty($args['query_var']) )
    163163            $args['query_var'] = $taxonomy;
     
    166166    }
    167167
    168     if ( false !== $args['rewrite'] ) {
     168    if ( false !== $args['rewrite'] && !empty($wp_rewrite) ) {
    169169        if ( !is_array($args['rewrite']) )
    170170            $args['rewrite'] = array();
Note: See TracChangeset for help on using the changeset viewer.