WordPress.org

Make WordPress Core

Changeset 17514


Ignore:
Timestamp:
03/09/2011 05:40:52 AM (9 years ago)
Author:
markjaquith
Message:

Use with_front properly when creating rules for CPT archive pages. props scribu. fixes #16626 for trunk

File:
1 edited

Legend:

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

    r17429 r17514  
    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 ) {
Note: See TracChangeset for help on using the changeset viewer.