Support » Plugins » Using 'request' filter with 'wp_ajax_query_attachments' action

  • I’m trying to change the query_vars that worh worh ajax request. The action resides in wp-admin/includes/ajax-actions.php at line 1808. The do_action resides in wp-admin/admin-ajax.php

    One or the other way, I can’t get the query_vars to change :S While the changing of query_vars does work when it’s non-ajax.

    add_action('wp_ajax_query_attachments', 'hook_to_request');
    function hook_to_request() {
        add_filter( 'request', 'change_request' );
    function change_request($query_vars) {
        // do something with the query vars
        return $query_vars;

    Is there anyone who can shed a light on this 😮

Viewing 1 replies (of 1 total)
  • Mesasix


    Hi bhulsman, I also started a thread here. .

    Anyways did you found out the answer to your problem?

Viewing 1 replies (of 1 total)
  • The topic ‘Using 'request' filter with 'wp_ajax_query_attachments' action’ is closed to new replies.