Title: wp_http_supports
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_http_supports( array $capabilities = array(), string $url = null ): bool

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#wp--skip-link--target)

Determines if there is an HTTP Transport that can process this request.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#parameters)󠁿

 `$capabilities`arrayoptional

Array of capabilities to test or a [wp_remote_request()](https://developer.wordpress.org/reference/functions/wp_remote_request/)
$args array.

More Arguments from wp_remote_request( … $args )

Request arguments. 
 See [WP_Http::request()](https://developer.wordpress.org/reference/classes/wp_http/request/)
for information on accepted arguments.

Default:`array()`

`$url`stringoptional

If given, will check if the URL requires SSL and adds that requirement to the capabilities
array.

Default:`null`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#return)󠁿

 bool

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#source)󠁿

    ```php
    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 );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/http.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/http.php#L402)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/http.php#L402-L420)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_parse_args()](https://developer.wordpress.org/reference/functions/wp_parse_args/)`wp-includes/functions.php` |

Merges user defined arguments into defaults array.

  |

| Used by | Description | 
| [WP_REST_Pattern_Directory_Controller::get_items()](https://developer.wordpress.org/reference/classes/wp_rest_pattern_directory_controller/get_items/)`wp-includes/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php` |

Search and retrieve block patterns metadata

  | 
| [WP_Site_Health::get_test_ssl_support()](https://developer.wordpress.org/reference/classes/wp_site_health/get_test_ssl_support/)`wp-admin/includes/class-wp-site-health.php` |

Checks if the HTTP API can handle SSL/TLS requests.

  | 
| [wp_check_php_version()](https://developer.wordpress.org/reference/functions/wp_check_php_version/)`wp-admin/includes/misc.php` |

Checks if the user needs to update PHP.

  | 
| [WP_Community_Events::get_events()](https://developer.wordpress.org/reference/classes/wp_community_events/get_events/)`wp-admin/includes/class-wp-community-events.php` |

Gets data about events near a particular location.

  | 
| [translations_api()](https://developer.wordpress.org/reference/functions/translations_api/)`wp-admin/includes/translation-install.php` |

Retrieve translations from WordPress Translation API.

  | 
| [themes_api()](https://developer.wordpress.org/reference/functions/themes_api/)`wp-admin/includes/theme.php` |

Retrieves theme installer pages from the WordPress.org Themes API.

  | 
| [get_core_checksums()](https://developer.wordpress.org/reference/functions/get_core_checksums/)`wp-admin/includes/update.php` |

Gets and caches the checksums for the given version of WordPress.

  | 
| [wp_check_browser_version()](https://developer.wordpress.org/reference/functions/wp_check_browser_version/)`wp-admin/includes/dashboard.php` |

Checks if the user needs a browser update.

  | 
| [plugins_api()](https://developer.wordpress.org/reference/functions/plugins_api/)`wp-admin/includes/plugin-install.php` |

Retrieves plugin installer pages from the WordPress.org Plugins API.

  | 
| [wp_get_popular_importers()](https://developer.wordpress.org/reference/functions/wp_get_popular_importers/)`wp-admin/includes/import.php` |

Returns a list from WordPress.org of popular importer plugins.

  | 
| [wp_credits()](https://developer.wordpress.org/reference/functions/wp_credits/)`wp-admin/includes/credits.php` |

Retrieves the contributor credits.

  | 
| [wp_version_check()](https://developer.wordpress.org/reference/functions/wp_version_check/)`wp-includes/update.php` |

Checks WordPress version against the newest version.

  | 
| [wp_update_plugins()](https://developer.wordpress.org/reference/functions/wp_update_plugins/)`wp-includes/update.php` |

Checks for available updates to plugins based on the latest versions hosted on WordPress.org.

  | 
| [wp_update_themes()](https://developer.wordpress.org/reference/functions/wp_update_themes/)`wp-includes/update.php` |

Checks for available updates to themes based on the latest versions hosted on WordPress.org.

  |

[Show 9 more](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_http_supports/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.2.0](https://developer.wordpress.org/reference/since/3.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_http_supports%2F)
before being able to contribute a note or feedback.