2017 © Pedro Peláez
 

package bem-walker-nav-menu

BEM naming for WordPress navigation menus.

image

craigpearson/bem-walker-nav-menu

BEM naming for WordPress navigation menus.

  • Thursday, November 23, 2017
  • by craigpearson
  • Repository
  • 1 Watchers
  • 0 Stars
  • 517 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 51 % Grown

The README.md

BEM Walker Nav Menu

BEM naming for WordPress navigation menus., (*1)

Installation

You can manually download it and install it in your plugins folder or install it via Composer:, (*2)

composer require craigpearson/bem-walker-nav-menu

Usage

<nav class="nav">
    <?php
    wp_nav_menu([
        'walker' => new CP\BEM\navWalker,
    ]);

    // Will generate:
    // <ul id="..." class="nav__list">
    //     <li class="nav__item ... nav__item--123">
    //         <a href="..." class="nav__link">...</a>
    //         <ul class="sub-nav">
    //             <li class="sub-nav__item">
    // ...
    ?>
</nav>

Extend the class to change the HTML classes., (*3)

<?php

class CustomWalkerNavMenu extends \CP\BEM\navWalker
{
    protected $prefix = 'c';

    protected $navListClass = 'menu__list';

    protected $navItemClass = 'menu__item';

    protected $navLinkClass = 'menu__link';

    protected $subNavClass = 'sub-menu';

    protected $subNavItemClass = 'sub-menu__item';

    protected $subNavLinkClass = 'sub-menu__link';
}

License

WTFPL, (*4)

The Versions

23/11 2017

dev-master

9999999-dev https://github.com/craigpearson/bem-walker-nav-menu/

BEM naming for WordPress navigation menus.

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

wordpress navigation

23/11 2017

3.0.1

3.0.1.0 https://github.com/craigpearson/bem-walker-nav-menu/

BEM naming for WordPress navigation menus.

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

wordpress navigation

23/11 2017

3.0.0

3.0.0.0 https://github.com/craigpearson/bem-walker-nav-menu/

BEM naming for WordPress navigation menus.

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

wordpress navigation

23/11 2017

2.0.2

2.0.2.0 https://github.com/craigpearson/bem-walker-nav-menu/

BEM naming for WordPress navigation menus.

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

plugin wordpress navigation

23/11 2017

2.0.1

2.0.1.0 https://github.com/craigpearson/bem-walker-nav-menu/

BEM naming for WordPress navigation menus.

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

plugin wordpress navigation

23/11 2017

dev-hotfix/getPrefix-fatal-error

dev-hotfix/getPrefix-fatal-error https://github.com/benjamincrozat/bem-walker-nav-menu/

BEM naming for WordPress navigation menus.

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

plugin wordpress navigation

27/10 2017

2.0.0

2.0.0.0 https://github.com/benjamincrozat/bem-walker-nav-menu/

BEM naming for WordPress navigation menus.

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

plugin wordpress navigation

21/05 2016

1.0.3

1.0.3.0 https://github.com/benjamincrozat/bem-walker-nav-menu/

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

wordpress

13/05 2016

1.0.2

1.0.2.0 https://github.com/benjamincrozat/bem-walker-nav-menu/

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

wordpress

13/05 2016

1.0.1

1.0.1.0 https://github.com/benjamincrozat/bem-nav-menu-walker/

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

wordpress

13/05 2016

1.0.0

1.0.0.0 https://github.com/benjamincrozat/bem-nav-menu-walker/

  Sources   Download

WTFPL

The Requires

  • php >=5.6

 

wordpress