From 02ca107d268a71fe63df918d0873516e12195978 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 24 Sep 2024 13:36:03 +0200 Subject: [PATCH] Revert "Remove localized strings from state" This reverts commit 2d8401fbe376bc77fb5c51d8991b61e6b27ca2c6. --- .../class-wp-interactivity-api.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php index eab85e6b361da..1f4c5aeb9efba 100644 --- a/src/wp-includes/interactivity-api/class-wp-interactivity-api.php +++ b/src/wp-includes/interactivity-api/class-wp-interactivity-api.php @@ -1031,6 +1031,19 @@ private function data_wp_router_region_processor( WP_Interactivity_API_Directive if ( 'enter' === $mode && ! $this->has_processed_router_region ) { $this->has_processed_router_region = true; + // Initialize the `core/router` store. + $this->state( + 'core/router', + array( + 'navigation' => array( + 'texts' => array( + 'loading' => __( 'Loading page, please wait.' ), + 'loaded' => __( 'Page Loaded.' ), + ), + ), + ) + ); + // Enqueues as an inline style. wp_register_style( 'wp-interactivity-router-animations', false ); wp_add_inline_style( 'wp-interactivity-router-animations', $this->get_router_animation_styles() );