Don't call is_home() before the query is run in Featured Content's pre_get_posts hook callback.

Built from https://develop.svn.wordpress.org/trunk@26189


git-svn-id: http://core.svn.wordpress.org/trunk@26097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2013-11-15 02:37:10 +00:00
parent 20e5b27731
commit 005fe51131

View File

@ -195,7 +195,7 @@ class Featured_Content {
public static function pre_get_posts( $query = false ) {
// Bail if not home, not a query, not main query.
if ( ! is_home() || ! is_a( $query, 'WP_Query' ) || ! $query->is_main_query() )
if ( ! is_a( $query, 'WP_Query' ) || ! $query->is_main_query() || ! is_home() )
return;
$page_on_front = get_option( 'page_on_front' );