Ticket #30501: 30501.3.patch
File 30501.3.patch, 976 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/rewrite.php
2044 2044 * @access public 2045 2045 * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). 2046 2046 */ 2047 public function flush_rules($hard = true) { 2047 public function flush_rules( $hard = true ) { 2048 static $do_hard_later; 2049 2048 2050 // Prevent this action from running before everyone has registered their rewrites 2049 2051 if ( ! did_action( 'wp_loaded' ) ) { 2050 2052 add_action( 'wp_loaded', array( $this, 'flush_rules' ) ); 2053 $do_hard_later = ( isset( $do_hard_later ) ) ? $do_hard_later || $hard : $hard; 2051 2054 return; 2052 2055 } 2053 2056 2057 if ( isset( $do_hard_later ) ) { 2058 $hard = $do_hard_later; 2059 unset( $do_hard_later ); 2060 } 2061 2054 2062 delete_option('rewrite_rules'); 2055 2063 $this->wp_rewrite_rules(); 2056 2064 /**