Self-test whether the transport can be used.
The available capabilities to test for can be found in \WpOrg\Requests\Capability.
[<capability> => true]. * Self-test whether the transport can be used.
*
* The available capabilities to test for can be found in \WpOrg\Requests\Capability.
*
* @codeCoverageIgnore
* @param array<string, bool> $capabilities Optional. Associative array of capabilities to test against, i.e. `['<capability>' => true]`.
* @return bool Whether the transport can be used.
*/
public static function test($capabilities = []) {
if (!function_exists('fsockopen')) {
return false;
}
// If needed, check that streams support SSL
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wporg-requests-transport-fsockopen/test