Make WordPress Core

Changeset 59436


Ignore:
Timestamp:
11/20/2024 03:27:04 PM (11 days ago)
Author:
desrosj
Message:

Interactivity API: Remove redundant server state from Interactivity Router.

Remove the workaround for a bug that was fixed in https://github.com/WordPress/gutenberg/pull/66183. Previously, if the store was not initialized with a minimal navigation object, the interactivity-router script module would error.

Reviewed by desrosj.
Merges [59416] to the 6.7 branch.

Props jonsurrell, czapla, gziolo.
Fixes #62465.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/src/wp-includes/interactivity-api/class-wp-interactivity-api.php

    r59404 r59436  
    10911091            $this->has_processed_router_region = true;
    10921092
    1093             /*
    1094              * Initialize the `core/router` store.
    1095              * If the store is not initialized like this with minimal
    1096              * navigation object, the interactivity-router script module
    1097              * errors.
    1098              */
    1099             $this->state(
    1100                 'core/router',
    1101                 array(
    1102                     'navigation' => new stdClass(),
    1103                 )
    1104             );
    1105 
    11061093            // Enqueues as an inline style.
    11071094            wp_register_style( 'wp-interactivity-router-animations', false );
Note: See TracChangeset for help on using the changeset viewer.