From b307e1a23f0aee6e31badde34644aefce676fa7a Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 16 Sep 2013 21:59:27 +0000 Subject: [PATCH] Add documentation for the new flush_rewrite_rules_hard filter. fixes #23491. git-svn-id: https://develop.svn.wordpress.org/trunk@25464 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/rewrite.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wp-includes/rewrite.php b/src/wp-includes/rewrite.php index 782e664b81..1c2b747e45 100644 --- a/src/wp-includes/rewrite.php +++ b/src/wp-includes/rewrite.php @@ -1893,6 +1893,14 @@ class WP_Rewrite { function flush_rules($hard = true) { delete_option('rewrite_rules'); $this->wp_rewrite_rules(); + /** + * Filter whether a "hard" rewrite rule flush should be performed when requested. + * + * A "hard" flush updates .htaccess (Apache) or web.config (IIS). + * + * @since 3.7.0 + * @param bool $hard Defaults to true. + */ if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) ) return; if ( function_exists( 'save_mod_rewrite_rules' ) )