diff --git a/includes/Migration.php b/includes/Migration.php index bf2f0d5..9d0802f 100644 --- a/includes/Migration.php +++ b/includes/Migration.php @@ -149,5 +149,11 @@ public function wordpress_migration_tool() { public function set_import_tools() { \wp_enqueue_script( 'nfd_migration_tool', NFD_MIGRATION_PLUGIN_URL . 'vendor/newfold-labs/wp-module-migration/includes/import-tools-changes.js', array( 'jquery' ), '1.0', true ); wp_enqueue_style( 'nfd_migration_tool', NFD_MIGRATION_PLUGIN_URL . 'vendor/newfold-labs/wp-module-migration/includes/styles.css', array(), '1.0', 'all' ); + $migration_data = array( + 'migration_title' => __( 'Let\'s migrate your existing site.', 'wp-module-migration' ), + 'migration_description' => __( 'Please wait a few seconds while we get your new account ready to import your existing WordPress site.', 'wp-module-migration' ), + 'wordpress_title' => __( 'WordPress Content', 'wp-module-migration' ) + ); + wp_localize_script( 'nfd_migration_tool', 'migration', $migration_data ); } } diff --git a/includes/import-tools-changes.js b/includes/import-tools-changes.js index 6687473..df68da8 100644 --- a/includes/import-tools-changes.js +++ b/includes/import-tools-changes.js @@ -1,18 +1,19 @@ -const importer_titles = document.getElementsByClassName("importer-title"); +//Changes the text of the wordpress to wordpress content in import + const importer_titles = document.getElementsByClassName("importer-title"); if( importer_titles ){ [...importer_titles].forEach((val, index) => { if( val?.outerText === 'WordPress'){ - document.getElementsByClassName("importer-title")[index].innerText = 'WordPress Content' - val?.outerText === 'WordPress Content' + document.getElementsByClassName("importer-title")[index].innerText = migration.wordpress_title } }) } + // designs a modal for migration tool const node = document.createElement("div"); -node.innerHTML = "