Make WordPress Core

Ticket #16238: 16238.diff

File 16238.diff, 615 bytes (added by kawauso, 13 years ago)

Assume current dashboard as context (since the dashboards have individual menu hooks, plugins shouldn't be trying to add menus of context)

  • wp-admin/includes/template.php

     
    16611661 */
    16621662function convert_to_screen( $screen ) {
    16631663        $screen = str_replace( array('.php', '-new', '-add' ), '', $screen);
     1664
     1665        if ( is_network_admin() )
     1666                $screen .= '-network';
     1667        else if ( is_user_admin() )
     1668                $screen .= '-user';
     1669
    16641670        $screen = (string) apply_filters( 'screen_meta_screen', $screen );
    16651671        $screen = (object) array('id' => $screen, 'base' => $screen);
    16661672        return $screen;