Ticket #30501: rewrite-wp-loaded.patch
File rewrite-wp-loaded.patch, 678 bytes (added by , 10 years ago) |
---|
-
wp-includes/rewrite.php
2041 2041 * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). 2042 2042 */ 2043 2043 public function flush_rules($hard = true) { 2044 // Prevent this action from running before everyone has registered their rewrites 2045 if ( ! did_action( 'wp_loaded' ) ) { 2046 add_action( 'wp_loaded', array( $this, 'flush_rules' ) ); 2047 return; 2048 } 2049 2044 2050 delete_option('rewrite_rules'); 2045 2051 $this->wp_rewrite_rules(); 2046 2052 /**