Wp Bootstrap Navwalker Versions Save

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.

v4.3.0

4 years ago

Rolls a number of small fixes in, no major changes.

v4.0.2

6 years ago
  • Update the walker to do better regex matching on classnames
  • Adds autoload for main file through composer
  • Sets # values on the dropdown src instead of empty string
  • Adds more unit testing for the classname splitter function in walker

3.0.0

6 years ago

This is the final release (with exception to minor tweaks) for the Bootstrap 3 version of this walker. It's unlikely to receive many updates going forward.

v4.0.0

6 years ago

Here is a list of the most notable changes between the Bootstrap 3 version and the Bootstrap 4 version:

  • The filename has been changed and prefixed with class- to better fit PHP coding standards naming conventions.
    • New Name: class-wp-bootstrap-navwalker.php
    • Old Name: wp-bootstrap-navwalker.php
  • Icon and link modifier handling is now done through the CSS Classes menu item input instead of the Title input.
  • Icon only items are possible using icon classes in combination with the sr-only classname.

2.0.5

7 years ago

Code tested and updated using WP Enforcer & Code Climate to better meet WordPress PHP Standards.

2.0.4

10 years ago

This release offers full support for managing Bootstrap 3.0 menus through the WordPress menu manager and supports, glyphicons, dividers, nav headers & disables links. Now with a graceful fallback function.

Changes in this release

  • Updated fallback function to accept args array from wp_nav_menu

Tested With

  • WordPress 3.6
  • Bootstrap 3.0
  • WP_Debug
  • Theme-Check
  • Debug Bar

Upgrade Notes In order to use the custom fallback function you must update your fallback_cb attribute in your wp_nav_menu declaration.

<?php
    wp_nav_menu( array(
        'menu'              => 'primary',
        'theme_location'    => 'primary',
        'depth'             => 2,
        'container'         => 'div',
        'container_class'   => 'collapse navbar-collapse navbar-ex1-collapse',
        'menu_class'        => 'nav navbar-nav',
        //New fallback_cb attribute
        'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
        'walker'            => new wp_bootstrap_navwalker())
    );
?>