I18n: Standardize the script paths for blocks
When providing file paths to scripts (editorScript, script or viewScript), when there is a trailing ./ included then there was a different md5 generated for the file that didn't match the one used with the file generated in the translations folder. Props Rahe. See #54797. Built from https://develop.svn.wordpress.org/trunk@52699 git-svn-id: http://core.svn.wordpress.org/trunk@52288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8a62f7dc05
commit
a877a9806b
|
@ -20,10 +20,14 @@ function remove_block_asset_path_prefix( $asset_handle_or_path ) {
|
|||
if ( 0 !== strpos( $asset_handle_or_path, $path_prefix ) ) {
|
||||
return $asset_handle_or_path;
|
||||
}
|
||||
return substr(
|
||||
$path = substr(
|
||||
$asset_handle_or_path,
|
||||
strlen( $path_prefix )
|
||||
);
|
||||
if ( strpos( $path, './' ) === 0 ) {
|
||||
$path = substr( $path, 2 );
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52698';
|
||||
$wp_version = '6.0-alpha-52699';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue