<?php /** * Handles VaultPress->Rewind transition by deactivating VaultPress when needed. * * @package automattic/jetpack */ use Automattic\Jetpack\Redirect; /** * Notify user that VaultPress has been disabled. Hide VaultPress notice that requested attention. * * @since 5.8 */ function jetpack_vaultpress_rewind_enabled_notice() { // The deactivation is performed here because there may be pages that admin_init runs on, // such as admin_ajax, that could deactivate the plugin without showing this notification. deactivate_plugins( 'vaultpress/vaultpress.php' ); // Remove WP core notice that says that the plugin was activated. unset( $_GET['activate'] ); // phpcs:ignore WordPress.Security.NonceVerification ?> <div class="notice notice-success is-dismissible vp-deactivated"> <p style="margin-bottom: 0.25em;"><strong><?php esc_html_e( 'Jetpack is now handling your backups.', 'jetpack' ); ?></strong></p> <p> <?php esc_html_e( 'VaultPress is no longer needed and has been deactivated.', 'jetpack' ); ?> <?php printf( wp_kses( /* Translators: first variable is the full URL to the new dashboard */ __( 'You can access your backups at <a href="%s" target="_blank" rel="noopener noreferrer">this dashboard</a>.', 'jetpack' ), array( 'a' => array( 'href' => array(), 'target' => array(), 'rel' => array(), ), ) ), esc_url( Redirect::get_url( 'calypso-backups' ) ) ); ?> </p> </div> <style>#vp-notice{display:none;}</style> <?php } /** * If Backup & Scan is enabled, remove its entry in sidebar, deactivate VaultPress, and show a notification. * * @since 5.8 */ function jetpack_vaultpress_rewind_check() { if ( Jetpack::is_connection_ready() && Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' ) && Jetpack::is_rewind_enabled() ) { remove_submenu_page( 'jetpack', 'vaultpress' ); add_action( 'admin_notices', 'jetpack_vaultpress_rewind_enabled_notice' ); } } add_action( 'admin_init', 'jetpack_vaultpress_rewind_check', 11 );
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
debug-bar | Folder | 0755 |
|
|
3rd-party.php | File | 3.17 KB | 0644 |
|
amp.php | File | 745 B | 0644 |
|
atomic.php | File | 1023 B | 0644 |
|
bbpress.php | File | 2.03 KB | 0644 |
|
beaverbuilder.php | File | 452 B | 0644 |
|
bitly.php | File | 982 B | 0644 |
|
buddypress.php | File | 503 B | 0644 |
|
class-domain-mapping.php | File | 4.12 KB | 0644 |
|
class-jetpack-bbpress-rest-api.php | File | 4.39 KB | 0644 |
|
class-salesforce-lead-form.php | File | 4.53 KB | 0644 |
|
class.jetpack-amp-support.php | File | 16.68 KB | 0644 |
|
creative-mail.php | File | 3.22 KB | 0644 |
|
crowdsignal.php | File | 815 B | 0644 |
|
debug-bar.php | File | 733 B | 0644 |
|
jetpack-backup.php | File | 2.72 KB | 0644 |
|
jetpack-boost.php | File | 2.79 KB | 0644 |
|
qtranslate-x.php | File | 634 B | 0644 |
|
vaultpress.php | File | 2.03 KB | 0644 |
|
web-stories.php | File | 974 B | 0644 |
|
woocommerce-services.php | File | 3.43 KB | 0644 |
|
woocommerce.php | File | 3.78 KB | 0644 |
|
wpml.php | File | 1.59 KB | 0644 |
|