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

Filters rewrite rules used for author archives.

Likely author archives would include /author/author-name/, as well as pagination and feed paths for author archives.

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

add_filter( 'author_rewrite_rules', 'wp_kama_author_rewrite_rules_filter' );

/**
 * Function for `author_rewrite_rules` filter-hook.
 * 
 * @param string[] $author_rewrite Array of rewrite rules for author archives, keyed by their regex pattern.
 *
 * @return string[]
 */
function wp_kama_author_rewrite_rules_filter( $author_rewrite ){

	// filter...
	return $author_rewrite;
}
$author_rewrite(string[])
Array of rewrite rules for author archives, keyed by their regex pattern.

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

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

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

WP_Rewrite::rewrite_rules()
author_rewrite_rules
wp-includes/class-wp-rewrite.php 1384
$author_rewrite = apply_filters( 'author_rewrite_rules', $author_rewrite );

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

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