@@ -772,8 +772,6 @@ protected function get_item_list() {
772772 $ duplicate_names [ $ name ] = array ();
773773 }
774774
775- $ php_version = PHP_VERSION ;
776-
777775 $ requires = isset ( $ update_info ) && isset ( $ update_info ['requires ' ] ) ? $ update_info ['requires ' ] : null ;
778776 $ requires_php = isset ( $ update_info ) && isset ( $ update_info ['requires_php ' ] ) ? $ update_info ['requires_php ' ] : null ;
779777
@@ -783,8 +781,13 @@ protected function get_item_list() {
783781 $ compatible_php = empty ( $ requires_php ) || version_compare ( PHP_VERSION , $ requires_php , '>= ' );
784782
785783 if ( ! $ compatible_php ) {
786- $ update = 'unavailable ' ;
787- $ update_unavailable_reason = "Requires a newer version of PHP [ $ requires_php] than available [ $ php_version] " ;
784+ $ update = 'unavailable ' ;
785+
786+ $ update_unavailable_reason = sprintf (
787+ 'This update requires PHP version %s, but the version installed is %s. ' ,
788+ $ requires_php ,
789+ PHP_VERSION
790+ );
788791 } else {
789792 $ update = $ update_info ? 'available ' : 'none ' ;
790793 }
@@ -818,9 +821,7 @@ protected function get_item_list() {
818821 'requires_php ' => $ requires_php ,
819822 'wporg_status ' => $ wporg_info ['status ' ],
820823 'wporg_last_updated ' => $ wporg_info ['last_updated ' ],
821-
822824 'recently_active ' => in_array ( $ file , array_keys ( $ recently_active ), true ),
823-
824825 'update_unavailable_reason ' => isset ( $ update_unavailable_reason ) ? $ update_unavailable_reason : '' ,
825826 ];
826827
@@ -871,7 +872,7 @@ protected function get_item_list() {
871872 $ items [ $ file ]['requires ' ] = isset ( $ plugin_update_info ->requires ) ? $ plugin_update_info ->requires : null ;
872873 $ items [ $ file ]['requires_php ' ] = isset ( $ plugin_update_info ->requires_php ) ? $ plugin_update_info ->requires_php : null ;
873874
874- $ reason = "Requires a newer version of WordPress [ $ plugin_update_info ->requires ] than installed [ $ wp_version] " ;
875+ $ reason = "This update requires WordPress version $ plugin_update_info ->requires , but the version installed is $ wp_version. " ;
875876
876877 $ items [ $ file ]['update_unavailable_reason ' ] = $ reason ;
877878
0 commit comments