From 9f645c1912d445711d1b0c4192df50dcd96755da Mon Sep 17 00:00:00 2001 From: Jasper Kang Date: Fri, 11 Oct 2024 14:59:54 +1300 Subject: [PATCH] add comments --- projects/packages/stats-admin/src/class-main.php | 2 ++ projects/packages/stats-admin/src/class-odyssey-assets.php | 1 + 2 files changed, 3 insertions(+) diff --git a/projects/packages/stats-admin/src/class-main.php b/projects/packages/stats-admin/src/class-main.php index f22971fdf1bca..1a696914ef4a9 100644 --- a/projects/packages/stats-admin/src/class-main.php +++ b/projects/packages/stats-admin/src/class-main.php @@ -52,6 +52,8 @@ public static function init() { */ private function __construct() { add_action( 'rest_api_init', array( new REST_Controller(), 'register_rest_routes' ) ); + // Disable JITM assets on the Stats page. + // JITM is handled separately by Stats: https://github.com/Automattic/wp-calypso/pull/95273. add_filter( 'jetpack_display_jitms_on_screen', function ( $show, $screen_id ) { diff --git a/projects/packages/stats-admin/src/class-odyssey-assets.php b/projects/packages/stats-admin/src/class-odyssey-assets.php index eeaf3889f4ebe..b95ee45f410a0 100644 --- a/projects/packages/stats-admin/src/class-odyssey-assets.php +++ b/projects/packages/stats-admin/src/class-odyssey-assets.php @@ -72,6 +72,7 @@ public function load_admin_scripts( $asset_handle, $asset_name, $options = array 'before' ); + // Config data for JITM. wp_localize_script( $asset_handle, 'jitm_config',