WordPress.org

Make WordPress Core

Ticket #21096: is_front_page_filter.diff

File is_front_page_filter.diff, 652 bytes (added by CoenJacobs, 12 months ago)

Basic filter in place

  • wp-includes/query.php

     
    32833283        function is_front_page() { 
    32843284                // most likely case 
    32853285                if ( 'posts' == get_option( 'show_on_front') && $this->is_home() ) 
    3286                         return true; 
     3286                        $return = true; 
    32873287                elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $this->is_page( get_option( 'page_on_front' ) ) ) 
    3288                         return true; 
     3288                        $return = true; 
    32893289                else 
    3290                         return false; 
     3290                        $return = false; 
     3291 
     3292                return apply_filters( 'is_front_page', $return ); 
    32913293        } 
    32923294 
    32933295        /**