Skip to content

[Resolved] WP_Query object not passed to pp_skip_filtering

Home Forums Press Permit API WP_Query object not passed to pp_skip_filtering

This topic contains 2 replies, has 2 voices, and was last updated by 3 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20715 Reply

    Hi,

    the filter pp_skip_filtering does not get the current wp_query being filtered. This is bad, because the query object itself is the most important part in whether to filter the query or not. Now I have to do a very annoying hax which involves setting the current query in posts_clauses_request filter before your code is run.

    A-P

     

    BTW, the flt_posts_clauses function has a wrong number of parameters in query-interceptor_pp.php:

    It is added like this:

    add_filter( ‘posts_clauses_request’, array(&$this, ‘flt_posts_clauses’), 50, 3 );

    But the code in WordPress core query.php is:

    $clauses = (array) apply_filters_ref_array( ‘posts_clauses_request’, array( compact( $pieces ), &$this ) );

    #20717 Reply

    [ login required ]

    #20719 Reply

    [ login required ]

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Registered members have full access to Pro support forums here.

Feel free to log in or purchase a support key.