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

Filters rewrite rules used for date archives.

Likely date archives would include /yyyy/, /yyyy/mm/, and /yyyy/mm/dd/.

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

add_filter( 'date_rewrite_rules', 'wp_kama_date_rewrite_rules_filter' );

/**
 * Function for `date_rewrite_rules` filter-hook.
 * 
 * @param string[] $date_rewrite Array of rewrite rules for date archives, keyed by their regex pattern.
 *
 * @return string[]
 */
function wp_kama_date_rewrite_rules_filter( $date_rewrite ){

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

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

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

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

WP_Rewrite::rewrite_rules()
date_rewrite_rules
wp-includes/class-wp-rewrite.php 1324
$date_rewrite = apply_filters( 'date_rewrite_rules', $date_rewrite );

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

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