File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ function wp_api_v2_menus_dna_test( &$parents, $child ) {
116116/**
117117 * Search object in an array by ID
118118 */
119- function find_object_by_id ( $ array , $ id ) {
119+ function wp_api_v2_find_object_by_id ( $ array , $ id ) {
120120 foreach ( $ array as $ element ) {
121121 if ( $ id == $ element ->ID ) {
122122 return $ element ;
@@ -187,7 +187,7 @@ function wp_api_v2_menus_get_menu_items( $id ) {
187187 // push child items into their parent item in the original object
188188 do {
189189 foreach ($ child_items as $ key => $ child_item ) {
190- $ parent = find_object_by_id ( $ all_menu_items , $ child_item ->menu_item_parent );
190+ $ parent = wp_api_v2_find_object_by_id ( $ all_menu_items , $ child_item ->menu_item_parent );
191191
192192 if ( empty ( $ parent ) ) {
193193 unset($ child_items [$ key ]);
You can’t perform that action at this time.
0 commit comments