[wp-hackers] pre_get_posts problem

Mike Schinkel mikeschinkel at newclarity.net
Sat Jul 24 04:40:08 UTC 2010

On Jul 23, 2010, at 8:32 AM, Dion Hulse (dd32) wrote:
> For example, I've seen people suggesting using is_admin() inside certain filters to exclude the admin, where, in actual fact, they should be hooking somewhere completely different to prevent affecting other queries. Unless people highlight to others (and menu's have really helped do this) that doing things in certain ways will break code, people dont change, and new articles/blog posts dont get made explaining the "correct" new way of achieving it.

Over the past several years and especially the past several months I've done some pretty elaborate plugin development and to do so I've debugged through code and found how to make things work.  However, I have frequently felt like the methods I have discovered are difficult to make robust and have felt that there have got to be a better ways. Unfortunately I just haven't been able to find many (any?) authoritative source(s) to help me identify what those ways should be, with a few notable exceptions (Otto has some great blog posts on a few of these topics.)  For many of those things I've found that absolutely nothing (via Google searches) has been written on those specific topics.  While I don't have to details suggestions for how to resolve this I do agree that having a way to easily identify these best practices could be really important to the plugin developer community as well as WordPress at large.  JMTCW.


More information about the wp-hackers mailing list