debug-bar
7 years ago
3rd-party.php
7 years ago
bbpress.php
8 years ago
beaverbuilder.php
8 years ago
bitly.php
9 years ago
buddypress.php
10 years ago
class.jetpack-amp-support.php
7 years ago
class.jetpack-modules-overrides.php
8 years ago
debug-bar.php
8 years ago
domain-mapping.php
8 years ago
polldaddy.php
9 years ago
qtranslate-x.php
8 years ago
vaultpress.php
7 years ago
woocommerce-services.php
8 years ago
woocommerce.php
7 years ago
wpml.php
8 years ago
vaultpress.php
43 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Notify user that VaultPress has been disabled. Hide VaultPress notice that requested attention. |
| 5 | * |
| 6 | * @since 5.8 |
| 7 | */ |
| 8 | function jetpack_vaultpress_rewind_enabled_notice() { |
| 9 | // The deactivation is performed here because there may be pages that admin_init runs on, |
| 10 | // such as admin_ajax, that could deactivate the plugin without showing this notification. |
| 11 | deactivate_plugins( 'vaultpress/vaultpress.php' ); |
| 12 | |
| 13 | // Remove WP core notice that says that the plugin was activated. |
| 14 | if ( isset( $_GET['activate'] ) ) { |
| 15 | unset( $_GET['activate'] ); |
| 16 | } |
| 17 | ?> |
| 18 | <div class="notice notice-success vp-deactivated"> |
| 19 | <h2 style="margin-bottom: 0.25em;"><?php _e( 'Jetpack is now handling your backups.', 'jetpack' ); ?></h2> |
| 20 | <p><?php _e( 'VaultPress is no longer needed and has been deactivated.', 'jetpack' ); ?></p> |
| 21 | </div> |
| 22 | <style>#vp-notice{display:none;}</style> |
| 23 | <?php |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * If Backup & Scan is enabled, remove its entry in sidebar, deactivate VaultPress, and show a notification. |
| 28 | * |
| 29 | * @since 5.8 |
| 30 | */ |
| 31 | function jetpack_vaultpress_rewind_check() { |
| 32 | if ( Jetpack::is_active() && |
| 33 | Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' ) && |
| 34 | Jetpack::is_rewind_enabled() |
| 35 | ) { |
| 36 | remove_submenu_page( 'jetpack', 'vaultpress' ); |
| 37 | |
| 38 | add_action( 'admin_notices', 'jetpack_vaultpress_rewind_enabled_notice' ); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | add_action( 'admin_init', 'jetpack_vaultpress_rewind_check', 11 ); |
| 43 |