Skip to content

Commit

Permalink
Merge efcb339 into 27f2f44
Browse files Browse the repository at this point in the history
  • Loading branch information
sami616 committed Jul 30, 2017
2 parents 27f2f44 + efcb339 commit 26d89c6
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions includes/wp-api-menus-v2.php
Expand Up @@ -371,21 +371,22 @@ public function format_menu_item( $menu_item, $children = false, $menu = array()
$item = (array) $menu_item;

$menu_item = array(
'id' => abs( $item['ID'] ),
'order' => (int) $item['menu_order'],
'parent' => abs( $item['menu_item_parent'] ),
'title' => $item['title'],
'url' => $item['url'],
'attr' => $item['attr_title'],
'target' => $item['target'],
'classes' => implode( ' ', $item['classes'] ),
'xfn' => $item['xfn'],
'description' => $item['description'],
'object_id' => abs( $item['object_id'] ),
'object' => $item['object'],
'object_slug' => get_post( $item['object_id'] )->post_name,
'type' => $item['type'],
'type_label' => $item['type_label'],
'id' => abs( $item['ID'] ),
'order' => (int) $item['menu_order'],
'parent' => abs( $item['menu_item_parent'] ),
'title' => $item['title'],
'url' => $item['url'],
'attr' => $item['attr_title'],
'target' => $item['target'],
'classes' => implode( ' ', $item['classes'] ),
'xfn' => $item['xfn'],
'description' => $item['description'],
'object_id' => abs( $item['object_id'] ),
'object' => $item['object'],
'object_slug' => get_post( $item['object_id'] )->post_name,
'object_status' => get_post( $item['object_id'] )->post_status,
'type' => $item['type'],
'type_label' => $item['type_label'],
);

if ( $children === true && ! empty( $menu ) ) {
Expand Down

0 comments on commit 26d89c6

Please sign in to comment.