Make WordPress Core

Ticket #39798: WordPress-20170206-expose-PHP-version-in-dashboard.patch

File WordPress-20170206-expose-PHP-version-in-dashboard.patch, 1.2 KB (added by Dereckson, 7 years ago)

Patch to expose PHP version, against r39985

  • wp-admin/includes/update.php

     
    282282                        $msg .= '<a href="' . network_admin_url( 'update-core.php' ) . '" class="button" aria-describedby="wp-version">' . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a> ';
    283283        }
    284284
    285         /* translators: 1: version number, 2: theme name */
    286         $content = __( 'WordPress %1$s running %2$s theme.' );
     285        /* translators: 1: WP version number, 2: theme name, 3: PHP version number */
     286        $content = __( 'WordPress %1$s running %2$s theme under PHP %3$s.' );
    287287
    288288        /**
    289289         * Filters the text displayed in the 'At a Glance' dashboard widget.
     
    296296         */
    297297        $content = apply_filters( 'update_right_now_text', $content );
    298298
    299         $msg .= sprintf( '<span id="wp-version">' . $content . '</span>', get_bloginfo( 'version', 'display' ), $theme_name );
     299        $msg .= sprintf( '<span id="wp-version">' . $content . '</span>', get_bloginfo( 'version', 'display' ), $theme_name, phpversion() );
    300300
    301301        echo "<p id='wp-version-message'>$msg</p>";
    302302}