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
5994       * Returning a `WP_Error` from the filter will effectively short-circuit the default logic of trying a remote
5995       * request to the site over HTTPS, storing the errors array from the returned `WP_Error` instead.
5996       *
5997       * @since 5.7.0
5998       * @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`.
5999       *
6000       * @param null|WP_Error $pre Error object to short-circuit detection,
6001       *                           or null to continue with the default behavior.
6002       */
6003      $support_errors = apply_filters( 'pre_wp_update_https_detection_errors', null );
6004      if ( is_wp_error( $support_errors ) ) {
6005           update_option( 'https_detection_errors', $support_errors->errors );
6006           return;
6007      }
6008
6009      $support_errors = wp_get_https_detection_errors();
6010
6011      update_option( 'https_detection_errors', $support_errors );
6012 }