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.

發表回覆

您的電子郵箱地址不會被公開。 必填項已用 * 標註