Skip to content

Commit a3c16df

Browse files
committed
Allowing for custom 'parent_slug' values in submenu pages
1 parent 10d039f commit a3c16df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/loaders/mvc_admin_loader.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ public function add_menu_pages() {
105105
}
106106

107107
$page_handle = $top_level_handle.'-'.$key;
108+
$parent_slug = empty($admin_page['parent_slug']) ? $top_level_handle : $admin_page['parent_slug'];
108109

109110
if ($admin_page['in_menu']) {
110111
add_submenu_page(
111-
$top_level_handle,
112+
$parent_slug,
112113
$admin_page['label'].' ‹ '.$controller_pluralize_titleized,
113114
$admin_page['label'],
114115
$admin_page['capability'],

0 commit comments

Comments
 (0)