gform_rest_api_capability_get_feeds

Description

Filters the capability required to get feeds via the Rest API V2.

Usage

add_filter( 'gform_rest_api_capability_get_feeds', 'your_function_name', 10, 2 );

Parameters

  • $capability string

    The capability required. Defaults to ‘gravityforms_edit_forms’.

  • $request WP_REST_Request

    Full data about the request.

Examples

add_filter( 'gform_rest_api_capability_get_feeds', 'get_rest_api_capability_get_feeds', 10, 2 );

function get_rest_api_capability_get_feeds( $capability, $request ) 
{ 
  return 'my_custom_capability'; 
} 

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms 2.4.

Source Code

This filter is located in:

  • GF_REST_Feeds_Controller::get_items_permissions_check() in includes/webapi/v2/includes/controllers/class-controller-feeds.php
  • GF_REST_Form_Feeds_Controller::get_items_permissions_check() in includes/webapi/v2/includes/controllers/class-controller-form-feeds.php