gform_rest_api_capability_get_entries

gform_rest_api_capability_get_entries

DescriptionUsageParametersExamplePlacementSinceSource Code

Description
Filters the capability required to get entries via the Rest API V2.
Usage
1add_filter( 'gform_rest_api_capability_get_entries', 'your_function_name', 10, 2 );

Parameters

$capability string
The capability required. Defaults to 『gravityforms_view_entries』.

$request WP_REST_Request
Full data about the request.

Example
12345add_filter( 'gform_rest_api_capability_get_entries', 'get_get_entries_capability', 10, 2 );function get_get_entries_capability( $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_Entries_Controller::get_items_permissions_check() in includes/webapi/v2/includes/controllers/class-controller-entries.php
GF_REST_Form_Entries_Controller::get_items_permissions_check() in includes/webapi/v2/includes/controllers/class-controller-form-entries.php

發表回覆

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