| @@ -4,8 +4,12 @@ | ||
| 4 | 4 | * |
| 5 | 5 | * @package automattic/jetpack |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 9 | + exit( 0 ); | |
| 10 | +} | |
| 11 | + | |
| 8 | 12 | /* Jetpack Connection Testing Framework */ |
| 9 | 13 | require_once __DIR__ . '/debugger/class-jetpack-cxn-test-base.php'; |
| 10 | 14 | /* Jetpack Connection Tests */ |
| 11 | 15 | require_once __DIR__ . '/debugger/class-jetpack-cxn-tests.php'; |
| @@ -12,10 +16,32 @@ | ||
| 12 | 16 | /* Jetpack Debug Data */ |
| 13 | 17 | require_once __DIR__ . '/debugger/class-jetpack-debug-data.php'; |
| 14 | 18 | /* The "In-Plugin Debugger" admin page. */ |
| 15 | 19 | require_once __DIR__ . '/debugger/class-jetpack-debugger.php'; |
| 16 | -/* General Debugging Functions */ | |
| 17 | -require_once __DIR__ . '/debugger/debug-functions.php'; | |
| 18 | 20 | |
| 19 | 21 | add_filter( 'debug_information', array( 'Jetpack_Debug_Data', 'core_debug_data' ) ); |
| 20 | -add_filter( 'site_status_tests', 'jetpack_debugger_site_status_tests' ); | |
| 21 | -add_action( 'wp_ajax_health-check-jetpack-local_testing_suite', 'jetpack_debugger_ajax_local_testing_suite' ); | |
| 22 | + | |
| 23 | +/* | |
| 24 | + * Use the beta support group URL for development versions of Jetpack. | |
| 25 | + */ | |
| 26 | +add_filter( | |
| 27 | + 'jetpack_connection_support_url', | |
| 28 | + function ( $url ) { | |
| 29 | + if ( Jetpack::is_development_version() ) { | |
| 30 | + return Automattic\Jetpack\Redirect::get_url( 'jetpack-contact-support-beta-group' ); | |
| 31 | + } | |
| 32 | + return $url; | |
| 33 | + } | |
| 34 | +); | |
| 35 | + | |
| 36 | +/* | |
| 37 | + * Provide the Jetpack reconnect URL for connection health test failures. | |
| 38 | + */ | |
| 39 | +add_filter( | |
| 40 | + 'jetpack_connection_reconnect_url', | |
| 41 | + function () { | |
| 42 | + return admin_url( 'admin.php?page=jetpack#/reconnect' ); | |
| 43 | + } | |
| 44 | +); | |
| 45 | + | |
| 46 | +// Note: Jetpack-specific test registration via jetpack_connection_tests_loaded | |
| 47 | +// has moved to class.jetpack.php so it runs on all requests (not just admin). | |