From f5db16738e8795eefbf7520b67b4251fdb4eee42 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 26 May 2019 12:35:51 +0000 Subject: [PATCH] Administration: Merge similar "file does not exist" messages in plugin and theme editors. Props ramiy. Fixes #47249. Built from https://develop.svn.wordpress.org/trunk@45431 git-svn-id: http://core.svn.wordpress.org/trunk@45242 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/file.php | 2 +- wp-admin/plugin-editor.php | 2 +- wp-admin/theme-editor.php | 2 +- wp-includes/version.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 4ee1376207..0a263ee1ef 100644 --- a/wp-admin/includes/file.php +++ b/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/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index a38dd39f01..315b0d46be 100644 --- a/wp-admin/plugin-editor.php +++ b/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/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 25769b2ec9..f845f5eed8 100644 --- a/wp-admin/theme-editor.php +++ b/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 : ?>
diff --git a/wp-includes/version.php b/wp-includes/version.php index 293b9455d1..2566080bcc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45430'; +$wp_version = '5.3-alpha-45431'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.