[wp-trac] [WordPress Trac] #20783: Add filter to wp_unique_term_slug()
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 29 21:05:35 UTC 2012
#20783: Add filter to wp_unique_term_slug()
-------------------------------------------------+-------------------------
Reporter: bolo1988 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Taxonomy | Review
Severity: normal | Version: 3.3.2
Keywords: has-patch dev-feedback needs- | Resolution:
testing |
-------------------------------------------------+-------------------------
Changes (by wpsmith):
* cc: travis@… (added)
* keywords: has-patch => has-patch dev-feedback needs-testing
Comment:
Replying to [comment:3 coffee2code]:
> Patch [attachment:20783.2.diff] brings `wp_unique_term_slug()` into
greater alignment with its post counterpart, `wp_unique_post_slug()`:
>
> * Calls `wp_unique_term_slug` on an earlier return of $slug
> * Adds `wp_unique_term_slug_is_bad_hierarchical_slug` and
`wp_unique_term_slug_is_bad_flat_slug` filters as introduced in [16960]
for #15726 to allow filtering of potentially bad hierarchical or flat
slugs.
> * Adds `pre_wp_unique_term_slug` filter early in function to short-
circuit add the db queries, filters, etc if the hooking function's intent
is to fully implement its own slug handling (the only thing not already
part of `wp_unique_post_slug()`, but proposed in #21112)
>
> (The addition of the *is_bad* slugs prompted by #21093, which was closed
in favor of this ticket.)
Thanks coffee2code for incorporating my patch with this patch.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20783#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list