Twenty Twelve: better comment block for twentytwelve_wp_title() and set passed arguments to empty strings for compatibility with plugins or child themes that might override wp_title() before this filter runs.

See #21264.


git-svn-id: https://develop.svn.wordpress.org/trunk@21394 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2012-08-01 16:45:12 +00:00
parent f51441f9a1
commit 2a7834f801
1 changed files with 5 additions and 1 deletions

View File

@ -138,8 +138,12 @@ add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );
* for output in head of document, based on current view.
*
* @since Twenty Twelve 1.0
*
* @param string $title Default title text for current view.
* @param string $sep Optional separator.
* @return string Filtered title.
*/
function twentytwelve_wp_title( $title, $sep ) {
function twentytwelve_wp_title( $title = '', $sep = '' ) {
global $paged, $page;
if ( is_feed() )