wp_title

Filters the text of the page title.

Description

apply_filters( 'wp_title', (unknown) $get_the_title, (unknown) $separator, (string) $right ); 

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.
  1. $get_the_title = apply_filters( 'wp_title', $get_the_title, $separator, $right ); 
  2.  
  3. if ( !empty( $get_the_title ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wp_title callback 
  2. function filter_wp_title( $get_the_title, $separator, $right ) { 
  3. // make filter magic happen here... 
  4. return $get_the_title
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wp_title', 'filter_wp_title', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wp_title', 'filter_wp_title', 10, 3 ); 

Defined (4)

The filter is defined in the following location(s).

/lib/page.php  
  1. $title = apply_filters( 'wp_title', 
  1. $title = apply_filters( 'wp_title', 
  1. $title = apply_filters( 'wp_title', 
  1. return apply_filters( 'wp_title', $title, $separator, 'right' );