mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
Move rewrite and permalink functions into WP_Rewrite class.
git-svn-id: https://develop.svn.wordpress.org/trunk@1908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -490,7 +490,7 @@ function extract_from_markers($filename, $marker) {
|
||||
}
|
||||
|
||||
function save_mod_rewrite_rules() {
|
||||
global $is_apache;
|
||||
global $is_apache, $wp_rewrite;
|
||||
$home = get_settings('home');
|
||||
if ( $home != '' && $home != get_settings('siteurl') ) {
|
||||
$home_path = parse_url($home);
|
||||
@@ -506,15 +506,13 @@ function save_mod_rewrite_rules() {
|
||||
else
|
||||
$writable = false;
|
||||
|
||||
$permalink_structure = get_settings('permalink_structure');
|
||||
|
||||
if ( strstr($permalink_structure, 'index.php') ) // If they're using
|
||||
if ($wp_rewrite->using_index_permalinks())
|
||||
$usingpi = true;
|
||||
else
|
||||
$usingpi = false;
|
||||
|
||||
if ( $writable && !$usingpi && $is_apache ) {
|
||||
$rules = explode("\n", mod_rewrite_rules($permalink_structure));
|
||||
$rules = explode("\n", $wp_rewrite->mod_rewrite_rules());
|
||||
insert_with_markers($home_path.'.htaccess', 'WordPress', $rules);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user