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
This commit is contained in:
parent
5ec3c66bd3
commit
f5db16738e
|
@ -460,7 +460,7 @@ function wp_edit_theme_plugin_file( $args ) {
|
||||||
|
|
||||||
// Ensure file is real.
|
// Ensure file is real.
|
||||||
if ( ! is_file( $real_file ) ) {
|
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.
|
// Ensure file extension is allowed.
|
||||||
|
|
|
@ -105,7 +105,7 @@ if ( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
||||||
$editable_extensions = wp_get_plugin_file_editable_extensions( $plugin );
|
$editable_extensions = wp_get_plugin_file_editable_extensions( $plugin );
|
||||||
|
|
||||||
if ( ! is_file( $real_file ) ) {
|
if ( ! is_file( $real_file ) ) {
|
||||||
wp_die( sprintf( '<p>%s</p>', __( 'No such file exists! Double check the name and try again.' ) ) );
|
wp_die( sprintf( '<p>%s</p>', __( 'File does not exist! Please double check the name and try again.' ) ) );
|
||||||
} else {
|
} else {
|
||||||
// Get the extension of the file
|
// Get the extension of the file
|
||||||
if ( preg_match( '/\.([^.]+)$/', $real_file, $matches ) ) {
|
if ( preg_match( '/\.([^.]+)$/', $real_file, $matches ) ) {
|
||||||
|
|
|
@ -272,7 +272,7 @@ if ( $theme->errors() ) {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( $error ) :
|
if ( $error ) :
|
||||||
echo '<div class="error"><p>' . __( 'Oops, no such file exists! Double check the name and try again, merci.' ) . '</p></div>';
|
echo '<div class="error"><p>' . __( 'File does not exist! Please double check the name and try again.' ) . '</p></div>';
|
||||||
else :
|
else :
|
||||||
?>
|
?>
|
||||||
<form name="template" id="template" action="theme-editor.php" method="post">
|
<form name="template" id="template" action="theme-editor.php" method="post">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue