pre_get_document_title
Filters the document title before it is generated.
Passing a non-empty value will short-circuit wp_get_document_title(), returning that value instead.
Usage
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(string)
- The document title.
Default: empty string
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
wp-includes/general-template.php 1188
$title = apply_filters( 'pre_get_document_title', '' );