Merge pull request #495 from shansmith01/fix-bootstrap-navwalker-dividers

Fix divider in Bootstrap nav - Thx @shansmith01 !
This commit is contained in:
Holger 2017-12-11 08:58:49 +01:00 committed by GitHub
commit e9f3c41280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -62,9 +62,9 @@ class understrap_WP_Bootstrap_Navwalker extends Walker_Nav_Menu {
* a 0 if the strings are equal. * a 0 if the strings are equal.
*/ */
if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) { if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) {
$output .= $indent . '<li class="divider" role="presentation">'; $output .= $indent . '<li class="dropdown-divider" role="presentation">';
} else if ( strcasecmp( $item->title, 'divider' ) == 0 && $depth === 1 ) { } else if ( strcasecmp( $item->title, 'divider' ) == 0 && $depth === 1 ) {
$output .= $indent . '<li class="divider" role="presentation">'; $output .= $indent . '<li class="dropdown-divider" role="presentation">';
} else if ( strcasecmp( $item->attr_title, 'dropdown-header' ) == 0 && $depth === 1 ) { } else if ( strcasecmp( $item->attr_title, 'dropdown-header' ) == 0 && $depth === 1 ) {
$output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_html( $item->title ); $output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_html( $item->title );
} else if ( strcasecmp( $item->attr_title, 'disabled' ) == 0 ) { } else if ( strcasecmp( $item->attr_title, 'disabled' ) == 0 ) {