An open API service indexing awesome lists of open source software.

https://github.com/phpwine/winewpmenuwalker

WineWPMenuWalker Class
https://github.com/phpwine/winewpmenuwalker

menu plugins theme wordpress

Last synced: 2 months ago
JSON representation

WineWPMenuWalker Class

Awesome Lists containing this project

README

          

# WineWPMenuWalker

```PHP
/* Installation */
composer require phpwine/wpmenuwalker v1.4.1

/* required version *v2.0 */
composer require phpwine/optimizedhtml v2.0
```

```PHP
__( 'Primary menu', 'nielsoffice' )
);
register_nav_menus( $locations );
}

```

```PHP
// namespace
use \PHPWineWPWalker\WineWPMenuWalker;

// init custom menu
wp_nav_menu( array(
'theme_location' => 'main-menu',
'menu_id' => 'primary-menu',

'container' => 'nav',
'container_class' => 'menu-wine', // %1$s
'menu_class' => 'wine', // %2$s .... %3$s = list items.
'add_li_class' => 'pwine',
'items_wrap' => '

    %3$s
',
'walker' => new WineWPMenuWalker()
)
);

```

```HTML

```

```PHP
// Hooks sub-menu child parent [ assigned to depth]
function one_sub_menut_child( $depth, $args ) { /***/ }

// Hooks Replace Content menu specific item link
function Courses( $item, $depth, $args, $id ) { /***/ }

// Hooks Replace Content menu specific item no-link
function item_24Courses( $item, $depth, $args, $id ) { /***/ }

// Hooks insert element top and bottom from item
function top_Courses( $item, $depth, $args, $id ) { /***/ }
function bottom_Courses( $item, $depth, $args, $id ) { /***/ }

```

```PHP
// replace link || no-link
function item_27English() {
return [
child=> [
[h1, value=>["Hello Wolrd"]]
]
];
}

```