WordPress.org

Make WordPress Core

Ticket #46065: 46065.diff

File 46065.diff, 1.1 KB (added by flixos90, 9 months ago)
  • src/wp-admin/includes/misc.php

     
    20542054                set_site_transient( 'php_check_' . $key, $response, WEEK_IN_SECONDS );
    20552055        }
    20562056
     2057        if ( isset( $response['is_acceptable'] ) && $response['is_acceptable'] ) {
     2058                /**
     2059                 * Filters whether the active PHP version is considered acceptable by WordPress.
     2060                 *
     2061                 * Returning false will trigger a PHP version warning to show up in the admin dashboard to administrators.
     2062                 *
     2063                 * This filter is only run if the wordpress.org Serve Happy API considers the PHP version acceptable, ensuring
     2064                 * that this filter can only make this check stricter, but not loosen it.
     2065                 *
     2066                 * @since 5.1.1
     2067                 *
     2068                 * @param bool   $is_acceptable Whether the PHP version is considered acceptable. Default true.
     2069                 * @param string $version       PHP version checked.
     2070                 */
     2071                $response['is_acceptable'] = (bool) apply_filters( 'wp_is_php_version_acceptable', true, $version );
     2072        }
     2073
    20572074        return $response;
    20582075}