From f6fd49b357c6c676b56863bbc757001383590bba Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Fri, 16 Jan 2015 19:17:22 +0000 Subject: [PATCH] Twenty Fifteen: keep sub-menus open when visiting sub-menu pages, to show context when navigating a site. Props jartes, fixes #30722. Built from https://develop.svn.wordpress.org/trunk@31214 git-svn-id: http://core.svn.wordpress.org/trunk@31195 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfifteen/js/functions.js | 4 ++++ wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/twentyfifteen/js/functions.js b/wp-content/themes/twentyfifteen/js/functions.js index eb4f8fa6d9..c530e42c28 100644 --- a/wp-content/themes/twentyfifteen/js/functions.js +++ b/wp-content/themes/twentyfifteen/js/functions.js @@ -13,6 +13,10 @@ // Add dropdown toggle that display child menu items. $( '.main-navigation .menu-item-has-children > a' ).after( '' ); + // Toggle buttons and submenu items with active children menu items. + $( '.main-navigation .current-menu-ancestor > button' ).addClass( 'toggle-on' ); + $( '.main-navigation .current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' ); + $( '.dropdown-toggle' ).click( function( e ) { var _this = $( this ); e.preventDefault(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 6d856a1388..a0761d5346 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31213'; +$wp_version = '4.2-alpha-31214'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.