WordPress.org

Make WordPress Core

Ticket #44363: 44363.diff

File 44363.diff, 713 bytes (added by subrataemfluence, 3 years ago)
  • admin.php

    diff --git src/wp-admin/admin.php b/admin.php
    index 254b65d..3da948d 100755
    old new if ( isset( $plugin_page ) ) { 
    174174                $the_parent = $pagenow;
    175175        }
    176176
    177         if ( ! $page_hook = get_plugin_page_hook( $plugin_page, $the_parent ) ) {
    178                 $page_hook = get_plugin_page_hook( $plugin_page, $plugin_page );
    179 
     177        $page_hook = get_plugin_page_hook( $plugin_page, $the_parent );
     178        if ( null !== $page_hook ) {
    180179                // Back-compat for plugins using add_management_page().
    181180                if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook( $plugin_page, 'tools.php' ) ) {
    182181                        // There could be plugin specific params on the URL, so we need the whole query string