summaryrefslogtreecommitdiffstats
path: root/wp-includes/rewrite.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-07-02 13:44:49 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-07-02 13:44:49 +0000
commit6d572cbe19ffedb5b92d8528798c5683154bb185 (patch)
tree4cc943e8f399addf1a10c03386342110bcc9d584 /wp-includes/rewrite.php
parent034c1b3b665fa28816dfc6157d610c6d25fd54fe (diff)
WP Merge to rev 8216
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1344 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/rewrite.php')
-rw-r--r--wp-includes/rewrite.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php
index d4a5864..8a13a33 100644
--- a/wp-includes/rewrite.php
+++ b/wp-includes/rewrite.php
@@ -60,6 +60,18 @@ function add_rewrite_endpoint($name, $places) {
$wp_rewrite->add_endpoint($name, $places);
}
+/**
+ * _wp_filter_taxonomy_base() - filter the URL base for taxonomies, to remove any manually prepended /index.php/
+ * @param string $base the taxonomy base that we're going to filter
+ * @return string
+ * @author Mark Jaquith
+ */
+function _wp_filter_taxonomy_base( $base ) {
+ if ( !empty( $base ) )
+ $base = preg_replace( '|^/index\.php/|', '/', $base );
+ return $base;
+}
+
// examine a url (supposedly from this blog) and try to
// determine the post ID it represents.
function url_to_postid($url) {
@@ -981,8 +993,8 @@ class WP_Rewrite {
if ($this->using_index_permalinks()) {
$this->root = $this->index . '/';
}
- $this->category_base = get_option( 'category_base' );
- $this->tag_base = get_option( 'tag_base' );
+ $this->category_base = ( ( $this->using_index_permalinks() ) ? '/' . $this->index : '' ) . get_option( 'category_base' );
+ $this->tag_base = ( ( $this->using_index_permalinks() ) ? '/' . $this->index : '' ) . get_option( 'tag_base' );
unset($this->category_structure);
unset($this->author_structure);
unset($this->date_structure);