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
This commit is contained in:
Sergey Biryukov
2023-07-06 00:14:34 +00:00
parent ebd03692e6
commit 06c1c4f0f7

View File

@@ -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 ) ) {