gform_app_menu_position_<slug>

Modify the menu position of an add-on menu.

Description

apply_filters( 'gform_app_menu_position_<slug>', (int) $menu_position ); 

Parameters (1)

0. $menu_position (int)
The Menu position of the add-on menu

Usage

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

Defined (1)

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

/includes/addon/class-gf-addon.php  
  1. $menu_position = apply_filters( 'gform_app_menu_position_' . $this->_slug, $menu_position );