Description
The gform_app_menu_position_{$SHORT_SLUG} filter allows developers to modify the position of a Gravity Forms add-on’s top-level admin menu. Replace {$SHORT_SLUG} with the add-on’s slug.
Usage
add_filter( 'gform_app_menu_position_{your_addon_slug}', 'your_function_name' );
Parameters
| Parameter | Type | Description |
|---|---|---|
$menu_position | int | The menu position of the add-on menu. |
Examples
Change the add-on menu position.
Replace your_addon_slug with the add-on slug, then return the desired menu position.
add_filter( 'gform_app_menu_position_your_addon_slug', 'set_addon_menu_position' );
function set_addon_menu_position( $menu_position ) {
return 25;
}
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in create_app_menu() in includes/addon/class-gf-addon.php.