1 | 33,44d32 |
---|
2 | < |
---|
3 | < $category_nicename_check = $wpdb->get_var("SELECT category_nicename FROM $wpdb->categories WHERE category_nicename = '$category_nicename' AND cat_ID != '$cat_ID' LIMIT 1"); |
---|
4 | < if ($category_nicename_check) { |
---|
5 | < $suffix = 2; |
---|
6 | < while ($category_nicename_check) { |
---|
7 | < $alt_category_nicename = $category_nicename . "-$suffix"; |
---|
8 | < $category_nicename_check = $wpdb->get_var("SELECT category_nicename FROM $wpdb->categories WHERE category_nicename = '$alt_category_nicename' AND cat_ID != '$cat_ID' LIMIT 1"); |
---|
9 | < $suffix++; |
---|
10 | < } |
---|
11 | < $category_nicename = $alt_category_nicename; |
---|
12 | < } |
---|
13 | < |
---|