Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JITM: Remove JITM from Jetpack Stats dashboard (Preparation to use embedded JITM) #39714

Merged
merged 14 commits into from
Oct 15, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

JITM: expose function to render message
13 changes: 13 additions & 0 deletions projects/packages/stats-admin/src/class-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ 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 ) {
if ( 'jetpack_page_stats' === $screen_id ) {
return false;
}
return $show;
},
10,
2
);
}

/**
Expand Down
Loading