WordPress.org

Make WordPress Core

Changeset 25328


Ignore:
Timestamp:
09/10/2013 10:18:21 PM (7 years ago)
Author:
wonderboymusic
Message:

Add filter flush_rewrite_rules_hard to give devs chance to prevent writing to file when hard-flushing rewrite rules.

Props jeremyfelt, nacin.
Fixes #23491.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rewrite.php

    r25263 r25328  
    18941894        delete_option('rewrite_rules');
    18951895        $this->wp_rewrite_rules();
    1896         if ( $hard && function_exists('save_mod_rewrite_rules') )
     1896        if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) )
     1897            return;
     1898        if ( function_exists( 'save_mod_rewrite_rules' ) )
    18971899            save_mod_rewrite_rules();
    1898         if ( $hard && function_exists('iis7_save_url_rewrite_rules') )
     1900        if ( function_exists( 'iis7_save_url_rewrite_rules' ) )
    18991901            iis7_save_url_rewrite_rules();
    19001902    }
Note: See TracChangeset for help on using the changeset viewer.