debug-bar
7 years ago
3rd-party.php
6 years ago
bbpress.php
6 years ago
beaverbuilder.php
8 years ago
bitly.php
9 years ago
buddypress.php
10 years ago
class-jetpack-bbpress-rest-api.php
6 years ago
class.jetpack-amp-support.php
6 years ago
class.jetpack-modules-overrides.php
8 years ago
debug-bar.php
8 years ago
domain-mapping.php
6 years ago
polldaddy.php
9 years ago
qtranslate-x.php
8 years ago
vaultpress.php
6 years ago
woocommerce-services.php
6 years ago
woocommerce.php
6 years ago
wpml.php
8 years ago
vaultpress.php
63 lines
| 1 | <?php |
| 2 | |
| 3 | use Automattic\Jetpack\Redirect; |
| 4 | |
| 5 | /** |
| 6 | * Notify user that VaultPress has been disabled. Hide VaultPress notice that requested attention. |
| 7 | * |
| 8 | * @since 5.8 |
| 9 | */ |
| 10 | function jetpack_vaultpress_rewind_enabled_notice() { |
| 11 | // The deactivation is performed here because there may be pages that admin_init runs on, |
| 12 | // such as admin_ajax, that could deactivate the plugin without showing this notification. |
| 13 | deactivate_plugins( 'vaultpress/vaultpress.php' ); |
| 14 | |
| 15 | // Remove WP core notice that says that the plugin was activated. |
| 16 | if ( isset( $_GET['activate'] ) ) { |
| 17 | unset( $_GET['activate'] ); |
| 18 | } |
| 19 | ?> |
| 20 | <div class="notice notice-success is-dismissible vp-deactivated"> |
| 21 | <p style="margin-bottom: 0.25em;"><strong><?php esc_html_e( 'Jetpack is now handling your backups.', 'jetpack' ); ?></strong></p> |
| 22 | <p> |
| 23 | <?php esc_html_e( 'VaultPress is no longer needed and has been deactivated.', 'jetpack' ); ?> |
| 24 | <?php |
| 25 | echo sprintf( |
| 26 | wp_kses( |
| 27 | /* Translators: first variable is the full URL to the new dashboard */ |
| 28 | __( 'You can access your backups at <a href="%s" target="_blank" rel="noopener noreferrer">this dashboard</a>.', 'jetpack' ), |
| 29 | array( |
| 30 | 'a' => array( |
| 31 | 'href' => array(), |
| 32 | 'target' => array(), |
| 33 | 'rel' => array(), |
| 34 | ), |
| 35 | ) |
| 36 | ), |
| 37 | esc_url( Redirect::get_url( 'calypso-backups' ) ) |
| 38 | ); |
| 39 | ?> |
| 40 | </p> |
| 41 | </div> |
| 42 | <style>#vp-notice{display:none;}</style> |
| 43 | <?php |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * If Backup & Scan is enabled, remove its entry in sidebar, deactivate VaultPress, and show a notification. |
| 48 | * |
| 49 | * @since 5.8 |
| 50 | */ |
| 51 | function jetpack_vaultpress_rewind_check() { |
| 52 | if ( Jetpack::is_active() && |
| 53 | Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' ) && |
| 54 | Jetpack::is_rewind_enabled() |
| 55 | ) { |
| 56 | remove_submenu_page( 'jetpack', 'vaultpress' ); |
| 57 | |
| 58 | add_action( 'admin_notices', 'jetpack_vaultpress_rewind_enabled_notice' ); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | add_action( 'admin_init', 'jetpack_vaultpress_rewind_check', 11 ); |
| 63 |