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

Filters rewrite rules used for "page" post type archives.

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

add_filter( 'page_rewrite_rules', 'wp_kama_page_rewrite_rules_filter' );

/**
 * Function for `page_rewrite_rules` filter-hook.
 * 
 * @param string[] $page_rewrite Array of rewrite rules for the "page" post type, keyed by their regex pattern.
 *
 * @return string[]
 */
function wp_kama_page_rewrite_rules_filter( $page_rewrite ){

	// filter...
	return $page_rewrite;
}
$page_rewrite(string[])
Array of rewrite rules for the "page" post type, keyed by their regex pattern.

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

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

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

WP_Rewrite::rewrite_rules()
page_rewrite_rules
wp-includes/class-wp-rewrite.php 1405
$page_rewrite = apply_filters( 'page_rewrite_rules', $page_rewrite );

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

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