mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699. git-svn-id: https://develop.svn.wordpress.org/trunk@38459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -423,7 +423,6 @@ function install_plugin_install_status($api, $loop = false) {
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @global string $tab
|
||||
* @global string $wp_version
|
||||
*/
|
||||
function install_plugin_information() {
|
||||
global $tab;
|
||||
@@ -630,9 +629,11 @@ function install_plugin_information() {
|
||||
</div>
|
||||
<div id="section-holder" class="wrap">
|
||||
<?php
|
||||
if ( ! empty( $api->tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
|
||||
$wp_version = get_bloginfo( 'version' );
|
||||
|
||||
if ( ! empty( $api->tested ) && version_compare( substr( $wp_version, 0, strlen( $api->tested ) ), $api->tested, '>' ) ) {
|
||||
echo '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.' ) . '</p></div>';
|
||||
} elseif ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
|
||||
} elseif ( ! empty( $api->requires ) && version_compare( substr( $wp_version, 0, strlen( $api->requires ) ), $api->requires, '<' ) ) {
|
||||
echo '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.' ) . '</p></div>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user