mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Twenty Fourteen: correct $query
usage in Featured_Content::pre_get_posts()
, props SergeyBiryukov, fixes #26064.
Built from https://develop.svn.wordpress.org/trunk@26255 git-svn-id: http://core.svn.wordpress.org/trunk@26161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4405cbe475
commit
9c93043286
@ -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…
x
Reference in New Issue
Block a user