Make WordPress Core

Changeset 18882


Ignore:
Timestamp:
10/05/2011 07:09:51 AM (13 years ago)
Author:
dd32
Message:

Fix admin_body_class filter for Menu's and Widgets pages, Include the filter in Iframe's. Props SergeyBiryukov & johnbillion. Fixes #18853

Location:
trunk/wp-admin
Files:
3 edited

Legend:

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

    r18860 r18882  
    13521352    global $hook_suffix, $current_screen, $current_user, $admin_body_class, $wp_locale;
    13531353    $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
    1354     $admin_body_class .= ' iframe';
    13551354
    13561355?><!DOCTYPE html>
     
    13901389?>
    13911390</head>
    1392 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?>  class="no-js <?php echo $admin_body_class; ?>">
     1391<body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?>  class="wp-admin no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>">
    13931392<script type="text/javascript">
    13941393//<![CDATA[
  • trunk/wp-admin/nav-menus.php

    r18867 r18882  
    433433    $edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id  );
    434434
    435 function wp_nav_menu_max_depth() {
     435function wp_nav_menu_max_depth($classes) {
    436436    global $_wp_nav_menu_max_depth;
    437     return "menu-max-depth-$_wp_nav_menu_max_depth";
     437    return "$classes menu-max-depth-$_wp_nav_menu_max_depth";
    438438}
    439439
    440 add_action('admin_body_class','wp_nav_menu_max_depth');
     440add_filter('admin_body_class', 'wp_nav_menu_max_depth');
    441441
    442442wp_nav_menu_setup();
  • trunk/wp-admin/widgets.php

    r18867 r18882  
    2222}
    2323
     24function wp_widgets_access_body_class($classes) {
     25    return "$classes widgets_access ";
     26}
     27
    2428if ( 'on' == $widgets_access )
    25     add_filter( 'admin_body_class', create_function('', '{return " widgets_access ";}') );
     29    add_filter( 'admin_body_class', 'wp_widgets_access_body_class' );
    2630else
    2731    wp_enqueue_script('admin-widgets');
Note: See TracChangeset for help on using the changeset viewer.