gform_toolbar_menu

The Gravity Forms gform toolbar menu hook.

Description

apply_filters( 'gform_toolbar_menu', $self, (unknown) $id ); 

Parameters (2)

0. $self
The self.
1. $id (unknown)
The id.

Usage

To run the hook, copy the example below.
  1. $self = apply_filters( 'gform_toolbar_menu', $self, $id ); 
  2.  
  3. if ( !empty( $self ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the gform_toolbar_menu callback 
  2. function filter_gform_toolbar_menu( $self, $id ) { 
  3. // make filter magic happen here... 
  4. return $self
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'gform_toolbar_menu', 'filter_gform_toolbar_menu', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'gform_toolbar_menu', 'filter_gform_toolbar_menu', 10, 2 ); 

Defined (1)

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

/gravityforms.php  
  1. $menu_items = apply_filters( 'gform_toolbar_menu', self::get_toolbar_menu_items( $id ), $id );