(permastructname)_rewrite_rules хук-фильтрWP 3.1.0

Filters rewrite rules used for individual permastructs.

The dynamic portion of the hook name, $permastructname, refers to the name of the registered permastruct.

Possible hook names include:

Использование

add_filter( '(permastructname)_rewrite_rules', 'wp_kama_permastructname_rewrite_rules_filter' );

/**
 * Function for `(permastructname)_rewrite_rules` filter-hook.
 * 
 * @param string[] $rules Array of rewrite rules generated for the current permastruct, keyed by their regex pattern.
 *
 * @return string[]
 */
function wp_kama_permastructname_rewrite_rules_filter( $rules ){

	// filter...
	return $rules;
}
$rules(string[])
Array of rewrite rules generated for the current permastruct, keyed by their regex pattern.

Список изменений

С версии 3.1.0 Введена.

Где вызывается хук

WP_Rewrite::rewrite_rules()
(permastructname)_rewrite_rules
wp-includes/class-wp-rewrite.php 1432
$rules = apply_filters( "{$permastructname}_rewrite_rules", $rules );

Где используется хук в WordPress

Использование не найдено.