From 85e517ca48fcf70c58a324fff68ade0e67d0c296 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 26 May 2019 12:34:09 +0000 Subject: [PATCH] Administration: Merge similar "file does not exist" messages in plugin and theme editors. Props ramiy. Fixes #47249. git-svn-id: https://develop.svn.wordpress.org/trunk@45431 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/file.php | 2 +- src/wp-admin/plugin-editor.php | 2 +- src/wp-admin/theme-editor.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index 4ee1376207..0a263ee1ef 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -460,7 +460,7 @@ function wp_edit_theme_plugin_file( $args ) { // Ensure file is real. if ( ! is_file( $real_file ) ) { - return new WP_Error( 'file_does_not_exist', __( 'No such file exists! Double check the name and try again.' ) ); + return new WP_Error( 'file_does_not_exist', __( 'File does not exist! Please double check the name and try again.' ) ); } // Ensure file extension is allowed. diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php index a38dd39f01..315b0d46be 100644 --- a/src/wp-admin/plugin-editor.php +++ b/src/wp-admin/plugin-editor.php @@ -105,7 +105,7 @@ if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) { $editable_extensions = wp_get_plugin_file_editable_extensions( $plugin ); if ( ! is_file( $real_file ) ) { - wp_die( sprintf( '

%s

', __( 'No such file exists! Double check the name and try again.' ) ) ); + wp_die( sprintf( '

%s

', __( 'File does not exist! Please double check the name and try again.' ) ) ); } else { // Get the extension of the file if ( preg_match( '/\.([^.]+)$/', $real_file, $matches ) ) { diff --git a/src/wp-admin/theme-editor.php b/src/wp-admin/theme-editor.php index 25769b2ec9..f845f5eed8 100644 --- a/src/wp-admin/theme-editor.php +++ b/src/wp-admin/theme-editor.php @@ -272,7 +272,7 @@ if ( $theme->errors() ) {

' . __( 'Oops, no such file exists! Double check the name and try again, merci.' ) . '

'; + echo '

' . __( 'File does not exist! Please double check the name and try again.' ) . '

'; else : ?>