Support » Plugin: WP Content Filter » Filter on AJAX calls.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Gwyer


    Hi, thanks for the code snippet.

    Can you tell me how you are actively testing this (i.e. with an Ajax Plugin?) so I can confirm my end that this fixes Ajax requested content.

    I’m making a javascript call to /wp-admin/admin-ajax.php to dynamically pull post content and update a page. This triggers the built in wordpress ajax handlers. But this ajax call will be flagged as admin. Since your filters are all on front end functions, checking if you are doing an ajax call shouldn’t affect the core set of ajax calls on the admin end. Looking at the $core_actions_get & $core_actions_post variables in /wp-admin/admin-ajax.php, it seems it might be possible there will be issues with get-tagcloud & get-comments but looking at them further it seems like it should be ok with the filters you are setting hooks with.

    As a workaround, I’ve just set the filters externally in my functions.php file but it would be nice if the content that was filtered within the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter on AJAX calls.’ is closed to new replies.