You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo'<p>'.__( 'Howdy! Upload your WordPress options JSON file and we’ll import the desired data. You’ll have a chance to review the data prior to import.', 'wp-options-importer' ).'</p>';
283
-
echo'<p>'.__( 'Choose a JSON (.json) file to upload, then click Upload file and import.', 'wp-options-importer' ).'</p>';
282
+
echo'<p>'.esc_html__( 'Howdy! Upload your WordPress options JSON file and we’ll import the desired data. You’ll have a chance to review the data prior to import.', 'wp-options-importer' ).'</p>';
283
+
echo'<p>'.esc_html__( 'Choose a JSON (.json) file to upload, then click Upload file and import.', 'wp-options-importer' ).'</p>';
@@ -297,15 +297,15 @@ private function handle_upload() {
297
297
298
298
if ( isset( $file['error'] ) ) {
299
299
return$this->error_message(
300
-
__( 'Sorry, there has been an error.', 'wp-options-importer' ),
300
+
esc_html__( 'Sorry, there has been an error.', 'wp-options-importer' ),
301
301
esc_html( $file['error'] )
302
302
);
303
303
}
304
304
305
305
if ( ! isset( $file['file'], $file['id'] ) ) {
306
306
return$this->error_message(
307
-
__( 'Sorry, there has been an error.', 'wp-options-importer' ),
308
-
__( 'The file did not upload properly. Please try again.', 'wp-options-importer' )
307
+
esc_html__( 'Sorry, there has been an error.', 'wp-options-importer' ),
308
+
esc_html__( 'The file did not upload properly. Please try again.', 'wp-options-importer' )
309
309
);
310
310
}
311
311
@@ -314,16 +314,16 @@ private function handle_upload() {
314
314
if ( ! file_exists( $file['file'] ) ) {
315
315
wp_import_cleanup( $this->file_id );
316
316
return$this->error_message(
317
-
__( 'Sorry, there has been an error.', 'wp-options-importer' ),
318
-
sprintf( __( 'The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem.', 'wp-options-importer' ), esc_html( $file['file'] ) )
317
+
esc_html__( 'Sorry, there has been an error.', 'wp-options-importer' ),
318
+
sprintf( esc_html__( 'The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem.', 'wp-options-importer' ), esc_html( $file['file'] ) )
319
319
);
320
320
}
321
321
322
322
if ( ! is_file( $file['file'] ) ) {
323
323
wp_import_cleanup( $this->file_id );
324
324
return$this->error_message(
325
-
__( 'Sorry, there has been an error.', 'wordpress-importer' ),
326
-
__( 'The path is not a file, please try again.', 'wordpress-importer' )
325
+
esc_html__( 'Sorry, there has been an error.', 'wordpress-importer' ),
326
+
esc_html__( 'The path is not a file, please try again.', 'wordpress-importer' )
327
327
);
328
328
}
329
329
@@ -531,26 +531,26 @@ private function pre_import() {
<p class="description"><?php_e( 'Caution! Importing all options with the override option set could break this site. For instance, it may change the site URL, the active theme, and active plugins. Only proceed if you know exactly what you’re doing.', 'wp-options-importer' ); ?></p>
590
+
<p class="description"><?phpesc_html_e( 'Caution! Importing all options with the override option set could break this site. For instance, it may change the site URL, the active theme, and active plugins. Only proceed if you know exactly what you’re doing.', 'wp-options-importer' ); ?></p>
if ( isset( $this->import_data['options'][ $option_name ] ) ) {
636
636
if ( in_array( $option_name, $blacklist ) ) {
637
-
echo"\n<p>" . sprintf( __( 'Skipped option `%s` because a plugin or theme does not allow it to be imported.', 'wp-options-importer' ), esc_html( $option_name ) ) . '</p>';
637
+
echo"\n<p>" . sprintf( esc_html__( 'Skipped option `%s` because a plugin or theme does not allow it to be imported.', 'wp-options-importer' ), esc_html( $option_name ) ) . '</p>';
echo"\n<p>" . sprintf( __( 'Failed to import option `%s`; it does not appear to be in the import file.', 'wp-options-importer' ), esc_html( $option_name ) ) . '</p>';
669
+
echo"\n<p>" . sprintf( esc_html__( 'Failed to import option `%s`; it does not appear to be in the import file.', 'wp-options-importer' ), esc_html( $option_name ) ) . '</p>';
return$this->error_message( __( 'Sorry, there has been an error. This file may not contain data or is corrupt.', 'wp-options-importer' ) );
687
+
return$this->error_message( esc_html__( 'Sorry, there has been an error. This file may not contain data or is corrupt.', 'wp-options-importer' ) );
688
688
}
689
689
690
690
if ( $this->import_data['version'] < $this->min_version ) {
691
691
$this->clean_up();
692
-
return$this->error_message( sprintf( __( 'This JSON file (version %s) is not supported by this version of the importer. Please update the plugin on the source, or download an older version of the plugin to this installation.', 'wp-options-importer' ), intval( $this->import_data['version'] ) ) );
692
+
return$this->error_message( sprintf( esc_html__( 'This JSON file (version %s) is not supported by this version of the importer. Please update the plugin on the source, or download an older version of the plugin to this installation.', 'wp-options-importer' ), intval( $this->import_data['version'] ) ) );
693
693
}
694
694
695
695
if ( $this->import_data['version'] > self::VERSION ) {
696
696
$this->clean_up();
697
-
return$this->error_message( sprintf( __( 'This JSON file (version %s) is from a newer version of this plugin and may not be compatible. Please update this plugin.', 'wp-options-importer' ), intval( $this->import_data['version'] ) ) );
697
+
return$this->error_message( sprintf( esc_html__( 'This JSON file (version %s) is from a newer version of this plugin and may not be compatible. Please update this plugin.', 'wp-options-importer' ), intval( $this->import_data['version'] ) ) );
698
698
}
699
699
700
700
if ( empty( $this->import_data['options'] ) ) {
701
701
$this->clean_up();
702
-
return$this->error_message( __( 'Sorry, there has been an error. This file appears valid, but does not seem to have any options.', 'wp-options-importer' ) );
702
+
return$this->error_message( esc_html__( 'Sorry, there has been an error. This file appears valid, but does not seem to have any options.', 'wp-options-importer' ) );
0 commit comments