Skip to content

Commit 154e92f

Browse files
Merge pull request #26 from Trollhag/patch-1
Use get_term instead of get_category for taxonomies
2 parents 9291996 + 0ab9fff commit 154e92f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wp-rest-api-v2-menus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function wp_api_v2_menus_get_menu_items( $id ) {
146146
$slug = basename( get_permalink($item->object_id) );
147147
$item->slug = $slug;
148148
} else if($item->type == 'taxonomy') {
149-
$cat = get_category($item->object_id);
149+
$cat = get_term($item->object_id);
150150
$item->slug = $cat->slug;
151151
} else if($item->type == 'post_type_archive') {
152152
$post_type_data = get_post_type_object($item->object);

0 commit comments

Comments
 (0)