функция
Устаревший since 5.7.0
wp_update_https_detection_errors()
Устаревшее.
Помечено устаревшим с версии 6.4.0.
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_update_https_detection_errors()
Описание
Эта внутренняя функция вызывается регулярным Cron-хуком, чтобы обеспечить определение и поддержание работы HTTPS.
Оригинал (английский)
This internal function is called by a regular Cron hook to ensure HTTPS support is detected and maintained.
Исходный код
wp-includes/deprecated.php:5984
function wp_update_https_detection_errors() {
_deprecated_function( __FUNCTION__, '6.4.0' );
/**
* 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.
*/
$support_errors = apply_filters( 'pre_wp_update_https_detection_errors', null );
if ( is_wp_error( $support_errors ) ) {
update_option( 'https_detection_errors', $support_errors->errors, false );
return;
}
$support_errors = wp_get_https_detection_errors();
update_option( 'https_detection_errors', $support_errors );
}
История изменений
| Версия | Описание |
|---|---|
| 6.4.0 | Deprecated. The wp_update_https_detection_errors() function is no longer used and has been replaced by wp_get_https_detection_errors(). Previously the function was called by a regular Cron hook to update the https_detection_errors option, but this is no longer necessary as the errors are retrieved directly in Site Health and no longer used outside of Site Health. |
| 5.7.0 | Introduced. |

