flush_rewrite_rules

Advertisement

Summery Summery

Remove rewrite rules and then recreate rewrite rules.

Syntax Syntax

flush_rewrite_rules( bool $hard = true )

Parameters Parameters

$hard

(Optional) Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard).

Default value: true

Source Source

File: wp-includes/rewrite.php

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Advertisement

Leave a Reply