pre_wp_update_https_detection_errors
Filter HookDescription
Short-circuits the process of detecting errors related to HTTPS support. Returning a `WP_Error` from the filter will effectively short-circuit the default logic of trying a remote request to the site over HTTPS, storing the errors array from the returned `WP_Error` instead.Hook Information
File Location |
wp-includes/deprecated.php
View on GitHub
|
Hook Type | Filter |
Line Number | 6004 |
Hook Parameters
Type | Name | Description |
---|---|---|
null|WP_Error
|
$pre
|
Error object to short-circuit detection, or null to continue with the default behavior. |
Usage Examples
Basic Usage
<?php
// Hook into pre_wp_update_https_detection_errors
add_filter('pre_wp_update_https_detection_errors', 'my_custom_filter', 10, 1);
function my_custom_filter($pre) {
// Your custom filtering logic here
return $pre;
}
Source Code Context
wp-includes/deprecated.php:6004
- How this hook is used in WordPress core
<?php
5999 * @deprecated 6.4.0 The `wp_update_https_detection_errors` filter is no longer used and has been replaced by `pre_wp_get_https_detection_errors`.
6000 *
6001 * @param null|WP_Error $pre Error object to short-circuit detection,
6002 * or null to continue with the default behavior.
6003 */
6004 $support_errors = apply_filters( 'pre_wp_update_https_detection_errors', null );
6005 if ( is_wp_error( $support_errors ) ) {
6006 update_option( 'https_detection_errors', $support_errors->errors, false );
6007 return;
6008 }
6009
PHP Documentation
<?php
/**
* Short-circuits the process of detecting errors related to HTTPS support.
*
* Returning a `WP_Error` from the filter will effectively short-circuit the default logic of trying a remote
* request to the site over HTTPS, storing the errors array from the returned `WP_Error` instead.
*
* @since 5.7.0
* @deprecated 6.4.0 The `wp_update_https_detection_errors` filter is no longer used and has been replaced by `pre_wp_get_https_detection_errors`.
*
* @param null|WP_Error $pre Error object to short-circuit detection,
* or null to continue with the default behavior.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/deprecated.php
Related Hooks
Related hooks will be displayed here in future updates.