From 997acbfef9cb0168374f45bd9ca218ec42c75ba3 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Sun, 3 Feb 2019 23:30:20 -0500 Subject: [PATCH 1/2] Revert to accessing args in Bootstrap_Walker_Nav_Menu::start_el() as object props --- inc/nav-menus.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/inc/nav-menus.php b/inc/nav-menus.php index be9d29ae5..86fa2c08b 100644 --- a/inc/nav-menus.php +++ b/inc/nav-menus.php @@ -1,5 +1,4 @@ classes ) ? array() : (array) $item->classes; - $classes[] = ( isset( $args['has_children'] ) && $args['has_children'] ) ? 'dropdown' : ''; + $classes[] = ( isset( $args->has_children ) && $args->has_children ) ? 'dropdown' : ''; $classes[] = ($item->current || $item->current_item_ancestor) ? 'active' : ''; $classes[] = 'menu-item-' . $item->ID; @@ -100,14 +98,14 @@ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; - $attributes .= (( $args['has_children'] ) && ($depth == 0)) ? ' class="dropdown-toggle"' : ''; + $attributes .= (( $args->has_children ) && ($depth == 0)) ? ' class="dropdown-toggle"' : ''; - $item_output = $args['before']; + $item_output = $args->before; $item_output .= ''; - $item_output .= $args['link_before'] . apply_filters( 'the_title', $item->title, $item->ID ) . $args['link_after']; - $item_output .= ( ( $args['has_children'] ) && ($depth == 0)) ? ' ' : ''; - $item_output .= ( ( $args['has_children'] ) && ($depth != 0)) ? ' ' : ''; - $item_output .= $args['after']; + $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; + $item_output .= ( ( $args->has_children ) && ($depth == 0)) ? ' ' : ''; + $item_output .= ( ( $args->has_children ) && ($depth != 0)) ? ' ' : ''; + $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } From de816a9188f9e1dc934c4e55d306ab3706a91688 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Sun, 3 Feb 2019 23:37:49 -0500 Subject: [PATCH 2/2] Update changelog for https://github.com/INN/largo/pull/1625 --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index e5c2e5f67..3de3b15b9 100644 --- a/changelog.md +++ b/changelog.md @@ -11,7 +11,7 @@ This release contains bug fixes for Largo 0.6. ### Fixes -- Fixes PHP notices in class `Bootstrap_Walker_Nav_Menu`. [Pull request #1624](https://github.com/INN/largo/pull/1624) for [issue #1623](https://github.com/INN/largo/issues/1623) as part of [issue #1492](https://github.com/INN/largo/issues/1492). +- Fixes PHP notices in class `Bootstrap_Walker_Nav_Menu`. [Pull request #1624](https://github.com/INN/largo/pull/1624) and [#1625](https://github.com/INN/largo/pull/1625) for [issue #1623](https://github.com/INN/largo/issues/1623) as part of [issue #1492](https://github.com/INN/largo/issues/1492). - Fixes a regression in the behavior of the Largo Follow widget. [Pull request #1600](https://github.com/INN/largo/pull/1600) for [issue #1599](https://github.com/INN/largo/issues/1599). - Fixes issue where post excerpt and featured media were not being used for open graph tags on post types that are `is_singular()` but not `is_single()`. [Pull request #1604)(https://github.com/INN/largo/pull/1604) for [issue #1602](https://github.com/INN/largo/issues/1602). - Removes duplicate site title in opengraph tags for non-archive, non-`is_front_page()`, non-`is_singular()` URLs. [Pull request #1604](https://github.com/INN/largo/pull/1604) for [issue #1602](https://github.com/INN/largo/issues/1602).