gform_addon_pages_using_components

Description

The gform_addon_pages_using_components filter allows developers to override the add-on admin page slugs that should load Gravity Forms components, including scoped admin styles and component assets.

Usage

add_filter( 'gform_addon_pages_using_components', 'my_function_name' );

Parameters

ParameterTypeDescription
$gf_addon_pagesarrayThe add-on admin page slugs that should load Gravity Forms components.

Examples

Add a custom page slug.

add_filter( 'gform_addon_pages_using_components', function( $gf_addon_pages ) {
	$gf_addon_pages[] = 'my_addon_page_slug';
	return $gf_addon_pages;
} );

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 GFForms::use_gravity_forms_components() in gravityforms.php

Since

This filter was added in Gravity Forms 3.1.1.1.