[wp-hackers] Alternative to posts_where hook

Rich ZenMaster richzenmaster at gmail.com
Tue Aug 10 05:37:27 UTC 2010


This is not good for beginners like me as I depends on these sites for the
information (whenever the official docs don't have it). Is reading the WP
code the only way to learn?

On Mon, Aug 9, 2010 at 10:34 PM, Brian Layman <bulk at thecodecave.com> wrote:

>
> > On Mon, Aug 9, 2010 at 8:34 PM, Rich ZenMaster <richzenmaster at gmail.com>
> > wrote:
> > > http://wpseek.com/hook/posts_where/
> > I don't know why this site marks posts_where as deprecated.
> > > http://adambrown.info/p/wp_hooks/hook/posts_where
> > This claims posts_where is not in 3.0, but it is
>
> Adam's site is automated to look for exact code but in 3.0 there were
> subtle
> changes that do not affect the behavior but do break his auto-documenting
> site.
>
> In this example it is a change to use apply_filters_ref_array:
>
> OLD-
> $where = apply_filters('posts_where', $where);
>
> NEW-
> $where = apply_filters_ref_array('posts_where', array( $where, &$this ) );
> ______________________________________________
> Brian Layman
> eHermits, Inc.
> TheCodeCave.com / eHermitsInc.com / twitter.com/BrianLayman /
> facebook.com/eHermit
>
>
>
> _______________________________________________
> 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