flush_rewrite_rules() – Remove rewrite rules and then recreate rewrite rules.

You appear to be a bot. Output may be restricted

Description

Removes rewrite rules and then recreate rewrite rules.

Usage

flush_rewrite_rules( $hard );

Parameters

$hard
( bool ) optional default: 1 – Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).

Returns

void

Source

File name: wordpress/wp-includes/rewrite.php
Lines:

1 to 7 of 7
function flush_rewrite_rules( $hard = true ) {
  global $wp_rewrite;

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

 View on GitHub View on Trac