mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Deprecate url_is_accessable_via_ssl(). Fixes #19555. Props jgadbois.
git-svn-id: https://develop.svn.wordpress.org/trunk@28709 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3457,3 +3457,30 @@ function format_to_post( $content ) {
|
||||
_deprecated_function( __FUNCTION__, '3.9' );
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the URL can be accessed over SSL.
|
||||
*
|
||||
* Determines if the URL can be accessed over SSL by using the WordPress HTTP API to access
|
||||
* the URL using https as the scheme.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @deprecated 4.0.0
|
||||
*
|
||||
* @param string $url The URL to test.
|
||||
* @return bool Whether SSL access is available.
|
||||
*/
|
||||
function url_is_accessable_via_ssl( $url ) {
|
||||
_deprecated_function( __FUNCTION__, '4.0', '' );
|
||||
|
||||
$response = wp_remote_get( set_url_scheme( $url, 'https' ) );
|
||||
|
||||
if ( !is_wp_error( $response ) ) {
|
||||
$status = wp_remote_retrieve_response_code( $response );
|
||||
if ( 200 == $status || 401 == $status ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user