Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_wp_update_https_detection_errors

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
5984       * Returning a `WP_Error` from the filter will effectively short-circuit the default logic of trying a remote
5985       * request to the site over HTTPS, storing the errors array from the returned `WP_Error` instead.
5986       *
5987       * @since 5.7.0
5988       * @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`.
5989       *
5990       * @param null|WP_Error $pre Error object to short-circuit detection,
5991       *                           or null to continue with the default behavior.
5992       */
5993      $support_errors = apply_filters( 'pre_wp_update_https_detection_errors', null );
5994      if ( is_wp_error( $support_errors ) ) {
5995           update_option( 'https_detection_errors', $support_errors->errors );
5996           return;
5997      }
5998
5999      $support_errors = wp_get_https_detection_errors();
6000
6001      update_option( 'https_detection_errors', $support_errors );
6002 }