diff --git a/includes/system-info.php b/includes/system-info.php index dcd0a607..f4a4c78b 100644 --- a/includes/system-info.php +++ b/includes/system-info.php @@ -29,6 +29,18 @@ function wprss_print_system_info() { $browser = new Browser(); + // When the v4 engine runs inside a newer package (e.g. v5 in classic mode), + // WPRSS_VERSION is the engine's internal version, not the installed plugin + // version. Read the real version from the main plugin file so System Info + // doesn't read like the update failed. + $wprss_plugin_version = WPRSS_VERSION; + if ( defined( 'WPRSS_FILE_CONSTANT' ) && file_exists( WPRSS_FILE_CONSTANT ) ) { + $wprss_file_data = get_file_data( WPRSS_FILE_CONSTANT, array( 'Version' => 'Version' ) ); + if ( ! empty( $wprss_file_data['Version'] ) ) { + $wprss_plugin_version = $wprss_file_data['Version']; + } + } + ?> ### Begin System Info ### @@ -39,7 +51,8 @@ function wprss_print_system_info() { SITE_URL: HOME_URL: -Plugin Version: +Plugin Version: + WordPress Version: