WordPress.org

Make WordPress Core

Ticket #9824: 9824.3.patch

File 9824.3.patch, 778 bytes (added by SergeyBiryukov, 9 years ago)

Added specific check for Multisite.

  • wp-includes/rewrite.php

     
    19071907
    19081908                $this->use_trailing_slashes = ( '/' == substr($this->permalink_structure, -1, 1) );
    19091909
    1910                 $this->use_verbose_page_rules = (bool) preg_match( "#^/%(postname|category|tag|author)%#", $this->permalink_structure );
     1910                $clean_structure = str_replace( '/index.php', '', $this->permalink_structure );
     1911                if ( is_multisite() && !is_subdomain_install() && is_main_site() )
     1912                        $clean_structure = str_replace( '/blog', '', $clean_structure );
     1913                $this->use_verbose_page_rules = (bool) preg_match( "#^/%(postname|category|tag|author)%#", $clean_structure );
    19111914        }
    19121915
    19131916        /**