wp_http_supports [ WordPress Function ]
wp_http_supports ( $capabilities = array(), $url = null )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: post_type_supports, wp_timezone_supported, add_theme_support, get_theme_support, wp_customize_support_script
Determines if there is an HTTP Transport that can process this request.
Source
<?php
function wp_http_supports( $capabilities = array(), $url = null ) {
$objFetchSite = _wp_http_get_object();
$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 (bool) $objFetchSite->_get_first_available_transport( $capabilities );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/wp http supports « WordPress Codex
Description. Determines if there is an HTTP Transport that can process this request. Parameters. $capabilities: (array) (optional) Array of capabilities to test or a ...
codex.wordpress.org - #17251 (Determine if any WP_HTTP transport can be used before ...
Running wp_http_supports() before wp_remote_request() means the ::test()s would be run twice, which could (in theory) break some sketchy plugins doing ...
core.trac.wordpress.org - Docs for page http.php
wp_http_supports (line 204). Determines if there is an HTTP Transport that can process this request. since: 3.2.0. bool wp_http_supports ([array $capabilities ...
phpdoc.wordpress.org - PHPXRef 0.7 : WordPress : /wp-includes/http.php source
201 * 202 * @return bool 203 */ 204 function wp_http_supports( $capabilities = array(), $url = null ) { 205 $objFetchSite = _wp_http_get_object(); 206 207 ...
phpxref.ftwr.co.uk