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
This commit is contained in:
parent
ebb4753f12
commit
c8d0070d64
@ -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' );
|
||||
|
Loading…
Reference in New Issue
Block a user