WordPress.org

Make WordPress Core

Changeset 17187


Ignore:
Timestamp:
12/30/10 21:10:45 (7 years ago)
Author:
ryan
Message:

Show correct title for static page home. Props aaroncampbell, greuben, SergeyBiryukov. fixes #16041

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r17107 r17187  
    621621 * 
    622622 * This is optimized for single.php template file for displaying the post title. 
    623  * Only useful for posts, does not support pages for example. 
    624623 * 
    625624 * It does not support placing the separator after the title, but by leaving the 
     
    635634 */ 
    636635function single_post_title($prefix = '', $display = true) { 
    637     global $post; 
    638  
    639     if ( ! $post ) 
    640         $_post = get_queried_object(); 
    641     else 
    642         $_post = $post; 
     636    $_post = get_queried_object(); 
    643637 
    644638    if ( !isset($_post->post_title) ) 
Note: See TracChangeset for help on using the changeset viewer.