[wp-trac] [WordPress Trac] #38310: Improve "wp_update_term" documentation
WordPress Trac
noreply at wordpress.org
Sat Jul 1 11:16:43 UTC 2017
#38310: Improve "wp_update_term" documentation
------------------------------------------+-----------------------------
Reporter: ruud@… | Owner: ruudjoyo
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version: 4.7
Severity: normal | Resolution:
Keywords: good-first-bug needs-testing | Focuses: docs
------------------------------------------+-----------------------------
Changes (by boonebgorges):
* keywords: good-first-bug has-patch dev-feedback needs-testing => good-
first-bug needs-testing
Comment:
Hi @ruud at joyo - Apologies for the silence on this ticket.
You're right about the args that are being passed through to
`wp_unique_term_slug()`. The long description in the doc block should
probably make this more explicit.
The `unset( $args['term_id'] )` change does seem like it might fix a bug,
but I think we need more explicit description of the bug before dropping
in this change. I think it would be a unit test that: 1. sets up terms A
and B, 2. updates term A (`$term_id`) and but pass `$args['term_id'] =
B`, 3. show how the generated slug is incorrect. It may turn out that
`$args['term_id'] = $term_id` is a more appropriate fix than simply
unsetting.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38310#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list