mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Correctly handle PATHINFO CPTs and CTs that specify with_front=false. fixes #16807 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@17518 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -987,6 +987,8 @@ function register_post_type($post_type, $args = array()) {
|
||||
$archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive;
|
||||
if ( $args->rewrite['with_front'] )
|
||||
$archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug;
|
||||
else
|
||||
$archive_slug = $wp_rewrite->root . $archive_slug;
|
||||
|
||||
$wp_rewrite->add_rule( "{$archive_slug}/?$", "index.php?post_type=$post_type", 'top' );
|
||||
if ( $args->rewrite['feeds'] && $wp_rewrite->feeds ) {
|
||||
|
||||
Reference in New Issue
Block a user