Changeset 25643 for trunk/src/wp-includes/nav-menu-template.php
- Timestamp:
- 09/28/2013 09:01:54 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu-template.php
r25602 r25643 17 17 class Walker_Nav_Menu extends Walker { 18 18 /** 19 * What the class handles. 20 * 19 21 * @see Walker::$tree_type 20 22 * @since 3.0.0 … … 24 26 25 27 /** 28 * Database fields to use. 29 * 26 30 * @see Walker::$db_fields 27 31 * @since 3.0.0 … … 32 36 33 37 /** 38 * Starts the list before the elements are added. 39 * 34 40 * @see Walker::start_lvl() 41 * 35 42 * @since 3.0.0 36 43 * 37 44 * @param string $output Passed by reference. Used to append additional content. 38 * @param int $depth Depth of page. Used for padding. 45 * @param int $depth Depth of menu item. Used for padding. 46 * @param array $args An array of arguments. @see wp_nav_menu() 39 47 */ 40 48 function start_lvl( &$output, $depth = 0, $args = array() ) { … … 44 52 45 53 /** 54 * Ends the list of after the elements are added. 55 * 46 56 * @see Walker::end_lvl() 57 * 47 58 * @since 3.0.0 48 59 * 49 60 * @param string $output Passed by reference. Used to append additional content. 50 * @param int $depth Depth of page. Used for padding. 61 * @param int $depth Depth of menu item. Used for padding. 62 * @param array $args An array of arguments. @see wp_nav_menu() 51 63 */ 52 64 function end_lvl( &$output, $depth = 0, $args = array() ) { … … 56 68 57 69 /** 70 * Start the element output. 71 * 58 72 * @see Walker::start_el() 73 * 59 74 * @since 3.0.0 60 75 * 61 76 * @param string $output Passed by reference. Used to append additional content. 62 * @param object $item Menu item data object.63 * @param int $depthDepth of menu item. Used for padding.64 * @param int $current_page Menu item ID.65 * @param object $args77 * @param object $item Menu item data object. 78 * @param int $depth Depth of menu item. Used for padding. 79 * @param array $args An array of arguments. @see wp_nav_menu() 80 * @param int $id Current item ID. 66 81 */ 67 82 function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { … … 78 93 * @since 3.0.0 79 94 * 80 * @param array $classes The CSS classes that are applied to the menu item's <li>.81 * @param object $item The current menu item.82 * @param array $args Arguments from {@see wp_nav_menu()}.95 * @param array $classes The CSS classes that are applied to the menu item's <li>. 96 * @param object $item The current menu item. 97 * @param array $args An array of arguments. @see wp_nav_menu() 83 98 */ 84 99 $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); … … 92 107 * @param string The ID that is applied to the menu item's <li>. 93 108 * @param object $item The current menu item. 94 * @param array $args A rguments from {@see wp_nav_menu()}.109 * @param array $args An array of arguments. @see wp_nav_menu() 95 110 */ 96 111 $id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args ); … … 113 128 * The HTML attributes applied to the menu item's <a>, empty strings are ignored. 114 129 * 115 * @type string $title The title attribute.130 * @type string $title The title attribute. 116 131 * @type string $target The target attribute. 117 * @type string $rel The rel attribute.118 * @type string $href The href attribute.132 * @type string $rel The rel attribute. 133 * @type string $href The href attribute. 119 134 * } 120 135 * @param object $item The current menu item. 121 * @param array $args Arguments from {@see wp_nav_menu()}.136 * @param array $args An array of arguments. @see wp_nav_menu() 122 137 */ 123 138 $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args ); … … 147 162 * @since 3.0.0 148 163 * 149 * @param string The menu item's starting HTML output.150 * @param object $item The current menu item.151 * @param int $depth From {@see Walker_Nav_Menu::start_el}.152 * @param array $args Arguments from {@see wp_nav_menu()}.164 * @param string $item_output The menu item's starting HTML output. 165 * @param object $item Menu item data object. 166 * @param int $depth Depth of menu item. Used for padding. 167 * @param array $args An array of arguments. @see wp_nav_menu() 153 168 */ 154 169 $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); … … 156 171 157 172 /** 173 * Ends the element output, if needed. 174 * 158 175 * @see Walker::end_el() 176 * 159 177 * @since 3.0.0 160 178 * 161 179 * @param string $output Passed by reference. Used to append additional content. 162 * @param object $item Page data object. Not used. 163 * @param int $depth Depth of page. Not Used. 180 * @param object $item Page data object. Not used. 181 * @param int $depth Depth of page. Not Used. 182 * @param array $args An array of arguments. @see wp_nav_menu() 164 183 */ 165 184 function end_el( &$output, $item, $depth = 0, $args = array() ) { 166 185 $output .= "</li>\n"; 167 186 } 168 } 187 188 } // Walker_Nav_Menu 169 189 170 190 /**
Note: See TracChangeset
for help on using the changeset viewer.