[wp-trac] [WordPress Trac] #19795: Documentation or code bug in register_taxonomy_for_object_type function (wp-includes/taxonomy.php)
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 10 20:19:39 UTC 2012
#19795: Documentation or code bug in register_taxonomy_for_object_type function
(wp-includes/taxonomy.php)
--------------------------+-----------------------------
Reporter: transom | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.3.1
Severity: normal | Keywords:
--------------------------+-----------------------------
The documentation indicates that the post_type can be an array or a
string.
However, the code passes the post_type to get_post_type_object without
change and that function expects a string (ouch)
So the choices are: change the documentation or loop over an array.
If we loop, what does returning the bool true/false mean? We added all the
post_types or just some of the post_types
Happy to provide a diff with feedback on direction
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19795>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list