From 20380fb8b6fe8e7ed843e35aa719d7e07219cb89 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 30 Dec 2010 21:10:45 +0000 Subject: [PATCH] Show correct title for static page home. Props aaroncampbell, greuben, SergeyBiryukov. fixes #16041 git-svn-id: https://develop.svn.wordpress.org/trunk@17187 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/general-template.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 6c07f83da1..19194f2f1c 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -620,7 +620,6 @@ function wp_title($sep = '»', $display = true, $seplocation = '') { * Display or retrieve page title for post. * * This is optimized for single.php template file for displaying the post title. - * Only useful for posts, does not support pages for example. * * It does not support placing the separator after the title, but by leaving the * prefix parameter empty, you can set the title separator manually. The prefix @@ -634,12 +633,7 @@ function wp_title($sep = '»', $display = true, $seplocation = '') { * @return string|null Title when retrieving, null when displaying or failure. */ function single_post_title($prefix = '', $display = true) { - global $post; - - if ( ! $post ) - $_post = get_queried_object(); - else - $_post = $post; + $_post = get_queried_object(); if ( !isset($_post->post_title) ) return;