comments_rewrite_rules хук-фильтрWP 1.5.0

Filters rewrite rules used for comment feed archives.

Likely comments feed archives include /comments/feed/ and /comments/feed/atom/.

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

add_filter( 'comments_rewrite_rules', 'wp_kama_comments_rewrite_rules_filter' );

/**
 * Function for `comments_rewrite_rules` filter-hook.
 * 
 * @param string[] $comments_rewrite Array of rewrite rules for the site-wide comments feeds, keyed by their regex pattern.
 *
 * @return string[]
 */
function wp_kama_comments_rewrite_rules_filter( $comments_rewrite ){

	// filter...
	return $comments_rewrite;
}
$comments_rewrite(string[])
Array of rewrite rules for the site-wide comments feeds, keyed by their regex pattern.

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

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

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

WP_Rewrite::rewrite_rules()
comments_rewrite_rules
wp-includes/class-wp-rewrite.php 1353
$comments_rewrite = apply_filters( 'comments_rewrite_rules', $comments_rewrite );

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

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