Make WordPress Core

Ticket #9824: 9824.5.patch

File 9824.5.patch, 983 bytes (added by SergeyBiryukov, 13 years ago)

Removed hardcoded /index.php and /blog

  • wp-includes/rewrite.php

     
    19071907                unset($this->comment_feed_structure);
    19081908                $this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
    19091909
    1910                 // Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
    1911                 if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) )
    1912                          $this->use_verbose_page_rules = true;
    1913                 else
    1914                         $this->use_verbose_page_rules = false;
     1910                $clean_structure = str_replace( '/' . $this->index, '', $this->permalink_structure );
     1911                if ( is_multisite() && !is_subdomain_install() && is_main_site() )
     1912                        $clean_structure = preg_replace( '/\/\w+/', '', $clean_structure );
     1913                $this->use_verbose_page_rules = (bool) preg_match( "#^/%(postname|category|tag|author)%#", $clean_structure );
    19151914        }
    19161915
    19171916        /**