Skip to content

Commit d8229cd

Browse files
committed
Make submenus information being returned as object, not associative array.
1 parent 4023fad commit d8229cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

classes/smartmenu_item.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ public function build() {
11121112
* @param string $itemimage Card image url for item.
11131113
* @param string $sortstring The string to be used for sorting the items.
11141114
*
1115-
* @return array An associative array of node data for the item.
1115+
* @return object As standard object containing node data for the item.
11161116
*/
11171117
public function generate_node_data($title, $url, $key = null, $tooltip = null,
11181118
$itemtype = 'link', $haschildren = 0, $children = [], $itemimage = '', $sortstring = '') {
@@ -1182,7 +1182,7 @@ public function generate_node_data($title, $url, $key = null, $tooltip = null,
11821182
// Updated the item type in the build_user_menu in primary navigation class method.
11831183
$data['divider'] = true;
11841184
}
1185-
return $data;
1185+
return (object) $data;
11861186
}
11871187

11881188
/**

0 commit comments

Comments
 (0)