Created
April 20, 2024 23:05
-
-
Save devuri/b858b3336ac17c6557300d4e300514d5 to your computer and use it in GitHub Desktop.
_evp_api_req_types
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 | |
// Hook into the '_evp_api_req_types' filter | |
add_filter('_evp_api_req_types', 'custom_evp_api_req_types_filter', 10, 1); | |
/** | |
* Custom filter to modify API request types. | |
* | |
* @param array $api_req_types An array of API request types. | |
* @return array Modified array of API request types. | |
*/ | |
function custom_evp_api_req_types_filter($api_req_types) { | |
// Modify the API request types | |
// Example: Add a new request type | |
$api_req_types['new-request-type'] = 'new-request-type'; | |
// Example: Remove an existing request type | |
unset($api_req_types['comment']); | |
return $api_req_types; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment