Skip to content

Commit

Permalink
Merge pull request #48 from mjangda/patch-1
Browse files Browse the repository at this point in the history
Prevent infinite loops!
  • Loading branch information
mboynes authored Aug 18, 2017
2 parents 574ff9c + f0e3c5a commit 5b6d5d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion class-es-wp-query-shoehorn.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ function es_wp_query_arg( $vars ) {
* @return void
*/
function es_wp_query_shoehorn( &$query ) {
// Prevent infinite loops!
if ( $query instanceof ES_WP_Query ) {
return;
}

if ( true == $query->get( 'es' ) ) {
$conditionals = array(
'is_single' => false,
Expand Down Expand Up @@ -219,4 +224,4 @@ private function reboot_query_vars( &$query ) {
$q['posts_per_page'] = get_option( 'posts_per_page' );
}
}
}
}

0 comments on commit 5b6d5d0

Please sign in to comment.