Blender-org web-assets v2 upgrade #104116

Merged
Márton Lente merged 56 commits from web-assets-v2-upgrade into main 2024-08-13 17:27:59 +02:00
Showing only changes of commit d41aac3af9 - Show all commits

View File

@ -6,8 +6,15 @@
$wp_search_and_replace_path = get_template_directory() . '/assets_shared/dev-utils/wp-search-and-replace.php'; $wp_search_and_replace_path = get_template_directory() . '/assets_shared/dev-utils/wp-search-and-replace.php';
// Set path to the search and replace map file base // Set path to the search and replace map file
if (isset($_GET['post']) && $_GET['post'] == 'true') {
// Use the following map file for post-upgrade search and replace
$map_file_name_path = get_template_directory() . '/assets_shared/dev-utils/search-and-replace-map-v2-upgrade-post-wp.txt';
} else {
$map_file_name_path = get_template_directory() . '/assets_shared/dev-utils/search-and-replace-map-v2-upgrade-wp.txt'; $map_file_name_path = get_template_directory() . '/assets_shared/dev-utils/search-and-replace-map-v2-upgrade-wp.txt';
}
echo "<p><strong>Using the following map file:</strong><br>" . $map_file_name_path . "</p><hr>";
include $wp_search_and_replace_path; include $wp_search_and_replace_path;
@ -17,12 +24,3 @@ if (isset($_GET['drymode']) && $_GET['drymode'] == 'true') {
} }
wp_search_and_replace($map_file_name_path, $dry_mode); wp_search_and_replace($map_file_name_path, $dry_mode);
echo "<p><strong>Base search and replace</strong> has been executed using the map file: " . $map_file_name_path . "</p><hr>";
// Reset path to the search and replace map file post
$map_file_name_path = get_template_directory() . '/assets_shared/dev-utils/search-and-replace-map-v2-upgrade-post-wp.txt';
wp_search_and_replace($map_file_name_path, $dry_mode);
echo "<p><strong>Post search and replace</strong> has been executed using the map file: " . $map_file_name_path . "</p><hr>";