Title: Codepress Menu
Author: David Mosterd
Published: <strong>2012년 8월 17일</strong>
Last modified: 2013년 8월 2일

---

플러그인 검색

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

![](https://s.w.org/plugins/geopattern-icon/codepress-menu.svg)

# Codepress Menu

 작성자: [David Mosterd](https://profiles.wordpress.org/davidmosterd/)

[다운로드](https://downloads.wordpress.org/plugin/codepress-menu.2.3.2.zip)

 * [세부사항](https://ko.wordpress.org/plugins/codepress-menu/#description)
 * [평가](https://ko.wordpress.org/plugins/codepress-menu/#reviews)
 *  [설치](https://ko.wordpress.org/plugins/codepress-menu/#installation)
 * [개발](https://ko.wordpress.org/plugins/codepress-menu/#developers)

 [지원](https://wordpress.org/support/plugin/codepress-menu/)

## 설명

Uses the native [wp_nav_menu()](https://codex.wordpress.org/Function_Reference/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:

    ```
    /**
     * Change the classes of a menu item
     *
     * @param array $classes List current classes
     * @param object $item Current menu item
     * @param array $items Current list of items (per level)
     * @param integer $k Key of the current item in $items
     */
    function codepress_menu_item_classes( $classes, $item, $items, $k ) {
        // mark the first item
        if ( reset( $items ) == $items[ $k ] )
            $classes[] = 'first';

        // 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:

 * Turned off or on using the screen-options.
 * Display is more in line with WordPress’s way of delete-links.
 * Works exactly the same now as the nested delete-link which is a click further
   inside the menu item.

## 설치

Search for `codepress menu` as described in the [Codex](https://codex.wordpress.org/Managing_Plugins#Installing_Plugins)

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 😉

## FAQ

  Something is broken? Have an idea?

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

## 후기

이 플러그인에 대한 평가가 없습니다.

## 기여자 & 개발자

“Codepress Menu”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에
기여하였습니다.

기여자

 *   [ David Mosterd ](https://profiles.wordpress.org/davidmosterd/)
 *   [ Tobias Schutter ](https://profiles.wordpress.org/tschutter/)

[자국어로 “Codepress Menu”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/codepress-menu)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/codepress-menu/)는, [SVN 저장소](https://plugins.svn.wordpress.org/codepress-menu/)
를 확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/codepress-menu/)
을 [RSS](https://plugins.trac.wordpress.org/log/codepress-menu/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 변경이력

#### 2.3.2

 * Fixed a strict standards warning when calling walk()

#### 2.3.1

 * Fixed a bug where adding menu items would not show the remove link

#### 2.3

 * A more WordPress-like implementation of the menu-item class control.
 * Added a one-click delete for menu-items in wp-admin (can be turned off or on 
   via screen options).
 * Minor code cleanup, adhering WordPress standards… even more!

#### 2.2.2

 * get_nav_menu_locations() in WordPress < 3.6 can return false, will now check 
   if it is an array and not break the foreach loop.
 * Minor code cleanup, adhering WordPress standards.

#### 2.2.1

 * Now checks if a given theme_location exists and is set or will just return the
   $args and let WordPress handle the parsing.
 * Unsets an item once it has a match in the indent function, better performance.
 * Removed the extraction from the indent function, slightly better performance.
 * Minor code cleanup, adhering WordPress standards.

#### 2.2

 * Bugfix: level set higher then 2 sometimes gave incorrect results.
 * Recoded it to match the WordPress coding standards (hope we managed to do this).
 * The items no longer have a separate class. It was not needed after all and this
   is more of a WordPress approach.
 * Added a filter (codepress_ignore_theme_locations) to tell the plugin not to apply
   on certain theme locations.
 * Removed some hooks that could only cause unwanted behavior and mostly targeted
   the separate item class (codepress_menu_return_false_on_empty_list_after_filters,
   codepress_menu_filter_classes, codepress_menu_items, codepress_menu_set_walker,
   codepress_menu_item_sanitize_classes).
 * Allowed the item-id. We see no harm in it after all. (codepress_menu_item_sanitize_id)

#### 2.1.2

 * Now checks if the filters have not reduced the amount of items to zero. If so,
   act as wp_nav_menu and return false.
 * When a theme location is used in conjunction with the plugin, it now returns 
   an empty string.

#### 2.1.1

 * ‘sanitize’ option is replaced by ‘classes’ and now defaults to doing nothing.
   Choosing ‘simple’ as option will result in what the default sanitize did in the
   2.0 version.

#### 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.

## 기초

 *  버전 **2.3.2**
 *  최근 업데이트: **13년 전**
 *  활성화된 설치 **80+**
 *  워드프레스 버전 ** 3.1 또는 그 이상 **
 *  다음까지 시험됨: **3.6.1**
 *  언어
 * [English (US)](https://wordpress.org/plugins/codepress-menu/)
 * 태그:
 * [menu](https://ko.wordpress.org/plugins/tags/menu/)[nav](https://ko.wordpress.org/plugins/tags/nav/)
   [navigation](https://ko.wordpress.org/plugins/tags/navigation/)[submenu](https://ko.wordpress.org/plugins/tags/submenu/)
   [walker](https://ko.wordpress.org/plugins/tags/walker/)
 *  [고급 보기](https://ko.wordpress.org/plugins/codepress-menu/advanced/)

## 평점

 별 5점 만점에 5점.

 *  [  2/5-별점 후기     ](https://wordpress.org/support/plugin/codepress-menu/reviews/?filter=5)
 *  [  0/4-별점 후기     ](https://wordpress.org/support/plugin/codepress-menu/reviews/?filter=4)
 *  [  0/3-별점 후기     ](https://wordpress.org/support/plugin/codepress-menu/reviews/?filter=3)
 *  [  0/2-별점 후기     ](https://wordpress.org/support/plugin/codepress-menu/reviews/?filter=2)
 *  [  0/1-별점 후기     ](https://wordpress.org/support/plugin/codepress-menu/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/codepress-menu/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/codepress-menu/reviews/)

## 기여자

 *   [ David Mosterd ](https://profiles.wordpress.org/davidmosterd/)
 *   [ Tobias Schutter ](https://profiles.wordpress.org/tschutter/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/codepress-menu/)