mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
don't use both /blog & /index.php on main site permalinks, see #13106
git-svn-id: http://svn.automattic.com/wordpress/trunk@14733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8f74fa03a4
commit
8898f513b2
@ -86,8 +86,13 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
|
||||
|
||||
if ( isset( $_POST['permalink_structure'] ) ) {
|
||||
$permalink_structure = $_POST['permalink_structure'];
|
||||
if ( ! empty( $permalink_structure ) )
|
||||
$permalink_structure = $blog_prefix . preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) );
|
||||
if ( ! empty( $permalink_structure ) ) {
|
||||
$permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) );
|
||||
if ( $prefix && $blog_prefix )
|
||||
$permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure );
|
||||
else
|
||||
$permalink_structure = $blog_prefix . $permalink_structure;
|
||||
}
|
||||
$wp_rewrite->set_permalink_structure( $permalink_structure );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user