wp_title
Filters the text of the page title.
Description
Parameters (3)
- 0. $get_the_title (unknown) =>
get_the_title( $mod['id'] ). ' '.$separator.' '
- The get the title.
- 1. $separator (unknown)
- The separator.
- 2. $right (string) =>
'right'
- The right.
Usage
- To run the hook, copy the example below.
- $get_the_title = apply_filters( 'wp_title', $get_the_title, $separator, $right );
- if ( !empty( $get_the_title ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the wp_title callback
- function filter_wp_title( $get_the_title, $separator, $right ) {
- // make filter magic happen here...
- return $get_the_title;
- };
- // add the filter
- add_filter( 'wp_title', 'filter_wp_title', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'wp_title', 'filter_wp_title', 10, 3 );
Defined (4)
The filter is defined in the following location(s).
- /lib/com/webpage.php
- $title = apply_filters( 'wp_title', get_the_title( $mod['id'] ).
- $title = apply_filters( 'wp_title', $term_obj->name.' '.$separator.' ', $separator, 'right' );
- $title = apply_filters( 'wp_title', $user_obj->display_name.' '.$separator.' ', $separator, 'right' );
- return apply_filters( 'wp_title', $title, $separator, 'right' );