Description
The “xclusive_{$menu_name}_menu_items” filter allows to modify the default menu items. Version 1.1.0+.
A plugin (or theme) can add a filter with the code:
<?php add_filter( 'xclusive_{$menu_name}_menu_items', 'filter_function_name' ); ?>
The hook is located in the _inc/custom.php file.
Example
// apply filter function filter_xclusive_primary_menu_items( $menu_items, $args ) { $menu_items[] = array( 'rel' => 'next', 'href' => '#', 'name' => 'Name', ); return $menu_items; } add_filter('xclusive_primary_menu_items', 'filter_xclusive_primary_menu_items', 20, 2);
Note: $menu_items is an array, $args is an array. Possible menus: top, social, primary and footer.
Leave a Reply