gform_disable_custom_field_names_query

Description

Allows the post meta 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 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?

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.