[wp-trac] [WordPress Trac] #17807: get_adjacent_post() doesn't work with custom taxonomies

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 5 04:15:51 UTC 2011


#17807: get_adjacent_post() doesn't work with custom taxonomies
--------------------------+------------------------------
 Reporter:  avaly         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  3.1.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------
Changes (by nacin):

 * keywords:  has-patch needs-testing => has-patch


Comment:

 Interesting idea. Not a huge fan of overloading arguments beyond their
 original meanings. Might be worth it to just add a new taxonomy argument.
 Especially since there's also an exclude_categories parameter that we
 could not easily convert over to terms. (It's possible for in_same_cat to
 be false but categories to still be excluded -- overloading the argument
 would prevent excluding terms of another taxonomy.)

 Either way:
  - The function argument will need new docs (and a new name, if we
 overload it). That includes in functions that use get_adjacent_post().
  - $taxonomy should go right into the string, no need to break out of
 double-quoted strings in PHP.
  - Even better, $taxonomy should get $wpdb->prepare() treatment.

 Would like to see an approach that uses a new argument, I think.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17807#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list