PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | jetpack_vendor/automattic/jetpack-backup/actions.php +21 -2 13.2.4 → 16.3-beta View file →
@@ -22,11 +22,30 @@
22 22 $add_action = $add_filter;
23 23 }
24 24
25 25 // Clean up expired Helper Scripts from a scheduled event.
26 -$add_action( 'jetpack_backup_cleanup_helper_scripts', array( 'Automattic\\Jetpack\\Backup\\V0003\\Helper_Script_Manager', 'cleanup_expired_helper_scripts' ) );
26 +$add_action( 'jetpack_backup_cleanup_helper_scripts', array( 'Automattic\\Jetpack\\Backup\\V0005\\Helper_Script_Manager', 'cleanup_expired_helper_scripts' ) );
27 27
28 28 // Register REST routes.
29 -$add_action( 'rest_api_init', array( 'Automattic\\Jetpack\\Backup\\V0003\\REST_Controller', 'register_rest_routes' ) );
29 +$add_action( 'rest_api_init', array( 'Automattic\\Jetpack\\Backup\\V0005\\REST_Controller', 'register_rest_routes' ) );
30 30
31 31 // Set up package version hook.
32 32 $add_filter( 'jetpack_package_versions', 'Automattic\\Jetpack\\Backup\\Package_Version::send_package_version_to_tracker' );
33 +
34 +// Register Jetpack Backup abilities with the WordPress Abilities API at autoload
35 +// time so the surface is available in any consumer that loads this package
36 +// (both the standalone Jetpack Backup plugin and the Jetpack plugin). The
37 +// `jetpack_wp_abilities_enabled` filter (default false) gates registration,
38 +// so this is a no-op until a site opts in.
39 +$add_action(
40 + 'plugins_loaded',
41 + static function () {
42 + if ( ! apply_filters( 'jetpack_wp_abilities_enabled', false ) ) {
43 + return;
44 + }
45 + if ( ! class_exists( \Automattic\Jetpack\Backup\V0005\Abilities\Backup_Abilities::class ) ) {
46 + return;
47 + }
48 + \Automattic\Jetpack\Backup\V0005\Abilities\Backup_Abilities::init();
49 + },
50 + 20
51 +);