WordPress.org

Make WordPress Core

Changeset 9264


Ignore:
Timestamp:
10/21/2008 04:31:06 PM (12 years ago)
Author:
ryan
Message:

Redirect plugins that hard code their pages to be under edit.php. Props filosofo. fixes #7932

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin.php

    r9147 r9264  
    5858// Handle plugin admin pages.
    5959if (isset($plugin_page)) {
    60     if( ! $page_hook = get_plugin_page_hook($plugin_page, $pagenow) )
     60    if( ! $page_hook = get_plugin_page_hook($plugin_page, $pagenow) ) {
    6161        $page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
     62        // backwards compatibility for plugins using add_management_page
     63        if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'import.php') ) {
     64            wp_redirect('import.php?page=' . $plugin_page);
     65            exit;
     66        }
     67    }
    6268
    6369    if ( $page_hook ) {
Note: See TracChangeset for help on using the changeset viewer.