document_title
Filter HookDescription
Filters the document title.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1294 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$title
|
Document title. |
Usage Examples
Basic Usage
<?php
// Hook into document_title
add_filter('document_title', 'my_custom_filter', 10, 1);
function my_custom_filter($title) {
// Your custom filtering logic here
return $title;
}
Source Code Context
wp-includes/general-template.php:1294
- How this hook is used in WordPress core
<?php
1289 *
1290 * @since 5.8.0
1291 *
1292 * @param string $title Document title.
1293 */
1294 $title = apply_filters( 'document_title', $title );
1295
1296 return $title;
1297 }
1298
1299 /**
PHP Documentation
<?php
/**
* Filters the document title.
*
* @since 5.8.0
*
* @param string $title Document title.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.