From 06c1c4f0f71b2cefade6e7841ba792875bae5825 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 6 Jul 2023 00:14:34 +0000 Subject: [PATCH] Docs: Document the return value of `wp_check_php_version()` using hash notation. Follow-up to [42832]. See #57840. git-svn-id: https://develop.svn.wordpress.org/trunk@56144 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/misc.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index 209e644978..34ced18df5 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -1572,7 +1572,16 @@ function _wp_privacy_settings_filter_draft_page_titles( $title, $page ) { * @since 5.1.0 * @since 5.1.1 Added the {@see 'wp_is_php_version_acceptable'} filter. * - * @return array|false Array of PHP version data. False on failure. + * @return array|false { + * Array of PHP version data. False on failure. + * + * @type string $recommended_version The PHP version recommended by WordPress. + * @type string $minimum_version The minimum required PHP version. + * @type bool $is_supported Whether the PHP version is actively supported. + * @type bool $is_secure Whether the PHP version receives security updates. + * @type bool $is_acceptable Whether the PHP version is still acceptable or warnings + * should be shown and an update recommended. + * } */ function wp_check_php_version() { $version = PHP_VERSION; @@ -1595,14 +1604,6 @@ function wp_check_php_version() { return false; } - /** - * Response should be an array with: - * 'recommended_version' - string - The PHP version recommended by WordPress. - * 'is_supported' - boolean - Whether the PHP version is actively supported. - * 'is_secure' - boolean - Whether the PHP version receives security updates. - * 'is_acceptable' - boolean - Whether the PHP version is still acceptable or warnings - * should be shown and an update recommended. - */ $response = json_decode( wp_remote_retrieve_body( $response ), true ); if ( ! is_array( $response ) ) {