Changeset 56664 for trunk/src/wp-includes/https-detection.php
- Timestamp:
- 09/22/2023 07:06:45 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/https-detection.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/https-detection.php
r56191 r56664 87 87 * This internal function is called by a regular Cron hook to ensure HTTPS support is detected and maintained. 88 88 * 89 * @since 5.7.089 * @since 6.4.0 90 90 * @access private 91 91 */ 92 function wp_ update_https_detection_errors() {92 function wp_get_https_detection_errors() { 93 93 /** 94 94 * Short-circuits the process of detecting errors related to HTTPS support. … … 97 97 * request to the site over HTTPS, storing the errors array from the returned `WP_Error` instead. 98 98 * 99 * @since 5.7.099 * @since 6.4.0 100 100 * 101 101 * @param null|WP_Error $pre Error object to short-circuit detection, 102 102 * or null to continue with the default behavior. 103 * @return null|WP_Error Error object if HTTPS detection errors are found, null otherwise. 103 104 */ 104 $support_errors = apply_filters( 'pre_wp_ update_https_detection_errors', null );105 $support_errors = apply_filters( 'pre_wp_get_https_detection_errors', null ); 105 106 if ( is_wp_error( $support_errors ) ) { 106 update_option( 'https_detection_errors', $support_errors->errors ); 107 return; 107 return $support_errors->errors; 108 108 } 109 109 … … 154 154 } 155 155 156 update_option( 'https_detection_errors', $support_errors->errors ); 157 } 158 159 /** 160 * Schedules the Cron hook for detecting HTTPS support. 161 * 162 * @since 5.7.0 163 * @access private 164 */ 165 function wp_schedule_https_detection() { 166 if ( wp_installing() ) { 167 return; 168 } 169 170 if ( ! wp_next_scheduled( 'wp_https_detection' ) ) { 171 wp_schedule_event( time(), 'twicedaily', 'wp_https_detection' ); 172 } 173 } 174 175 /** 176 * Disables SSL verification if the 'cron_request' arguments include an HTTPS URL. 177 * 178 * This prevents an issue if HTTPS breaks, where there would be a failed attempt to verify HTTPS. 179 * 180 * @since 5.7.0 181 * @access private 182 * 183 * @param array $request The cron request arguments. 184 * @return array The filtered cron request arguments. 185 */ 186 function wp_cron_conditionally_prevent_sslverify( $request ) { 187 if ( 'https' === wp_parse_url( $request['url'], PHP_URL_SCHEME ) ) { 188 $request['args']['sslverify'] = false; 189 } 190 return $request; 156 return $support_errors->errors; 191 157 } 192 158
Note: See TracChangeset
for help on using the changeset viewer.