get_the_archive_title хук-фильтрWP 4.1.0

Filters the archive title.

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

add_filter( 'get_the_archive_title', 'wp_kama_get_the_archive_title_filter', 10, 3 );

/**
 * Function for `get_the_archive_title` filter-hook.
 * 
 * @param string $title          Archive title to be displayed.
 * @param string $original_title Archive title without prefix.
 * @param string $prefix         Archive title prefix.
 *
 * @return string
 */
function wp_kama_get_the_archive_title_filter( $title, $original_title, $prefix ){

	// filter...
	return $title;
}
$title(строка)
Archive title to be displayed.
$original_title(строка)
Archive title without prefix.
$prefix(строка)
Archive title prefix.

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

С версии 4.1.0 Введена.
С версии 5.5.0 Added the $prefix and $original_title parameters.

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

get_the_archive_title()
get_the_archive_title
wp-includes/general-template.php 1781
return apply_filters( 'get_the_archive_title', $title, $original_title, $prefix );

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

wp-includes/blocks/query-title.php 34
add_filter( 'get_the_archive_title', $filter_title, 10, 2 );
wp-includes/blocks/query-title.php 36
remove_filter( 'get_the_archive_title', $filter_title, 10, 2 );