wp_title_parts
Filters the parts of the page title.
Usage
add_filter( 'wp_title_parts', 'wp_kama_title_parts_filter' ); /** * Function for `wp_title_parts` filter-hook. * * @param string[] $title_array Array of parts of the page title. * * @return string[] */ function wp_kama_title_parts_filter( $title_array ){ // filter... return $title_array; }
- $title_array(string[])
- Array of parts of the page title.
Changelog
Since 4.0.0 | Introduced. |
Where the hook is called
wp_title_parts
wp-includes/general-template.php 1440
$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );