Skip to:
Content

BuddyPress.org

Changeset 9600


Ignore:
Timestamp:
03/05/2015 06:35:22 AM (12 years ago)
Author:
tw2113
Message:

Adds hooks documentation to bp-core-buddybar.php.

See #5940.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-buddybar.php

    r9471 r9600  
    107107
    108108                        if ( !empty( $default_subnav_slug ) ) {
     109
     110                                /**
     111                                 * Filters the default component subnav item.
     112                                 *
     113                                 * @since BuddyPress (1.5.0)
     114                                 *
     115                                 * @param string $default_subnav_slug The slug of the default subnav item
     116                                 *                                    to select when clicked.
     117                                 * @param array  $r                   Parsed arguments for the nav item.
     118                                 */
    109119                                $bp->current_action = apply_filters( 'bp_default_component_subnav', $default_subnav_slug, $r );
    110120                        }
    … …  
    112122        }
    113123
     124        /**
     125         * Fires after adding an item to the main BuddyPress navigation array.
     126         *
     127         * @since BuddyPress (1.5.0)
     128         *
     129         * @param array $r        Parsed arguments for the nav item.
     130         * @param array $args     Originally passed in arguments for the nav item.
     131         * @param array $defaults Default arguments for a nav item.
     132         */
    114133        do_action( 'bp_core_new_nav_item', $r, $args, $defaults );
    115134}
    … …  
    484503        $has_subnav = isset( $bp->bp_options_nav[$nav_item] ) && count( $bp->bp_options_nav[$nav_item] ) > 0;
    485504
     505        /**
     506         * Filters whether or not a given nav item has subnav items.
     507         *
     508         * @since BuddyPress (1.5.0)
     509         *
     510         * @param bool   $has_subnav Whether or not there is any subnav items.
     511         * @param string $nav_item   The slug of the top-level nav item whose subnav
     512         *                           items you're checking.
     513         */
    486514        return apply_filters( 'bp_nav_item_has_subnav', $has_subnav, $nav_item );
    487515}
Note: See TracChangeset for help on using the changeset viewer.