Skip to content

Commit

Permalink
use submenu with null parent for legacy links so they never display
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Aug 13, 2024
1 parent f448565 commit e33dec5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions inc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,14 @@ public static function get_old_url_ids() {
public static function old_admin_pages() {
// Add old plugin pages (for redirecting)
foreach ( self::get_old_url_ids() as $id ) {
\add_menu_page(
\add_submenu_page(
'',
__( 'MOJO', 'wp-plugin-mojo' ),
__( 'MOJO', 'wp-plugin-mojo' ),
'manage_options',
$id,
false
false,
null
);
}
}
Expand Down

0 comments on commit e33dec5

Please sign in to comment.