Linux 软件免费装

Codepress Menu

开发者 davidmosterd
tschutter
更新时间 2013年8月2日 20:16
PHP版本: 3.1 及以上
WordPress版本: 3.6
版权: GPLv2 or later
版权网址: 版权信息

标签

wordpress menu php navigation code wp_nav_menu walker submenu nav

下载

2.0 2.1 2.1.1 2.1.2 2.2 2.2.2 2.3 2.3.1 2.3.2 2.2.1

详情介绍:

Uses the native wp_nav_menu(). Add parameters to the wp_nav_menu() to enable functionality. Also, ships with one-click delete menu-items in the WordPress admin. Turned off or on using the screen-options. Sweet. Examples This will get the first sub-menu from the active branch and 2 levels beyond (menu + sub-menu + sub-menu): wp_nav_menu( array( 'level' => 2, 'depth' => 3 )); Show the current branch only: wp_nav_menu( array( 'level' => 1 )); Aimed on simple use in 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 )); ` Another feature is it's control over the css classes that are given to a menu-item. You might be faced with css selectors which you cannot change. The 'codepress_menu_filter_classes' filter can be used in your functions.php to set the class property: ` /** // mark the last item if ( end( $items ) == $items[ $k ] ) $classes[] = 'last'; // map the WordPress default 'current-menu-item' class to 'active' if ( in_array( 'current-menu-item', $classes ) ) $classes[] = 'active'; return $classes; } add_filter( 'codepress_menu_item_classes', 'codepress_menu_item_classes', 10, 4 ); ` Simple Menu Delete It ships with one-click delete menu-items within WordPress. This functionality was integrated from our Simple Menu Delete plugin and enhanced a bit:

安装:

Search for codepress menu as described in the Codex or
  1. Upload codepress-menu to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
Now you can use wp_nav_menu() with enhanced super-powers ;)

升级注意事项:

2.3 We have decided that current way of changing of classes is not in line with how WordPress works. We still offer the possibility to influence the classes, but the focus is on using giving you the tools to do what you want with the 'codepress_menu_item_classes' filter. 2.2 We have kept it backwards compatible as much as possible, but there might have been a few sacrifices here and there. They should be minor though. 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.

常见问题:

Something is broken? Have an idea?

Great! Tell us, we'd love to help out.

更新日志:

2.3.2 2.3.1 2.3 2.2.2 2.2.1 2.2 2.1.2 2.1.1 2.1 2.0