mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Script Modules: prevent broken links by using includes_url.
[59083] introduced an issue where Script Modules registered src does not correctly respect the includes path. Before that change, script modules were registered using includes_url. The patch used a hard-coded path which breaks when sites are not served from the root, e.g. the site root is https://example.com/wp instead of https://example.com/. Follow-up to [59083]. Props nendeb55, jonsurrell, cbravobernal. Fixes #62146. Built from https://develop.svn.wordpress.org/trunk@59154 git-svn-id: http://core.svn.wordpress.org/trunk@58549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9b1e0766f7
commit
18f992af83
@ -169,7 +169,7 @@ function wp_default_script_modules() {
|
||||
break;
|
||||
}
|
||||
|
||||
$path = "/wp-includes/js/dist/script-modules/{$file_name}";
|
||||
$path = includes_url( "js/dist/script-modules/{$file_name}" );
|
||||
wp_register_script_module( $script_module_id, $path, $script_module_data['dependencies'], $script_module_data['version'] );
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-beta1-59153';
|
||||
$wp_version = '6.7-beta1-59154';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user