Filter hook 'https_ssl_verify'

in WP Core File wp-includes/class-wp-http.php at line 397

View Source

https_ssl_verify

Filter Hook
Description
Filters whether SSL should be verified for non-local requests.

Hook Information

File Location wp-includes/class-wp-http.php View on GitHub
Hook Type Filter
Line Number 397

Hook Parameters

Type Name Description
bool|string $ssl_verify Boolean to control whether to verify the SSL connection or path to an SSL certificate.
string $url The request URL.

Usage Examples

Basic Usage
<?php
// Hook into https_ssl_verify
add_filter('https_ssl_verify', 'my_custom_filter', 10, 2);

function my_custom_filter($ssl_verify, $url) {
    // Your custom filtering logic here
    return $ssl_verify;
}

Source Code Context

wp-includes/class-wp-http.php:397 - How this hook is used in WordPress core
<?php
 392  		 *
 393  		 * @param bool|string $ssl_verify Boolean to control whether to verify the SSL connection
 394  		 *                                or path to an SSL certificate.
 395  		 * @param string      $url        The request URL.
 396  		 */
 397  		$options['verify'] = apply_filters( 'https_ssl_verify', $options['verify'], $url );
 398  
 399  		// Check for proxies.
 400  		$proxy = new WP_HTTP_Proxy();
 401  		if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) {
 402  			$options['proxy'] = new WpOrg\Requests\Proxy\Http( $proxy->host() . ':' . $proxy->port() );

PHP Documentation

<?php
/**
		 * Filters whether SSL should be verified for non-local requests.
		 *
		 * @since 2.8.0
		 * @since 5.1.0 The `$url` parameter was added.
		 *
		 * @param bool|string $ssl_verify Boolean to control whether to verify the SSL connection
		 *                                or path to an SSL certificate.
		 * @param string      $url        The request URL.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/class-wp-http.php
Related Hooks

Related hooks will be displayed here in future updates.