Add documentation for the new flush_rewrite_rules_hard filter. fixes #23491.
Built from https://develop.svn.wordpress.org/trunk@25464 git-svn-id: http://core.svn.wordpress.org/trunk@25385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7439445462
commit
205a4d583d
|
@ -1893,6 +1893,14 @@ class WP_Rewrite {
|
||||||
function flush_rules($hard = true) {
|
function flush_rules($hard = true) {
|
||||||
delete_option('rewrite_rules');
|
delete_option('rewrite_rules');
|
||||||
$this->wp_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 ) )
|
if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) )
|
||||||
return;
|
return;
|
||||||
if ( function_exists( 'save_mod_rewrite_rules' ) )
|
if ( function_exists( 'save_mod_rewrite_rules' ) )
|
||||||
|
|
Loading…
Reference in New Issue