[wp-trac] [WordPress Trac] #45698: `get_{$taxonomy}` filter misfires when `$taxonomy` parameter is omitted
WordPress Trac
noreply at wordpress.org
Wed Dec 19 03:34:08 UTC 2018
#45698: `get_{$taxonomy}` filter misfires when `$taxonomy` parameter is omitted
--------------------------+------------------------------
Reporter: dlh | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Description changed by dlh:
Old description:
> [34997] made the `$taxonomy` parameter to `get_term()` optional. However,
> when no `$taxonomy` is passed, no `$taxonomy` is available for the
> dynamic `get_{$taxonomy}` filter, so the less-exciting `get_` filter is
> applied instead. Additionally, no `$taxonomy` is passed to the `get_term`
> filter.
>
> The attached patch would set `$taxonomy` to that of the retrieved term
> before the `get_term` and `get_{$taxonomy}` filters are applied.
>
> [attachment:14162.3.patch:ticket:14162] on the original ticket includes
> the same adjustment, but it seems to have missed, or I am missing
> something.
New description:
[34997] made the `$taxonomy` parameter to `get_term()` optional. However,
when no `$taxonomy` is passed, no `$taxonomy` is available for the dynamic
`get_{$taxonomy}` filter, so the less-exciting `get_` filter is applied
instead. Additionally, no `$taxonomy` is passed to the `get_term` filter.
The attached patch would set `$taxonomy` to that of the retrieved term
before the `get_term` and `get_{$taxonomy}` filters are applied.
[attachment:14162.3.patch:ticket:14162] on the original ticket includes
the same adjustment, but it seems to have been missed, or I am missing
something.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45698#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list