From e844945b31a3d70b14d2a467147fc78c0250c2b9 Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
Date: Fri, 12 Apr 2019 21:51:58 +0000
Subject: [PATCH] Plugins: In `list_plugin_updates()`, only display the
annotation and the surrounding tags if it's not empty.
Props afragen.
Fixes #46680.
git-svn-id: https://develop.svn.wordpress.org/trunk@45184 602fd350-edb4-49c9-b593-d223f7449a82
---
src/wp-admin/update-core.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
index 8fd29fb836..555d67efab 100644
--- a/src/wp-admin/update-core.php
+++ b/src/wp-admin/update-core.php
@@ -304,7 +304,12 @@ function list_plugin_updates() {
__( 'Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
- $compat .= '
' . wp_get_update_php_annotation() . '';
+
+ $annotation = wp_get_update_php_annotation();
+
+ if ( $annotation ) {
+ $compat .= '
' . $annotation . '';
+ }
}
// Get the upgrade notice for the new plugin version.