mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
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:
parent
20e5b27731
commit
005fe51131
|
|
@ -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' );
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user