Ticket #30501: 30501.patch
File 30501.patch, 906 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/rewrite.php
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 2047 public function flush_rules($hard = true) { 2048 2049 static $do_hard_later; 2050 2048 2051 // Prevent this action from running before everyone has registered their rewrites 2049 if ( ! did_action( 'wp_loaded' ) ) { 2052 if ( ! did_action( 'wp_loaded' ) ) { 2053 2050 2054 add_action( 'wp_loaded', array( $this, 'flush_rules' ) ); 2051 return; 2055 $do_hard_later = $hard; 2056 2057 return; 2058 2059 } elseif ( isset( $do_hard_later ) && doing_action( 'wp_loaded' ) ) { 2060 2061 $hard = $do_hard_later; 2062 $do_hard_later = null; 2063 2052 2064 } 2053 2065 2054 2066 delete_option('rewrite_rules');