correction doublons index Ajax + découplage slug categories couleurs
This commit is contained in:
@@ -99,7 +99,7 @@ function thalim_get_card_data($post_id) {
|
||||
} else {
|
||||
$root = $cat;
|
||||
}
|
||||
$data['parent_slug'] = $root->slug;
|
||||
$data['parent_slug'] = thalim_category_color_slug($root->term_id, $root->slug);
|
||||
$data['card_category_name'] = thalim_cat_name($cat);
|
||||
$data['card_category_url'] = get_category_link($cat->term_id);
|
||||
break;
|
||||
@@ -132,7 +132,7 @@ function thalim_get_card_data($post_id) {
|
||||
if (in_array($cat->term_id, $excluded_ids)) continue;
|
||||
$ancestor_ids = get_ancestors($cat->term_id, 'category');
|
||||
$root = !empty($ancestor_ids) ? get_category(end($ancestor_ids)) : $cat;
|
||||
$data['parent_slug'] = $root->slug;
|
||||
$data['parent_slug'] = thalim_category_color_slug($root->term_id, $root->slug);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user