Checks to see if we have a transport for the capabilities requested.
Description
Supported capabilities can be found in the \WpOrg\Requests\Capability interface as constants.
Example usage: Requests::has_capabilities([Capability::SSL => true])
.
Parameters
- bool> $capabilities Optional. Associative array of capabilities to test against, i.e.
[
.<capability>
=> true]
Source
public static function has_capabilities(array $capabilities = []) {
return self::get_transport_class($capabilities) !== '';
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.