LLMS_REST_Webhook::is_valid_action( array $args )
Determine if the current action is valid for the webhook
Parameters Parameters
- $args
-
(array) (Required) Numeric array of arguments from the originating hook.
Return Return
(bool)
Source Source
File: libraries/lifterlms-rest/includes/models/class-llms-rest-webhook.php
protected function is_valid_action( $args ) {
$ret = true;
switch ( current_action() ) {
case 'wp_trash_post':
case 'delete_post':
case 'untrashed_post':
$ret = $this->is_valid_post_action( $args[0] );
break;
case 'user_register':
case 'profile_update':
case 'delete_user':
$ret = $this->is_valid_user_action( $args[0] );
break;
}
/**
* Determine if the current action is valid for the webhook
*
* @param bool $ret Whether or not the action is valid.
* @param array $args Numeric array of arguments from the originating hook.
* @param LLMS_REST_Webhook $this Webhook object.
*/
return apply_filters( 'llms_rest_webhook_is_valid_action', $ret, $args, $this );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.1 | Introduced. |