Description
The gform_feed_settings_before_fields
filter allows developers to change the content that is displayed before the feed settings
Usage
Applies to all forms:
add_filter( 'gform_feed_settings_before_fields', 'your_function_name', 10, 2 );
Parameters
- $before_fields array
The content to be displayed before the feed settings fields. - $form int
The ID of the form associated with the feed.
Examples
Add a message to the feed settings page.
add_filter( 'gform_feed_settings_before_fields', 'test_before_fields', 10, 2 );
function test_before_fields( $before_fields, $form ) {
return 'This is the top of a feed settings page' . $before_fields;
}
Add a message to the feed settings page for Gravity Flow feed settings.
add_filter( 'gform_feed_settings_before_fields', 'test_before_fields', 10, 2 );
function test_before_fields( $before_fields, $form ) {
if ( 'gravityflow' !== rgget( 'subview' ) ) { // replace gravityflow with the slug of your own add-on
return $before_fields;
}
return 'This is the top of a feed settings page' . $before_fields;
}
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 includes/addon/class-gf-feed-addon.php
Since
The filter was added in Gravity Forms 2.9.4