wp_title_parts
Filters the parts of the page title.
Использование
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.
Список изменений
С версии 4.0.0 | Введена. |
Где вызывается хук
wp_title_parts
wp-includes/general-template.php 1439
$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );