WordPress.org

Make WordPress Core

Ticket #18263: tax-doin-wrong-3.patch

File tax-doin-wrong-3.patch, 661 bytes (added by WraithKenny, 3 years ago)
  • wp-includes/taxonomy.php

     
    311311                                        ); 
    312312        $args = wp_parse_args($args, $defaults); 
    313313 
     314        if ( false === $args['_builtin'] && ! empty( $wp ) && in_array( $taxonomy, array_merge( $wp->public_query_vars, $wp->private_query_vars ) ) ) 
     315                _doing_it_wrong( __FUNCTION__, __( 'You should not use a reserved term when registering a taxonomy.' ), '3.3' ); 
     316         
    314317        if ( false !== $args['query_var'] && !empty($wp) ) { 
    315318                if ( true === $args['query_var'] ) 
    316319                        $args['query_var'] = $taxonomy;