wp_title
Filters the text of the page title.
Использование
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(строка)
- Page title.
- $sep(строка)
- Title separator.
- $seplocation(строка)
- Location of the separator (either 'left' or 'right').
Список изменений
| С версии 2.0.0 | Введена. |
Где вызывается хук
wp_title
wp-includes/general-template.php 1464
$title = apply_filters( 'wp_title', $title, $sep, $seplocation );
Где используется хук в 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 );