WordPress.org

Make WordPress Core

Ticket #23491: 23491.2.diff

File 23491.2.diff, 722 bytes (added by nacin, 8 years ago)
  • src/wp-includes/rewrite.php

     
    18921892        function flush_rules($hard = true) {
    18931893                delete_option('rewrite_rules');
    18941894                $this->wp_rewrite_rules();
    1895                 if ( $hard && function_exists('save_mod_rewrite_rules') )
     1895                if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) )
     1896                        return;
     1897                if ( function_exists( 'save_mod_rewrite_rules' ) )
    18961898                        save_mod_rewrite_rules();
    1897                 if ( $hard && function_exists('iis7_save_url_rewrite_rules') )
     1899                if ( function_exists( 'iis7_save_url_rewrite_rules' ) )
    18981900                        iis7_save_url_rewrite_rules();
    18991901        }
    19001902