Skip to content

Commit ba8e407

Browse files
authored
Merge pull request #728 from ProgressPlanner/jdv/menu-position
When we're acting as a host, move the menu item to position 0
2 parents 0a75dda + 15c20fb commit ba8e407

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

classes/admin/class-page.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public function add_page() {
104104
'manage_options',
105105
$page_identifier,
106106
'__return_empty_string',
107-
\progress_planner()->get_ui__branding()->get_admin_menu_icon()
107+
\progress_planner()->get_ui__branding()->get_admin_menu_icon(),
108+
\progress_planner()->get_ui__branding()->get_admin_submenu_position()
108109
);
109110

110111
\add_submenu_page(

classes/ui/class-branding.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,19 @@ public function get_admin_submenu_name(): string {
184184
: $this->get_api_data()['admin_submenu_name'];
185185
}
186186

187+
/**
188+
* Get the admin-submenu position.
189+
*
190+
* @return int|null
191+
*/
192+
public function get_admin_submenu_position(): mixed {
193+
if ( $this->get_branding_id() !== 0 && $this->get_branding_id() !== 4958 ) {
194+
return -1000;
195+
}
196+
197+
return null;
198+
}
199+
187200
/**
188201
* Get the Ravi name.
189202
*

0 commit comments

Comments
 (0)