WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/26/2020 12:25:15 AM (18 months ago)
Author:
SergeyBiryukov
Message:

Site Health: Improve the error message displayed when activating a plugin that requires a higher version of PHP or WordPress.

This adds some extra details to the message:

  • The current PHP or WordPress version.
  • The plugin's minimum required PHP or WordPress version.
  • A link to the support documentation on how to update PHP.

Props stuffradio, johnbillion, garrett-eclipse, sabernhardt, williampatton, SergeyBiryukov.
Fixes #48245.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update-core.php

    r48160 r48172  
    962962
    963963    $php_update_message = '';
     964
    964965    if ( function_exists( 'wp_get_update_php_url' ) ) {
    965966        /* translators: %s: URL to Update PHP page. */
    966         $php_update_message = '</p><p>' . sprintf( __( '<a href="%s">Learn more about updating PHP</a>.' ), esc_url( wp_get_update_php_url() ) );
     967        $php_update_message = '</p><p>' . sprintf(
     968            __( '<a href="%s">Learn more about updating PHP</a>.' ),
     969            esc_url( wp_get_update_php_url() )
     970        );
    967971
    968972        if ( function_exists( 'wp_get_update_php_annotation' ) ) {
    969973            $annotation = wp_get_update_php_annotation();
     974
    970975            if ( $annotation ) {
    971976                $php_update_message .= '</p><p><em>' . $annotation . '</em>';
Note: See TracChangeset for help on using the changeset viewer.