WordPress.org

Make WordPress Core

Ticket #16626: 16626.diff

File 16626.diff, 796 bytes (added by scribu, 3 years ago)
  • wp-includes/post.php

     
    985985 
    986986                if ( $args->has_archive ) { 
    987987                        $archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive; 
     988                        if ( $args->rewrite['with_front'] ) 
     989                                $archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug; 
     990 
    988991                        $wp_rewrite->add_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' ); 
    989992                        if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) { 
    990993                                $feeds = '(' . trim( implode( '|', $wp_rewrite->feeds ) ) . ')'; 
     
    52365239} 
    52375240add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' ); 
    52385241 
    5239 ?> 
    5240  No newline at end of file 
     5242?>