=== Codepress Menu === Contributors: davidmosterd, tschutter Tags: wordpress, menu, navigation, nav, php, code Requires at least: 3.1 Tested up to: 3.4 Stable tag: 2.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html A more flexible take on displaying a WordPress menu in your theme == Description == Uses the native [wp_nav_menu()](http://codex.wordpress.org/Function_Reference/wp_nav_menu) with a few more possibilities. No configuration required but it adds a few runtime parameters that can be used to tweak your menu. This will get the first sub-menu from the current branch and 2 levels beyond (menu + sub-menu + sub-menu): ` wp_nav_menu( array( 'level' => 2, 'depth' => 3 )); ` *Don't* use the auto-sanitize which results in a simple set of classes only (li.current, li.current-parent, li.current-ancestor, li.first and li.last): ` wp_nav_menu( array( 'sanitize' => false )); ` Show the whole current branch only: ` wp_nav_menu( array( 'level' => 1 )); ` Aimed on simple use on various use cases: ` // display first level in the header wp_nav_menu( array( 'depth' => 1 )); // display first sub-menu from the current branch somewhere else wp_nav_menu( array( 'depth' => 2, 'level' => 2 )); ` == Upgrade Notice == = 2.1 = The changes from 2.0 to 2.1 are significant as it abandons the use of a custom function. A good step forward, but check the examples before you upgrade. == Installation == 1. Upload codepress-menu to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. Use wp_nav_menu() and it's new super-powers == Changelog == = 2.1 = * Now hooks into the native wp_nav_menu() and abandons the use of a custom function. * Extends the Walker_Nav_Menu class and most of it's filters and functions are used to keep as close to the WordPress core as possible. * You can no longer fetch an array of items and apply filters on it as you see fit. This functionality may return, but the focus of this version was on integration with wp_nav_menu(). = 2.0 = * Initial public release.