| @@ -12,9 +12,9 @@ | ||
| 12 | 12 | |
| 13 | 13 | use Automattic\Jetpack\Plugins_Installer; |
| 14 | 14 | |
| 15 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 16 | - exit; | |
| 16 | + exit( 0 ); | |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | const PLUGIN_SLUG = 'jetpack-backup'; |
| 20 | 20 | const PLUGIN_FILE = 'jetpack-backup/jetpack-backup.php'; |
| @@ -30,8 +30,10 @@ | ||
| 30 | 30 | /** |
| 31 | 31 | * Verify the intent to install Jetpack Backup, and kick off installation. |
| 32 | 32 | * |
| 33 | 33 | * This works in tandem with a JITM set up in the JITM package. |
| 34 | + * | |
| 35 | + * @return never | |
| 34 | 36 | */ |
| 35 | 37 | function try_install() { |
| 36 | 38 | check_admin_referer( 'jetpack-backup-install' ); |
| 37 | 39 | |
| @@ -60,9 +62,9 @@ | ||
| 60 | 62 | } |
| 61 | 63 | |
| 62 | 64 | wp_safe_redirect( $redirect ); |
| 63 | 65 | |
| 64 | - exit; | |
| 66 | + exit( 0 ); | |
| 65 | 67 | } |
| 66 | 68 | |
| 67 | 69 | /** |
| 68 | 70 | * Install and activate the Jetpack Backup plugin. |
| @@ -94,10 +96,12 @@ | ||
| 94 | 96 | /** |
| 95 | 97 | * Notify the user that the installation of Jetpack Backup failed. |
| 96 | 98 | */ |
| 97 | 99 | function error_notice() { |
| 98 | - ?> | |
| 99 | - <div class="notice notice-error is-dismissible"> | |
| 100 | - <p><?php esc_html_e( 'There was an error installing Jetpack Backup. Please try again.', 'jetpack' ); ?></p> | |
| 101 | - </div> | |
| 102 | - <?php | |
| 100 | + wp_admin_notice( | |
| 101 | + esc_html__( 'There was an error installing Jetpack Backup. Please try again.', 'jetpack' ), | |
| 102 | + array( | |
| 103 | + 'type' => 'error', | |
| 104 | + 'dismissible' => true, | |
| 105 | + ) | |
| 106 | + ); | |
| 103 | 107 | } |