[Plugin: Co-Authors Plus] Bug in posts_join_filter() ?
-
posts_join_filter() adds some SQL to the query string. However, if you are using query_posts() to modify the default search for a page, posts_join_filter() has already run (courtesy of WordPress before entering the theme page), and the second running (in response to the call to query_posts()) adds the SQL again, which results in an SQL syntax error, and no posts returned. I think it should probably check to see if it’s already run. I used strpos() to check if $join already contains the new SQL, and if so, skip adding it. So far, this has worked for me, with no bad effects I’ve noticed.
The topic ‘[Plugin: Co-Authors Plus] Bug in posts_join_filter() ?’ is closed to new replies.