Ticket #28517: 28517-without-tests.patch
File 28517-without-tests.patch, 1.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/rewrite.php
2043 2043 * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). 2044 2044 */ 2045 2045 public function flush_rules($hard = true) { 2046 delete_option( 'rewrite_rules');2046 delete_option( 'rewrite_rules' ); 2047 2047 $this->wp_rewrite_rules(); 2048 2048 /** 2049 2049 * Filter whether a "hard" rewrite rule flush should be performed when requested. … … 2054 2054 * 2055 2055 * @param bool $hard Whether to flush rewrite rules "hard". Default true. 2056 2056 */ 2057 if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) ) {2057 if ( ! $hard && ! apply_filters( 'flush_rewrite_rules_hard', false ) ) { 2058 2058 return; 2059 2059 } 2060 if ( function_exists( 'save_mod_rewrite_rules' ) ) 2060 if ( function_exists( 'save_mod_rewrite_rules' ) ) { 2061 2061 save_mod_rewrite_rules(); 2062 if ( function_exists( 'iis7_save_url_rewrite_rules' ) ) 2062 } 2063 if ( function_exists( 'iis7_save_url_rewrite_rules' ) ) { 2063 2064 iis7_save_url_rewrite_rules(); 2065 } 2064 2066 } 2065 2067 2066 2068 /**