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 1459
$title = apply_filters( 'wp_title', $title, $sep, $seplocation );
Where the hook is used in WordPress
wp-includes/default-filters.php 155
add_filter( $filter, 'wptexturize' );
wp-includes/default-filters.php 156
add_filter( $filter, 'convert_chars' );
wp-includes/default-filters.php 157
add_filter( $filter, 'esc_html' );
wp-includes/default-filters.php 162
add_filter( $filter, 'capital_P_dangit', 11 );