Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://develop.svn.wordpress.org/trunk"
},
"gutenberg": {
"sha": "3a4e8d1418d25da83b70158bcaabf65580690b6b",
"sha": "a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd",
"ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build"
},
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/assets/script-loader-packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
'wp-url',
'wp-warning'
),
'version' => '515bcc5a2962232ccea7'
'version' => '89931f90e4df5eb5f8a3'
),
'customize-widgets.js' => array(
'dependencies' => array(
Expand Down Expand Up @@ -381,7 +381,7 @@
'import' => 'static'
)
),
'version' => '1975171eba5481ff37cd'
'version' => '28ef50b859708963e197'
),
'edit-site.js' => array(
'dependencies' => array(
Expand Down Expand Up @@ -519,7 +519,7 @@
'import' => 'static'
)
),
'version' => '77209b33a51951b61574'
'version' => '37faadbdf6c40cb0c71c'
),
'element.js' => array(
'dependencies' => array(
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/assets/script-modules-packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
'dependencies' => array(

),
'version' => '4d2a3a72c7410d548881'
'version' => 'efaa5193bbad9c60ffd1'
),
'interactivity-router/full-page.js' => array(
'dependencies' => array(
Expand Down
29 changes: 26 additions & 3 deletions src/wp-includes/build/pages/font-library/page-wp-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,35 @@ function wp_font_library_wp_admin_enqueue_scripts( $hook_suffix ) {
// 2. It initializes the boot module as an inline script.
wp_register_script( 'font-library-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );

// Add inline script to initialize the app using initSinglePage (no menuItems)
/*
* Add inline script to initialize the app using initSinglePage (no menuItems).
* The dynamic import is deferred until DOMContentLoaded so that all classic
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
* wp-theme, etc.) have finished parsing and executing before the boot module
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
* against the classic-script-printing pass on fast CDN-fronted hosts in
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
*/
$init_js_function = <<<'JS'
( mountId, routes ) => {
const run = async () => {
const mod = await import( "@wordpress/boot" );
mod.initSinglePage( { mountId, routes } );
};
if ( document.readyState === "loading" ) {
document.addEventListener( "DOMContentLoaded", run );
} else {
run();
}
}
JS;
wp_add_inline_script(
'font-library-wp-admin-prerequisites',
sprintf(
'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));',
'font-library-wp-admin-app',
'( %s )( %s, %s );',
$init_js_function,
wp_json_encode( 'font-library-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
)
);
Expand Down
29 changes: 26 additions & 3 deletions src/wp-includes/build/pages/options-connectors/page-wp-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,35 @@ function wp_options_connectors_wp_admin_enqueue_scripts( $hook_suffix ) {
// 2. It initializes the boot module as an inline script.
wp_register_script( 'options-connectors-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );

// Add inline script to initialize the app using initSinglePage (no menuItems)
/*
* Add inline script to initialize the app using initSinglePage (no menuItems).
* The dynamic import is deferred until DOMContentLoaded so that all classic
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
* wp-theme, etc.) have finished parsing and executing before the boot module
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
* against the classic-script-printing pass on fast CDN-fronted hosts in
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
*/
$init_js_function = <<<'JS'
( mountId, routes ) => {
const run = async () => {
const mod = await import( "@wordpress/boot" );
mod.initSinglePage( { mountId, routes } );
};
if ( document.readyState === "loading" ) {
document.addEventListener( "DOMContentLoaded", run );
} else {
run();
}
}
JS;
wp_add_inline_script(
'options-connectors-wp-admin-prerequisites',
sprintf(
'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));',
'options-connectors-wp-admin-app',
'( %s )( %s, %s );',
$init_js_function,
wp_json_encode( 'options-connectors-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
)
);
Expand Down
Loading