pre_get_document_title WordPress Filter Hook
The pre_get_document_title hook gives developers the ability to change the document title that is generated by WordPress. This can be useful for making sure that the title accurately reflects the content of the page.
apply_filters( 'pre_get_document_title', string $title ) #
Filters the document title before it is generated.
Description
Passing a non-empty value will short-circuit wp_get_document_title(), returning that value instead.
Parameters
- $title
(string)The document title. Default empty string.
Source
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |