wp_title
Filters the text of the page title.
Usage
add_filter( 'wp_title', 'wp_kama_title_filter', 10, 3 );
/**
* Function for `wp_title` filter-hook.
*
* @param string $title Page title.
* @param string $sep Title separator.
* @param string $seplocation Location of the separator (either 'left' or 'right').
*
* @return string
*/
function wp_kama_title_filter( $title, $sep, $seplocation ){
// filter...
return $title;
}
- $title(string)
- Page title.
- $sep(string)
- Title separator.
- $seplocation(string)
- Location of the separator (either 'left' or 'right').
Changelog
| Since 2.0.0 | Introduced. |
Where the hook is called
wp_title
wp-includes/general-template.php 1468
$title = apply_filters( 'wp_title', $title, $sep, $seplocation );
Where the hook is used in WordPress
wp-includes/default-filters.php 164
add_filter( $filter, 'wptexturize' );
wp-includes/default-filters.php 165
add_filter( $filter, 'convert_chars' );
wp-includes/default-filters.php 166
add_filter( $filter, 'esc_html' );
wp-includes/default-filters.php 171
add_filter( $filter, 'capital_P_dangit', 11 );