WordPress.org

Make WordPress Core

Ticket #11449: 11449.patch

File 11449.patch, 826 bytes (added by prettyboymp, 8 years ago)
  • wp-includes/taxonomy.php

     
    185185                        $args['rewrite'] = array();
    186186                if ( !isset($args['rewrite']['slug']) )
    187187                        $args['rewrite']['slug'] = sanitize_title_with_dashes($taxonomy);
     188                if ( !isset($args['rewrite']['with_front']) )
     189                        $args['rewrite']['with_front'] = true;
    188190                $wp_rewrite->add_rewrite_tag("%$taxonomy%", '([^/]+)', $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=$term");
    189                 $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%");
     191                $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front']);
    190192        }
    191193
    192194        $args['name'] = $taxonomy;