Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#7932 closed defect (bug) (fixed)

add_management_page changes plugin admin URL

Reported by: filosofo Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: Administration Keywords: add_management_page has-patch
Focuses: Cc:


[9050] changed add_management_page's parent page from edit.php to import.php, which means that plugins using add_management_page now have different admin page URLs. So for example, if your plugin description tries to link to its management page using edit.php?page=my-plugin, which has worked at least since WP 1.5, it now has a fatal error.

My patch checks for a failed admin page request of the form edit.php?page=[something] and if import.php?page=[something] works, it redirects to that page.

Attachments (1)

import_redirect.diff (770 bytes) - added by filosofo 7 years ago.

Download all attachments as: .zip

Change History (4)

#1 @ryan
7 years ago

We don't need the empty( $page_hook ) check in there since we already checked for ! $page_hook, do we?

#2 @filosofo
7 years ago

I think we need it because $page_hook won't be empty for the case in which someone explicitly adds a plugin menu with 'edit.php' as the parent page.

#3 @ryan
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9264]) Redirect plugins that hard code their pages to be under edit.php. Props filosofo. fixes #7932

Note: See TracTickets for help on using tickets.