Skip to content

Commit

Permalink
Make submenus information being returned as object, not associative a…
Browse files Browse the repository at this point in the history
…rray.
  • Loading branch information
Menrath committed Aug 27, 2024
1 parent 4023fad commit d8229cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/smartmenu_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ public function build() {
* @param string $itemimage Card image url for item.
* @param string $sortstring The string to be used for sorting the items.
*
* @return array An associative array of node data for the item.
* @return object As standard object containing node data for the item.
*/
public function generate_node_data($title, $url, $key = null, $tooltip = null,
$itemtype = 'link', $haschildren = 0, $children = [], $itemimage = '', $sortstring = '') {
Expand Down Expand Up @@ -1182,7 +1182,7 @@ public function generate_node_data($title, $url, $key = null, $tooltip = null,
// Updated the item type in the build_user_menu in primary navigation class method.
$data['divider'] = true;
}
return $data;
return (object) $data;
}

/**
Expand Down

0 comments on commit d8229cd

Please sign in to comment.