Open peussen opened 9 years ago
I'm looking into one test scenario right now which seem to act up. If that one is due to this change, i will cancel this request. P
Looks like the test failure on my side was caused by something else. All tests work for me now.
I ran into a problem with my site, which after a couple of hours searching i tracked down to how this plugin worked in combination with another plugin. It appears the other plugin (which i will ask for a fix as well), does some queries in the pre_get_posts, which screws up this plugin.
Basically what happens is that a plugin does some queries in the pre_get_posts to determine if it should do something. These queries do appear to be the main_query, even though they are not. I guess you ran into somewhat similair problems (looking at the attempted variable).
So to allow other people with similair problems to correct this i introduced this filter. Basically you will get one filter per search type. So you should get:
People can then add their own criteria (or remove the default ones) when needed.
If you have some alternative solution i could not think of, which will not require this pull request, please let me know!