Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2015 07:13:42 PM (11 years ago)
Author:
tw2113
Message:

More documentation cleanup for part of BP-Core component.

See #6398.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-walker-nav-menu.php

    r10108 r10355  
    5252         * @param array $elements  See {@link Walker::walk()}.
    5353         * @param int   $max_depth See {@link Walker::walk()}.
    54          *
    5554         * @return string See {@link Walker::walk()}.
    5655         */
     
    6160                $output = '';
    6261
    63                 if ( $max_depth < -1 ) // invalid parameter
     62                if ( $max_depth < -1 ) // Invalid parameter.
    6463                        return $output;
    6564
    66                 if ( empty( $elements ) ) // nothing to walk
     65                if ( empty( $elements ) ) // Nothing to walk.
    6766                        return $output;
    6867
    6968                $parent_field = $this->db_fields['parent'];
    7069
    71                 // flat display
     70                // Flat display.
    7271                if ( -1 == $max_depth ) {
    7372
     
    119118
    120119                /*
    121                  * if we are displaying all levels, and remaining children_elements is not empty,
    122                  * then we got orphans, which should be displayed regardless
     120                 * If we are displaying all levels, and remaining children_elements is not empty,
     121                 * then we got orphans, which should be displayed regardless.
    123122                 */
    124123                if ( ( $max_depth == 0 ) && count( $children_elements ) > 0 ) {
     
    149148         */
    150149        public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
    151                 // If we're someway down the tree, indent the HTML with the appropriate number of tabs
     150                // If we're someway down the tree, indent the HTML with the appropriate number of tabs.
    152151                $indent = $depth ? str_repeat( "\t", $depth ) : '';
    153152
     
    165164
    166165                // Add HTML ID
    167                 $id = sanitize_html_class( $item->css_id . '-personal-li' );  // Backpat with BP pre-1.7
     166                $id = sanitize_html_class( $item->css_id . '-personal-li' );  // Backpat with BP pre-1.7.
    168167
    169168                /**
     
    182181                $output .= $indent . '<li' . $id . $class_names . '>';
    183182
    184                 // Add href attribute
     183                // Add href attribute.
    185184                $attributes = ! empty( $item->link ) ? ' href="' . esc_url( $item->link ) . '"' : '';
    186185
    187                 // Construct the link
     186                // Construct the link.
    188187                $item_output = $args->before;
    189188                $item_output .= '<a' . $attributes . '>';
Note: See TracChangeset for help on using the changeset viewer.