flush_rewrite_rules_hard filter-hookWP 3.7.0

Filters whether a "hard" rewrite rule flush should be performed when requested.

A "hard" flush updates .htaccess (Apache) or web.config (IIS).

Usage

add_filter( 'flush_rewrite_rules_hard', 'wp_kama_flush_rewrite_rules_hard_filter' );

/**
 * Function for `flush_rewrite_rules_hard` filter-hook.
 * 
 * @param bool $hard Whether to flush rewrite rules "hard".
 *
 * @return bool
 */
function wp_kama_flush_rewrite_rules_hard_filter( $hard ){

	// filter...
	return $hard;
}
$hard(true|false)
Whether to flush rewrite rules "hard".
Default: true

Changelog

Since 3.7.0 Introduced.

Where the hook is called

WP_Rewrite::flush_rules()
flush_rewrite_rules_hard
wp-includes/class-wp-rewrite.php 1871
if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) ) {

Where the hook is used in WordPress

Usage not found.