From 7512e827d2f30f8d6a5ec33d398a76086b5d20ee Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Fri, 18 Oct 2024 18:54:54 +0200 Subject: [PATCH] Jetpack outdated WP notices: avoid fatals on outdated WP versions (#39745) --- .../backup/changelog/revert-admin_notice_37051 | 4 ++++ projects/plugins/backup/jetpack-backup.php | 16 +++++++++------- .../jetpack/changelog/revert-admin_notice_37051 | 4 ++++ projects/plugins/jetpack/jetpack.php | 12 +++++------- 4 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 projects/plugins/backup/changelog/revert-admin_notice_37051 create mode 100644 projects/plugins/jetpack/changelog/revert-admin_notice_37051 diff --git a/projects/plugins/backup/changelog/revert-admin_notice_37051 b/projects/plugins/backup/changelog/revert-admin_notice_37051 new file mode 100644 index 0000000000000..772077f2095b5 --- /dev/null +++ b/projects/plugins/backup/changelog/revert-admin_notice_37051 @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +General: ensure the notice displayed when running an old version of WordPress can always be displayed without errors. diff --git a/projects/plugins/backup/jetpack-backup.php b/projects/plugins/backup/jetpack-backup.php index 9af5e3c19b0a1..b0932ee566591 100644 --- a/projects/plugins/backup/jetpack-backup.php +++ b/projects/plugins/backup/jetpack-backup.php @@ -71,13 +71,15 @@ function jetpack_backup_requirements_check() { add_action( 'admin_notices', function () use ( $jetpack_backup_meets_requirements ) { - wp_admin_notice( - esc_html( $jetpack_backup_meets_requirements->get_error_message() ), - array( - 'type' => 'error', - 'dismissible' => true, - ) - ); + ?> +
+

+ get_error_message() ); + ?> +

+
+ 'error', - 'dismissible' => true, - ) - ); + ?> +
+

+
+