Skip to content

Commit

Permalink
Jetpack outdated WP notices: avoid fatals on outdated WP versions (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj authored and matticbot committed Oct 18, 2024
1 parent 43eb160 commit 2fe419d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This is an alpha version! The changes listed here are not final.
- Connection: Removed features_enabled deprecated method

### Fixed
- General: ensure the notice displayed when running an old version of WordPress can always be displayed without errors.
- My Jetpack: visual update to the GlobalNotice component look better on mobile.

## [2.9] - 2024-09-06
Expand Down
16 changes: 9 additions & 7 deletions jetpack-backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
);
?>
<div class="notice notice-error is-dismissible">
<p>
<?php
echo esc_html( $jetpack_backup_meets_requirements->get_error_message() );
?>
</p>
</div>
<?php
}
);

Expand Down

0 comments on commit 2fe419d

Please sign in to comment.