Created
February 12, 2018 17:55
-
-
Save Idealien/e614d390529ab7bdb397339ddd3d4da0 to your computer and use it in GitHub Desktop.
Gravity Forms Web API v2 - /form/##/entries/ - Authorisation by Form ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( "gform_rest_api_capability_get_entries", "gfapi2_authorization_by_form", 10, 2); | |
function gfapi2_authorization_by_form( $capability, $request ) { | |
$form_id = $request->get_param("form_id"); | |
if( $form_id == '16' ) { | |
$capability = 'read'; | |
} | |
return $capability; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment