llms_rest_is_authorization_required_error( WP_Error $wp_error )
Checks whether or not the passed object is a 401 (permission) or 403 (authorization) error
Parameters Parameters
- $wp_error
-
(WP_Error) (Required) The WP_Error object to check.
Return Return
(boolean)
Source Source
File: libraries/lifterlms-rest/includes/server/llms-rest-server-functions.php
function llms_rest_is_authorization_required_error( $wp_error ) { return ! empty( array_intersect( llms_rest_get_all_error_statuses( $wp_error ), array( WP_Http::FORBIDDEN, WP_Http::UNAUTHORIZED ) ) ); // 403, 401. }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.18 | Introduced. |