gform_disable_custom_field_names_query

gform_disable_custom_field_names_query

DescriptionUsageParametersExamplePlacementSinceSource Code

Description
Allows the postmeta query which retrieves the custom field names (meta keys) to be disabled to help improve editor performance on some sites.
Usage
add_filter( 'gform_disable_custom_field_names_query', 'your_function_name', 10, 1 );

Parameters

$disable_query boolean
Indicates if the custom field names query should be disabled. Default is false.

Example
add_filter( 'gform_disable_custom_field_names_query', 'disable_query', 10, 1 );
function disable_query( $disable_query ){
return true;
}

Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms version 2.3.4.1.
Source Code
This filter is located in GFFormsModel::get_custom_field_names() in forms_model.php.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注