From c8d0070d64a21e9852082c38528ac32e94d667b8 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Mon, 18 Nov 2013 22:03:03 +0000 Subject: [PATCH] Twenty Fourteen: correct `$query` usage in `Featured_Content::pre_get_posts()`, props SergeyBiryukov, fixes #26064. git-svn-id: https://develop.svn.wordpress.org/trunk@26255 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentyfourteen/inc/featured-content.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/inc/featured-content.php b/src/wp-content/themes/twentyfourteen/inc/featured-content.php index 348abd4b45..0d0484f237 100644 --- a/src/wp-content/themes/twentyfourteen/inc/featured-content.php +++ b/src/wp-content/themes/twentyfourteen/inc/featured-content.php @@ -192,10 +192,10 @@ class Featured_Content { * @param WP_Query $query * @return WP_Query Possibly modified WP_query */ - public static function pre_get_posts( $query = false ) { + public static function pre_get_posts( $query ) { - // Bail if not home, not a query, not main query. - if ( ! is_a( $query, 'WP_Query' ) || ! $query->is_main_query() || ! is_home() ) + // Bail if not home or not main query. + if ( ! $query->is_home() || ! $query->is_main_query() ) return; $page_on_front = get_option( 'page_on_front' );