rewrite_rules filter-hookWP 1.5.0

Deprecated from version 1.5.0. It is no longer supported and can be removed in future releases. See mod_rewrite_rules.

Deprecated: 1.5.0 Use the {@see 'mod_rewrite_rules'} filter instead.

Filters the list of rewrite rules formatted for output to an .htaccess file.

Usage

add_filter( 'rewrite_rules', 'wp_kama_rewrite_rules_filter', 10, 2 );

/**
 * Function for `rewrite_rules` filter-hook.
 * 
 * @param string $rules  mod_rewrite Rewrite rules formatted for .htaccess.
 * @param        $string 
 *
 * @return string
 */
function wp_kama_rewrite_rules_filter( $rules, $string ){

	// filter...
	return $rules;
}
$rules(string)
mod_rewrite Rewrite rules formatted for .htaccess.
$string
-

Changelog

Since 1.5.0 Introduced.
Deprecated Since 1.5.0 Use the {@see 'mod_rewrite_rules'} filter instead.

Where the hook is called

WP_Rewrite::mod_rewrite_rules()
rewrite_rules
wp-includes/class-wp-rewrite.php 1588
return apply_filters_deprecated( 'rewrite_rules', array( $rules ), '1.5.0', 'mod_rewrite_rules' );

Where the hook is used in WordPress

Usage not found.