pre_get_document_title хук-фильтрWP 4.4.0

Filters the document title before it is generated.

Passing a non-empty value will short-circuit wp_get_document_title(), returning that value instead.

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

add_filter( 'pre_get_document_title', 'wp_kama_pre_get_document_title_filter' );

/**
 * Function for `pre_get_document_title` filter-hook.
 * 
 * @param string $title The document title.
 *
 * @return string
 */
function wp_kama_pre_get_document_title_filter( $title ){

	// filter...
	return $title;
}
$title(строка)
The document title.
По умолчанию: empty string

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

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

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

wp_get_document_title()
pre_get_document_title
wp-includes/general-template.php 1173
$title = apply_filters( 'pre_get_document_title', '' );

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

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