Add 'wp_title_parts' filter to wp_title().
props aaroncampbell, obenland. fixes #17877. Built from https://develop.svn.wordpress.org/trunk@28669 git-svn-id: http://core.svn.wordpress.org/trunk@28487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f598eaa89b
commit
fcd8152496
|
@ -836,13 +836,20 @@ function wp_title($sep = '»', $display = true, $seplocation = '') {
|
||||||
if ( !empty($title) )
|
if ( !empty($title) )
|
||||||
$prefix = " $sep ";
|
$prefix = " $sep ";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the parts of the page title.
|
||||||
|
*
|
||||||
|
* @since 4.0.0
|
||||||
|
*
|
||||||
|
* @param array $title_array Parts of the page title.
|
||||||
|
*/
|
||||||
|
$title_array = apply_filters( 'wp_title_parts', explode( $t_sep, $title ) );
|
||||||
|
|
||||||
// Determines position of the separator and direction of the breadcrumb
|
// Determines position of the separator and direction of the breadcrumb
|
||||||
if ( 'right' == $seplocation ) { // sep on right, so reverse the order
|
if ( 'right' == $seplocation ) { // sep on right, so reverse the order
|
||||||
$title_array = explode( $t_sep, $title );
|
|
||||||
$title_array = array_reverse( $title_array );
|
$title_array = array_reverse( $title_array );
|
||||||
$title = implode( " $sep ", $title_array ) . $prefix;
|
$title = implode( " $sep ", $title_array ) . $prefix;
|
||||||
} else {
|
} else {
|
||||||
$title_array = explode( $t_sep, $title );
|
|
||||||
$title = $prefix . implode( " $sep ", $title_array );
|
$title = $prefix . implode( " $sep ", $title_array );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.0-alpha-20140604';
|
$wp_version = '4.0-alpha-20140605';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue