id; $screen->id = self::$page_id; } /** * Undo alias_screen_id(), since JITM builds its message path from the screen ID. * * @return void */ public static function restore_screen_id() { $screen = get_current_screen(); if ( ! $screen || null === self::$original_screen_id ) { return; } $screen->id = self::$original_screen_id; self::$original_screen_id = null; } /** * Enqueue the JS translation loader the route bundles need. * * Registered on every admin page but only enqueued when depended on, and the esbuild * bundles don't pull it in — without it every string renders untranslated. * * @return void */ public static function enqueue_i18n_loader() { if ( wp_script_is( 'wp-jp-i18n-loader', 'registered' ) ) { wp_enqueue_script( 'wp-jp-i18n-loader' ); } } }