Ticket #3682: 3682.diff

File 3682.diff, 0.9 kB (added by Nazgul, 10 months ago)
  • wp-includes/query.php

    old new  
    134134        return $wp_query->is_feed; 
    135135} 
    136136 
     137/** 
     138 * is_front() - Is it the front of the site, whether blog view or a WP Page? 
     139 * 
     140 * @since 2.5 
     141 * @uses is_home 
     142 * @uses get_option 
     143 * 
     144 * @return bool True if front of site 
     145 */ 
     146function is_front () {  
     147        // most likely case  
     148        if ( 'posts' == get_option('show_on_front') && is_home() )  
     149                return true;  
     150        elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') && is_page(get_option('page_on_front')) )  
     151                return true;  
     152        else  
     153                return false;  
     154}  
     155 
     156/** 
     157 * is_home() - Is it the blog view homepage? 
     158 * 
     159 * @since 2.1 
     160 * @global object $wp_query 
     161 * 
     162 * @return bool True if blog view homepage 
     163 */ 
    137164function is_home () { 
    138165        global $wp_query; 
    139166