Skip to content

Commit

Permalink
jQuery Static Index plugin: Remove filter to set up the posts array
Browse files Browse the repository at this point in the history
after it has executed.

Otherwise, it will continue to affect other queries on the page
made after the main query.
(cherry picked from commit 70eab0e)
  • Loading branch information
nacin authored and rdworth committed Nov 19, 2012
1 parent 44fcd86 commit 2f5cdda
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/jquery-static-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ function jquery_on_posts_request( $request, $query ) {

// Set up $wp_query->posts.
function jquery_on_posts_results( $posts, $query ) {
remove_filter( 'posts_results', 'jquery_on_posts_results', 10, 2 );
return array( get_page( get_option( 'page_on_front' ) ) );
}

0 comments on commit 2f5cdda

Please sign in to comment.