mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Show correct title for static page home. Props aaroncampbell, greuben, SergeyBiryukov. fixes #16041
git-svn-id: http://svn.automattic.com/wordpress/trunk@17187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
607c8bf12a
commit
4e17a731ff
@ -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;
|
||||
|
||||
if ( !isset($_post->post_title) )
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user