diff --git a/lib/cleanup.php b/lib/cleanup.php index eee2d6e..708bf8e 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -80,6 +80,20 @@ function roots_language_attributes() { } add_filter('language_attributes', 'roots_language_attributes'); +/** + * Manage output of wp_title() + */ +function roots_wp_title($title) { + if (is_feed()) { + return $title; + } + + $title .= get_bloginfo('name'); + + return $title; +} +add_filter('wp_title', 'roots_wp_title', 10); + /** * Clean up output of stylesheet tags */ @@ -128,7 +142,7 @@ function roots_root_relative_url($input) { if(!is_admin() && site_url() != home_url() && stristr($input, 'wp-includes') === false) { $input = str_replace(site_url(), "", $input); } - + $output = preg_replace_callback( '!(https?://[^/|"]+)([^"]+)?!', create_function( @@ -142,7 +156,7 @@ function roots_root_relative_url($input) { ), $input ); - + // detect and correct for subdir installs if($subdir = parse_url(home_url(), PHP_URL_PATH)) { if(substr($output, 0, strlen($subdir)) == (substr($output, strlen($subdir), strlen($subdir)))) { diff --git a/templates/head.php b/templates/head.php index 561ecd5..91955d7 100644 --- a/templates/head.php +++ b/templates/head.php @@ -5,7 +5,7 @@ > - <?php wp_title(''); ?> + <?php wp_title('|', true, 'right'); ?>