Make WordPress Core


Ignore:
Timestamp:
03/03/2017 02:49:13 AM (10 years ago)
Author:
boonebgorges
Message:

Taxonomy: Take 'parent' into account when checking for terms with duplicate names.

Terms with duplicate names are not allowed at the same level of a
taxonomy hierarchy. The name lookup introduced in [34809] did not
properly account for the 'parent' parameter, with the result that
the duplicate-name restriction was tighter than intended (terms
with duplicate names could not be created at different levels of
a single hierarchy).

Props mikejolley.
Fixes #39984.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r40144 r40145  
    20412041                'name' => $name,
    20422042                'hide_empty' => false,
     2043                'parent' => $args['parent'],
    20432044        ) );
    20442045
Note: See TracChangeset for help on using the changeset viewer.