Uma área de pesquisa sobre o WordPress para devs e autores do tema



flush_rewrite_rules ›

Desde3.0.0
Obsoleton/a
flush_rewrite_rules ( $hard = true )
Parâmetros:
  • (bool) $hard Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard).
    Required: No
    Padrão: true
Definido em:
Codex:

Remove rewrite rules and then recreate rewrite rules.



Fonte

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

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