gform_web_api_capability_put_forms_properties

Description

Filters the capability required to update form properties via the web API.

Usage

add_filter( 'gform_web_api_capability_put_forms_properties', 'my_custom_function' );

Parameters

ParameterTypeDescription
$capabilitystringThe capability required. Defaults to ‘gravityforms_edit_forms’.

Example

Change the required capability.

add_filter( 'gform_web_api_capability_put_forms_properties', function ( $capability ) {
    return 'my_custom_capability';
} );

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 action hook is located in webapi.php