[wp-hackers] Filter search query before execution

Ryan Bilesky rbilesky at gmail.com
Wed Sep 15 18:28:43 UTC 2010


Best i can find this is a really new filter, only since 3.0 and I can't seem
to figure out how to get it working.  I setup a simple example on my demo
install of WP.  I had my filter function return Hello World and searched
something else that didn't yield any results.  Hello world should give the
the initial hello world post, i get nothing.

On Wed, Sep 15, 2010 at 10:04 AM, scribu <scribu at gmail.com> wrote:

> On Wed, Sep 15, 2010 at 7:38 PM, Ryan Bilesky <rbilesky at gmail.com> wrote:
>
> > Now here's the problem, I looked at the filter reference on codex and I
> > could not find a filter for this purpose.  Am I missing something?  What
> > would be the best way to accomplish this, and I am not opposed to hacking
> > the core if need be.
> >
>
> Filter references are usually outdated. Solution: browse the source code.
> You will find the posts_search filter in WP_Query.
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list