wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_http_supports › WordPress Function
Seit3.2.0
Veraltetn/v
› wp_http_supports ( $capabilities = array(), $url = null )
Parameter: (2) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Determines if there is an HTTP Transport that can process this request.
Ähnliche Funktionen: wp_is_https_supported, wp_cache_supports, post_type_supports, wp_timezone_supported, wp_image_editor_supports
Quellcode
function wp_http_supports( $capabilities = array(), $url = null ) { $capabilities = wp_parse_args( $capabilities ); $count = count( $capabilities ); // If we have a numeric $capabilities array, spoof a wp_remote_request() associative $args array. if ( $count && count( array_filter( array_keys( $capabilities ), 'is_numeric' ) ) === $count ) { $capabilities = array_combine( array_values( $capabilities ), array_fill( 0, $count, true ) ); } if ( $url && ! isset( $capabilities['ssl'] ) ) { $scheme = parse_url( $url, PHP_URL_SCHEME ); if ( 'https' === $scheme || 'ssl' === $scheme ) { $capabilities['ssl'] = true; } } return WpOrg\Requests\Requests::has_capabilities( $capabilities ); }