gform_web_api_capability_delete_entries

Description

Filters the capability required to delete entries via the web API.

Usage

add_filter( 'gform_web_api_capability_delete_entries', 'my_custom_function' );

Parameters

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

Example

Use a custom capability.

add_filter( 'gform_web_api_capability_delete_entries', 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