I want to inject additional search results along with the search results provided by WordPress for the site search feature. Basically, I need to find the WP_Query object that the search uses, and modify it.
I figure I should use the
posts_pre_query filter, and return an array of post objects - some of which will be real post objects, and others which will be "fake" posts objects that represents results from the other sources.
The problem I have is, how do I detect that this is a public search query - what characterizes a WP_Query instance that is a public search result?