[wp-trac] [WordPress Trac] #34245: Make the $taxonomy parameter in get_term_field() optional
WordPress Trac
noreply at wordpress.org
Sun Oct 11 02:37:37 UTC 2015
#34245: Make the $taxonomy parameter in get_term_field() optional
--------------------------------------+---------------------------
Reporter: DrewAPicture | Owner: boonebgorges
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.4
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------------
Comment (by boonebgorges):
DrewAPicture - This change looks mostly good. Two small suggestions:
1. Since you're modifying the final line of the function anyway, may as
well fix the spacing inside the parens :)
2. I'd add a test to show what happens when the value of `$taxonomy`
doesn't match the actual taxonomy of `$term`. This should be the same
before and after the patch - an `invalid_term` `WP_Error` object - but the
code path is a bit different, in a way that's relevant to the change
you're making here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34245#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list