WordPress.org

Make WordPress Core

Ticket #23491: 23491.diff

File 23491.diff, 724 bytes (added by jeremyfelt, 8 years ago)

Introduces filter flush_rules_hard

  • 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 ( apply_filters( 'flush_rules_hard', $hard ) && function_exists('save_mod_rewrite_rules') )
    18961896                        save_mod_rewrite_rules();
    1897                 if ( $hard && function_exists('iis7_save_url_rewrite_rules') )
     1897                if ( apply_filters( 'flush_rules_hard', $hard ) && function_exists('iis7_save_url_rewrite_rules') )
    18981898                        iis7_save_url_rewrite_rules();
    18991899        }
    19001900