wpseek.com
A WordPress-centric search engine for devs and theme authors



flush_rewrite_rules › WordPress Function

Since3.0.0
Deprecatedn/a
flush_rewrite_rules ( $hard = true )
Parameters:
  • (bool) $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
    Required: No
    Default: true
Defined at:
Codex:

Removes rewrite rules and then recreate rewrite rules.



Source

function flush_rewrite_rules( $hard = true ) {
	global $wp_rewrite;

	if ( is_callable( array( $wp_rewrite, 'flush_rules' ) ) ) {
		$wp_rewrite->flush_rules( $hard );
	}
}