WordPress.org

Make WordPress Core

Changeset 17519


Ignore:
Timestamp:
03/10/11 04:25:40 (3 years ago)
Author:
markjaquith
Message:

Correctly handle PATHINFO CPTs and CTs that specify with_front=false. fixes #16807 for 3.1

Location:
branches/3.1/wp-includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/link-template.php

    r17228 r17519  
    848848        if ( $post_type_obj->rewrite['with_front'] ) 
    849849            $struct = $wp_rewrite->front . $struct; 
     850        else 
     851            $struct = $wp_rewrite->root . $struct; 
    850852        $link = home_url( user_trailingslashit( $struct, 'post_type_archive' ) ); 
    851853    } else { 
  • branches/3.1/wp-includes/post.php

    r17515 r17519  
    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' ); 
  • branches/3.1/wp-includes/rewrite.php

    r17226 r17519  
    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    } 
  • branches/3.1/wp-includes/version.php

    r17513 r17519  
    3030 * @global int $wp_db_version 
    3131 */ 
    32 $wp_db_version = 17510; 
     32$wp_db_version = 17516; 
    3333 
    3434/** 
Note: See TracChangeset for help on using the changeset viewer.