Description
The gform_advancedpostcreation_editable_fields_excluded_types can be used to exclude specific field types from the editable fields list in Advanced Post Creation feeds.
Usage
add_filter( 'gform_advancedpostcreation_editable_fields_excluded_types', 'your_function_name' );
Parameters
| Name | Type | Description |
|---|---|---|
| $excluded_types | array | Array of field types to exclude from the editable fields list. |
Default values
[
'captcha',
'creditcard',
'hidden',
'hiddenproduct',
'html',
'page',
'password',
'product',
'quantity',
'option',
'section',
'shipping',
'submit',
'total',
'turnstile',
'username',
]
Examples
Add a custom field type.
This example shows how to exclude a custom field type named my_field_type from the editable fields list.
add_filter( 'gform_advancedpostcreation_editable_fields_excluded_types', 'add_my_field_type' );
function add_my_field_type( $fields ) {
$fields[] = 'my_field_type';
return $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
The filter is located in /class-gf-advancedpostcreation.php
Since
The filter was added in Advanced Post Creation 1.6.0