Make WordPress Core

Ticket #30722: 30722.1.diff

File 30722.1.diff, 1.3 KB (added by jartes, 11 years ago)
  • src/wp-content/themes/twentyfifteen/js/functions.js

     
    1313        // Add dropdown toggle that display child menu items.
    1414        $( '.main-navigation .page_item_has_children > a, .main-navigation .menu-item-has-children > a' ).after( '<button class="dropdown-toggle" aria-expanded="false">' + screenReaderText.expand + '</button>' );
    1515
     16        // Toggle buttons and submenu items with active children menu items
     17        $( '.main-navigation .current-menu-ancestor > button' ).addClass( 'toggle-on' );
     18        $( '.main-navigation .current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
     19
    1620        $( '.dropdown-toggle' ).click( function( e ) {
    1721                var _this = $( this );
    1822                e.preventDefault();
  • src/wp-content/themes/twentyfifteen/style.css

     
    682682
    683683.main-navigation .current_page_item > a,
    684684.main-navigation .current-menu-item > a,
     685.main-navigation .current-menu-ancestor > a,
    685686.main-navigation .current_page_ancestor > a {
    686687        font-weight: 700;
    687688}