[wp-trac] [WordPress Trac] #39215: Support for string $args in wp_get_object_terms() broken in 4.7

WordPress Trac noreply at wordpress.org
Fri Dec 9 20:25:31 UTC 2016


#39215: Support for string $args in wp_get_object_terms() broken in 4.7
----------------------------------------+--------------------
 Reporter:  sstoqnov                    |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.7.1
Component:  Taxonomy                    |     Version:  4.7
 Severity:  critical                    |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+--------------------
Changes (by ocean90):

 * keywords:  has-patch needs-testing => has-patch needs-unit-tests
 * milestone:  Awaiting Review => 4.7.1


Old description:

> It appears that `wp_get_object_terms()` no longer supports the string
> version of the `$args` parameter. Prior to WordPress 4.7 it used to
> support both string and array values, and there might be multiple plugins
> and themes that rely on this fact. It's also documented as `string|array`
> in the Codex.
>
> After digging a bit I found that this regression has been introduced in
> https://core.trac.wordpress.org/changeset/38667 which removed a lot of
> redundant code.

New description:

 It appears that `wp_get_object_terms()` no longer supports the string
 version of the `$args` parameter. Prior to WordPress 4.7 it used to
 support both string and array values, and there might be multiple plugins
 and themes that rely on this fact. It's also documented as `string|array`
 in the Codex.

 After digging a bit I found that this regression has been introduced in
 [38667] which removed a lot of redundant code.

--

Comment:

 Does someone want to work on a unit test for this?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39215#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list