Blender-org web-assets v2 upgrade #104116
@ -6,8 +6,15 @@
|
||||
|
||||
$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
|
||||
$map_file_name_path = get_template_directory() . '/assets_shared/dev-utils/search-and-replace-map-v2-upgrade-wp.txt';
|
||||
// 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';
|
||||
}
|
||||
|
||||
echo "<p><strong>Using the following map file:</strong><br>" . $map_file_name_path . "</p><hr>";
|
||||
|
||||
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);
|
||||
|
||||
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>";
|
||||
|
Loading…
Reference in New Issue
Block a user