Filter Will Not Run in Plugin
-
I’m creating a plugin for BuddyPress and I have added a filter that is run once upon page load. This same filter should run when the member directory is search via AJAX but it doesn’t. If I move the same code to the functions.php file of my theme it is called on page load AND when the ajax search is performed.
Here is the code I’m using to call the filter:
add_filter( 'bp_ajax_querystring', 'my_function', 20, 2 );
I’m asking this here because I’m wondering if there is a reason that the filter isn’t being properly added from the plugin but will work fine in the functions.php in the theme?
- The topic ‘Filter Will Not Run in Plugin’ is closed to new replies.