Boone Gorges
28625bfc38
When creating terms, avoid false dupe checks due to accented characters.
...
`wp_insert_term()` doesn't allow the creation of a term when the term `name`
is the same as another term in the same hierarchy level of the same taxonomy.
Previously, this duplicate check used `get_term_by( 'name' )`, which uses the
database collation to determine sameness. But common collations do not
distinguish between accented and non-accented versions of a character. As a
result, it was impossible to create a term 'Foo' if a sibling term with an
accented character existed.
We address this problem by using `get_terms()` to do the duplicate check. This
query returns all potentially matching terms. We then do a stricter check
for equivalence in PHP, before determining whether one of the matches is
indeed a duplicate.
Props boonebgorges, tyxla, geza.miklo, mehulkaklotar.
Fixes #33864 .
Built from https://develop.svn.wordpress.org/trunk@34809
git-svn-id: http://core.svn.wordpress.org/trunk@34774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 20:25:26 +00:00
..
2015-09-18 08:43:26 +00:00
2015-09-20 03:17:24 +00:00
2015-09-20 03:52:25 +00:00
2015-09-25 23:58:25 +00:00
2015-09-20 08:49:27 +00:00
2015-09-29 04:32:25 +00:00
2015-09-20 03:52:25 +00:00
2015-09-29 01:49:25 +00:00
2015-09-16 10:03:26 +00:00
2015-10-01 05:09:50 +00:00
2015-10-02 19:08:26 +00:00
2015-09-22 13:46:25 +00:00
2015-09-22 14:21:23 +00:00
2015-09-29 19:12:27 +00:00
2015-09-22 14:20:24 +00:00
2015-09-20 03:52:25 +00:00
2015-09-26 07:04:28 +00:00
2015-09-26 03:11:24 +00:00
2015-09-16 12:46:28 +00:00
2015-10-02 23:20:28 +00:00
2015-09-16 12:46:28 +00:00
2015-09-20 03:52:25 +00:00
2015-09-20 03:52:25 +00:00
2015-09-22 14:03:25 +00:00
2015-09-22 14:01:25 +00:00
2015-09-22 13:43:25 +00:00
2015-09-22 13:58:24 +00:00
2015-09-22 15:09:24 +00:00
2015-10-01 03:58:23 +00:00
2015-10-01 03:58:23 +00:00
2015-09-29 21:40:24 +00:00
2015-09-19 06:40:26 +00:00
2015-09-24 09:16:25 +00:00
2015-09-25 21:02:27 +00:00
2015-09-30 04:13:48 +00:00
2015-09-26 07:04:28 +00:00
2015-09-27 21:37:24 +00:00
2015-09-15 16:16:43 +00:00
2015-09-26 07:04:28 +00:00
2015-09-20 03:52:25 +00:00
2015-09-22 13:26:23 +00:00
2015-09-26 07:04:28 +00:00
2015-09-22 13:10:24 +00:00
2015-09-30 01:11:25 +00:00
2015-09-22 13:46:25 +00:00
2015-09-22 13:46:25 +00:00
2015-09-22 13:16:30 +00:00
2015-10-02 19:08:26 +00:00
2015-10-03 18:45:25 +00:00
2015-09-24 00:49:25 +00:00
2015-09-22 13:48:25 +00:00
2015-10-02 20:50:25 +00:00
2015-10-03 14:09:43 +00:00
2015-09-27 18:49:29 +00:00
2015-10-03 19:39:25 +00:00
2015-10-03 01:27:24 +00:00
2015-09-22 13:44:25 +00:00
2015-09-26 04:51:26 +00:00
2015-10-02 19:08:26 +00:00
2015-09-30 01:35:26 +00:00
2015-09-22 13:36:25 +00:00
2015-09-29 22:46:25 +00:00
2015-09-16 11:02:24 +00:00
2015-10-02 07:03:25 +00:00
2015-10-03 01:32:24 +00:00
2015-10-02 22:48:26 +00:00
2015-09-22 03:14:25 +00:00
2015-10-02 20:45:24 +00:00
2015-09-30 04:13:48 +00:00
2015-09-23 21:57:26 +00:00
2015-09-24 13:26:24 +00:00
2015-09-28 02:50:24 +00:00
2015-09-22 13:27:24 +00:00
2015-09-22 13:30:24 +00:00
2015-10-02 19:08:26 +00:00
2015-09-16 22:19:24 +00:00
2015-10-02 19:08:26 +00:00
2015-10-02 19:08:26 +00:00
2015-10-02 19:08:26 +00:00
2015-10-02 19:08:26 +00:00
2015-09-28 18:41:26 +00:00
2015-10-02 06:46:24 +00:00
2015-10-02 19:32:30 +00:00
2015-09-20 03:52:25 +00:00
2015-10-02 19:08:26 +00:00
2015-09-25 23:58:25 +00:00
2015-10-02 04:36:24 +00:00
2015-10-02 06:38:26 +00:00
2015-09-28 15:34:25 +00:00
2015-09-22 13:13:26 +00:00
2015-10-03 04:36:27 +00:00
2015-09-30 02:42:26 +00:00
2015-10-02 19:08:26 +00:00
2015-10-02 04:26:25 +00:00
2015-10-03 20:25:26 +00:00
2015-09-22 13:23:25 +00:00
2015-10-03 15:00:25 +00:00
2015-09-25 19:36:25 +00:00
2015-10-02 19:08:26 +00:00
2015-09-22 13:03:24 +00:00
2015-10-03 20:25:26 +00:00
2015-09-25 23:58:25 +00:00
2015-10-01 05:37:26 +00:00
2015-09-20 03:52:25 +00:00