WordPress.org

Make WordPress Core

Ticket #50593: 48666.diff

File 48666.diff, 4.9 KB (added by audrasjb, 2 months ago)

Upgrade/Install: Link HelpHub documentation about PHP and WordPress upgrade after failed plugins and themes upgrade attempts

  • src/wp-admin/includes/class-plugin-upgrader.php

    diff --git a/src/wp-admin/includes/class-plugin-upgrader.php b/src/wp-admin/includes/class-plugin-upgrader.php
    index 27dc757f19..dd622a3ae4 100644
    a b class Plugin_Upgrader extends WP_Upgrader { 
    447447                if ( ! is_php_version_compatible( $requires_php ) ) {
    448448                        $error = sprintf(
    449449                                /* translators: 1: Current PHP version, 2: Version required by the uploaded plugin. */
    450                                 __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s.' ),
     450                                __( 'The PHP version on your server is %1$s, however the uploaded plugin requires %2$s. <a href="%3$s">Learn more about updating PHP</a>' ),
    451451                                phpversion(),
    452                                 $requires_php
     452                                $requires_php,
     453                                __( 'https://wordpress.org/support/update-php/' )
    453454                        );
    454455
    455456                        return new WP_Error( 'incompatible_php_required_version', $this->strings['incompatible_archive'], $error );
    class Plugin_Upgrader extends WP_Upgrader { 
    458459                if ( ! is_wp_version_compatible( $requires_wp ) ) {
    459460                        $error = sprintf(
    460461                                /* translators: 1: Current WordPress version, 2: Version required by the uploaded plugin. */
    461                                 __( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s.' ),
     462                                __( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s. <a href="%3$s">Learn more about updating WordPress</a>' ),
    462463                                $GLOBALS['wp_version'],
    463                                 $requires_wp
     464                                $requires_wp,
     465                                __( 'https://wordpress.org/support/article/updating-wordpress/' )
    464466                        );
    465467
    466468                        return new WP_Error( 'incompatible_wp_required_version', $this->strings['incompatible_archive'], $error );
  • src/wp-admin/includes/class-theme-installer-skin.php

    diff --git a/src/wp-admin/includes/class-theme-installer-skin.php b/src/wp-admin/includes/class-theme-installer-skin.php
    index 16e99332a6..74f9f4e7d9 100644
    a b class Theme_Installer_Skin extends WP_Upgrader_Skin { 
    298298                if ( ! is_php_version_compatible( $requires_php ) ) {
    299299                        $error = sprintf(
    300300                                /* translators: 1: Current PHP version, 2: Version required by the uploaded theme. */
    301                                 __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s.' ),
     301                                __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s. <a href="%3$s">Learn more about updating PHP</a>' ),
    302302                                phpversion(),
    303                                 $requires_php
     303                                $requires_php,
     304                                __( 'https://wordpress.org/support/update-php/' )
    304305                        );
    305306
    306307                        $blocked_message .= '<li>' . esc_html( $error ) . '</li>';
    class Theme_Installer_Skin extends WP_Upgrader_Skin { 
    310311                if ( ! is_wp_version_compatible( $requires_wp ) ) {
    311312                        $error = sprintf(
    312313                                /* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */
    313                                 __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ),
     314                                __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s. <a href="%3$s">Learn more about updating WordPress</a>' ),
    314315                                get_bloginfo( 'version' ),
    315                                 $requires_wp
     316                                $requires_wp,
     317                                __( 'https://wordpress.org/support/article/updating-wordpress/' )
    316318                        );
    317319
    318320                        $blocked_message .= '<li>' . esc_html( $error ) . '</li>';
  • src/wp-admin/includes/class-theme-upgrader.php

    diff --git a/src/wp-admin/includes/class-theme-upgrader.php b/src/wp-admin/includes/class-theme-upgrader.php
    index c08d3c2d5c..10cdc320de 100644
    a b class Theme_Upgrader extends WP_Upgrader { 
    595595                if ( ! is_php_version_compatible( $requires_php ) ) {
    596596                        $error = sprintf(
    597597                                /* translators: 1: Current PHP version, 2: Version required by the uploaded theme. */
    598                                 __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s.' ),
     598                                __( 'The PHP version on your server is %1$s, however the uploaded theme requires %2$s. <a href="%3$s">Learn more about updating PHP</a>' ),
    599599                                phpversion(),
    600                                 $requires_php
     600                                $requires_php,
     601                                __( 'https://wordpress.org/support/update-php/' )
    601602                        );
    602603
    603604                        return new WP_Error( 'incompatible_php_required_version', $this->strings['incompatible_archive'], $error );
    class Theme_Upgrader extends WP_Upgrader { 
    605606                if ( ! is_wp_version_compatible( $requires_wp ) ) {
    606607                        $error = sprintf(
    607608                                /* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */
    608                                 __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ),
     609                                __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s. <a href="%3$s">Learn more about updating WordPress</a>' ),
    609610                                $GLOBALS['wp_version'],
    610                                 $requires_wp
     611                                $requires_wp,
     612                                __( 'https://wordpress.org/support/article/updating-wordpress/' )
    611613                        );
    612614
    613615                        return new WP_Error( 'incompatible_wp_required_version', $this->strings['incompatible_archive'], $error );