gform_webapi_authentication_required_ENDPOINT

gform_webapi_authentication_required_ENDPOINT

DescriptionUsageParametersExampleForce authentication for the POST forms/[ID]/submissions endpoint.PlacementSource Code

Description
The 「gform_webapi_authentication_required_」 plus ENDPOINT filter in Gravity Forms allows the overriding of authentication for all the endpoints of the Web API.
Usage
1add_filter( 'gform_webapi_authentication_required_' . $endpoint, 'your_function_name' );

Parameters

$authentication_required bool
Whether authentication is required for this endpoint.

Example
Force authentication for the POST forms/[ID]/submissions endpoint.
The following example forces the Gravity Forms Web API to authenticate the user before allowing the form to be POSTed.
1add_filter( 'gform_webapi_authentication_required_post_forms_submissions', '__return_true' );
Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFWebAPI::handle_page_request() in includes/webapi/webapi.php

發表回覆

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