WordPress.org

Make WordPress Core

Ticket #16807: 16807.diff

File 16807.diff, 1.1 KB (added by markjaquith, 4 years ago)
  • wp-includes/post.php

     
    987987                        $archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive; 
    988988                        if ( $args->rewrite['with_front'] ) 
    989989                                $archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug; 
     990                        else 
     991                                $archive_slug = $wp_rewrite->root . $archive_slug; 
    990992 
    991993                        $wp_rewrite->add_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' ); 
    992994                        if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) { 
  • wp-includes/rewrite.php

     
    18571857        function add_permastruct($name, $struct, $with_front = true, $ep_mask = EP_NONE) { 
    18581858                if ( $with_front ) 
    18591859                        $struct = $this->front . $struct; 
     1860                else 
     1861                        $struct = $this->root . $struct; 
    18601862                $this->extra_permastructs[$name] = array($struct, $ep_mask); 
    18611863        } 
    18621864