Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #46431, comment 2


Ignore:
Timestamp:
06/13/2019 03:36:45 PM (5 years ago)
Author:
yashar_hv
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #46431, comment 2

    initial v1  
    11I encountered this bug when I was trying to auto assign custom taxonomy term slugs by using `pre_{$taxonomy}_{$field}` filter hook.
    2 I found out in the last part of `wp_unique_term_slug()` when it tries to append sequel numbers in case `$slug` is not unique yet, it checks for `$parent_suffix` ('-parent-slug') and if it exists, the function ignores appending a number and returns `$slug.$parent_suffix` :
     2I found out in the last part of `wp_unique_term_slug()` in taxonomy.php, when it tries to append sequel numbers in case `$slug` is not unique yet, it checks for `$parent_suffix` ('-parent-slug') and if it exists, the function ignores appending a number and returns `$slug.$parent_suffix` :
    33{{{
    44if ( apply_filters( 'wp_unique_term_slug_is_bad_slug', $needs_suffix, $slug, $term ) ) {