Changeset 9585
- Timestamp:
- 03/03/2015 04:15:21 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-walker-nav-menu.php
r9486 r9585 151 151 $indent = $depth ? str_repeat( "\t", $depth ) : ''; 152 152 153 // Add HTML classes 153 /** 154 * Filters the classes to be added to the nav menu markup. 155 * 156 * @since BuddyPress (1.7.0) 157 * 158 * @param array $value Array of classes to be added. 159 * @param object $item Menu item data object. 160 * @param array $args Array of arguments for the item. 161 */ 154 162 $class_names = join( ' ', apply_filters( 'bp_nav_menu_css_class', array_filter( $item->class ), $item, $args ) ); 155 163 $class_names = ! empty( $class_names ) ? ' class="' . esc_attr( $class_names ) . '"' : ''; … … 157 165 // Add HTML ID 158 166 $id = sanitize_html_class( $item->css_id . '-personal-li' ); // Backpat with BP pre-1.7 167 168 /** 169 * Filters the value to be used for the nav menu ID attribute. 170 * 171 * @since BuddyPress (1.7.0) 172 * 173 * @param string $id ID attribute to be added to the menu item. 174 * @param object $item Menu item data object. 175 * @param array $args Array of arguments for the item. 176 */ 159 177 $id = apply_filters( 'bp_nav_menu_item_id', $id, $item, $args ); 160 178 $id = ! empty( $id ) ? ' id="' . esc_attr( $id ) . '"' : ''; … … 169 187 $item_output = $args->before; 170 188 $item_output .= '<a' . $attributes . '>'; 189 190 /** 191 * Filters the link text to be added to the item output. 192 * 193 * @since BuddyPress (1.7.0) 194 * 195 * @param string $name Item text to be applied. 196 * @param int $value Post ID the title is for. 197 */ 171 198 $item_output .= $args->link_before . apply_filters( 'the_title', $item->name, 0 ) . $args->link_after; 172 199 $item_output .= '</a>'; 173 200 $item_output .= $args->after; 174 201 175 // $output is byref 202 /** 203 * Filters the final result for the menu item. 204 * 205 * @since BuddyPress (1.7.0) 206 * 207 * @param string $item_output Constructed output for the menu item to append to output. 208 * @param object $item Menu item data object. 209 * @param int $depth Depth of menu item. Used for padding. 210 * @param array $args Array of arguments for the item. 211 */ 176 212 $output .= apply_filters( 'bp_walker_nav_menu_start_el', $item_output, $item, $depth, $args ); 177 213 }
Note: See TracChangeset
for help on using the changeset viewer.