Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/29/2020 09:43:16 PM (6 years ago)
Author:
imath
Message:

Core: fix PHP code standards & typos in inline comments

Props passoniate

Fixes #8225
Fixes #8226
Fixes #8227
Fixes #8228
Fixes #8229

File:
1 edited

Legend:

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

    r11797 r12547  
    217217        public function delete_nav( $slug = '', $parent_slug = '' ) {
    218218
    219                 // Bail if slug is empty
     219                // Bail if slug is empty.
    220220                if ( empty( $slug ) ) {
    221221                        return false;
    222222                }
    223223
    224                 // We're deleting a child
     224                // We're deleting a child.
    225225                if ( ! empty( $parent_slug ) ) {
    226226
    227                         // Validate the subnav
     227                        // Validate the subnav.
    228228                        $sub_items = $this->get_secondary( array( 'parent_slug' => $parent_slug, 'slug' => $slug ), false );
    229229
     
    238238                        }
    239239
    240                         // Delete the child
     240                        // Delete the child.
    241241                        unset( $this->nav[ $this->object_id ][ $parent_slug . '/' . $slug ] );
    242242
    243                         // Return the deleted item's screen function
     243                        // Return the deleted item's screen function.
    244244                        return array( $sub_item->screen_function );
    245245
    246                 // We're deleting a parent
     246                // We're deleting a parent.
    247247                } else {
    248                         // Validate the nav
     248                        // Validate the nav.
    249249                        $nav_items = $this->get_primary( array( 'slug' => $slug ), false );
    250250
     
    268268                                        $screen_functions[] = $sub_item->screen_function;
    269269
    270                                         // Delete the child
     270                                        // Delete the child.
    271271                                        unset( $this->nav[ $this->object_id ][ $nav_item->slug . '/' . $sub_item->slug ] );
    272272                                }
     
    293293
    294294                foreach ( $items as $item ) {
    295                         // Default position
     295                        // Default position.
    296296                        $position = 99;
    297297
     
    300300                        }
    301301
    302                         // If position is already taken, move to the first next available
     302                        // If position is already taken, move to the first next available.
    303303                        if ( isset( $sorted[ $position ] ) ) {
    304304                                $sorted_keys = array_keys( $sorted );
Note: See TracChangeset for help on using the changeset viewer.