Fires after adding an item to the main BuddyPress navigation array.


do_action( 'bp_core_new_nav_item', (array) $r, (array) $args, (array) $defaults ); 

Note that, when possible, the more specific action hooks 'bp_core_create_nav_link' or bp_core_register_nav_screen_function should be used.

Parameters (3)

0. $r (array)
Parsed arguments for the nav item.
1. $args (array)
Originally passed in arguments for the nav item.
2. $defaults (array)
Default arguments for a nav item.


To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_core_new_nav_item', $r, $args, $defaults ); 
The following example is for adding a hook callback.
  1. // define the bp_core_new_nav_item callback 
  2. function action_bp_core_new_nav_item( $r, $args, $defaults ) { 
  3. // make action magic happen here... 
  4. }; 
  6. // add the action 
  7. add_action( 'bp_core_new_nav_item', 'action_bp_core_new_nav_item', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_core_new_nav_item', 'action_bp_core_new_nav_item', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

  1. do_action( 'bp_core_new_nav_item', $r, $args, $defaults );