Make WordPress Core


Ignore:
Timestamp:
11/13/2013 05:59:32 PM (12 years ago)
Author:
iammattthomas
Message:

Bring in the responsive component of MP6. See #25858.

  • Makes the admin fully responsive down to 320px wide.
  • Adds a touch-optimized main menu that can be opened and closed from the toolbar.
  • Size and positioning adjustments to icons, buttons, and text elements for better touch usability.

A few changes since MP6:

  • Removed jQuery mobile. This script was used to add swipe controls to open/close the sidebar menu. This feature was apparently buggy and due to the pending demise of jQuery mobile, it was removed.
  • Removed use of Backbone.js. Adding Backbone.js to this script would add a dependency of Backbone.js for all of the admin. Additionally, it was used to add a menu item. Instead of doing that, it was added via the admin menu API. This also fixes a bad delay in the item showing in the menu.
  • CSS layout is standardized. Comments have also been cleaned up.
  • Jetpack and Akismet code is removed.
  • RTL CSS is removed.
  • JS passes hinting other than one small issue that will likely be removed when parts of the code are reviewed.

A number of areas for improvement remain; we're tracking these issues in the comments of #25858.

Props to tollmanz, tillkruess, helen, dd32, and apeatling.

File:
1 edited

Legend:

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

    r26120 r26134  
    154154        'href'      => __('http://wordpress.org/support/forum/requests-and-feedback'),
    155155    ) );
     156}
     157
     158/**
     159 * Add the sidebar toggle button.
     160 *
     161 * @since 3.8.0
     162 *
     163 * @param WP_Admin_Bar $wp_admin_bar
     164 */
     165function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) {
     166    if ( is_admin() ) {
     167        $wp_admin_bar->add_menu( array(
     168            'id'    => 'toggle-button',
     169            'title' => '<span class="ab-icon"></span>',
     170            'href'  => '#',
     171            'meta'  => array(
     172                'title' => __( 'Menu' ),
     173            ),
     174        ) );
     175    }
    156176}
    157177
Note: See TracChangeset for help on using the changeset viewer.