mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
General: Error messages improvements in /wp-includes
files.
This changeset improves a bunch of error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information. Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson. Fixes #43622. Built from https://develop.svn.wordpress.org/trunk@59790 git-svn-id: http://core.svn.wordpress.org/trunk@59132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c5293a0be9
commit
6309ca8f17
@ -454,7 +454,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
|
||||
if ( ! $message ) {
|
||||
$message = __( 'Something went wrong.' );
|
||||
$message = __( 'An error occurred while customizing. Please refresh the page and try again.' );
|
||||
}
|
||||
|
||||
if ( $this->messenger_channel ) {
|
||||
|
@ -4031,7 +4031,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
}
|
||||
|
||||
if ( ! $comment_id ) {
|
||||
return new IXR_Error( 403, __( 'Something went wrong.' ) );
|
||||
return new IXR_Error( 403, __( 'An error occurred while processing your comment. Please ensure all fields are filled correctly and try again.' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5051,7 +5051,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$posts_list = wp_get_recent_posts( $query );
|
||||
|
||||
if ( ! $posts_list ) {
|
||||
$this->error = new IXR_Error( 500, __( 'Either there are no posts, or something went wrong.' ) );
|
||||
$this->error = new IXR_Error( 500, __( 'No posts found or an error occurred while retrieving posts.' ) );
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
@ -6584,7 +6584,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$posts_list = wp_get_recent_posts( $query );
|
||||
|
||||
if ( ! $posts_list ) {
|
||||
$this->error = new IXR_Error( 500, __( 'Either there are no posts, or something went wrong.' ) );
|
||||
$this->error = new IXR_Error( 500, __( 'No posts found or an error occurred while retrieving posts.' ) );
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
|
@ -3672,7 +3672,7 @@ function get_allowed_mime_types( $user = null ) {
|
||||
*/
|
||||
function wp_nonce_ays( $action ) {
|
||||
// Default title and response code.
|
||||
$title = __( 'Something went wrong.' );
|
||||
$title = __( 'An error occurred.' );
|
||||
$response_code = 403;
|
||||
|
||||
if ( 'log-out' === $action ) {
|
||||
|
@ -810,7 +810,7 @@ function wp_default_scripts( $scripts ) {
|
||||
'wpAjax',
|
||||
array(
|
||||
'noPerm' => __( 'Sorry, you are not allowed to do that.' ),
|
||||
'broken' => __( 'Something went wrong.' ),
|
||||
'broken' => __( 'An error occurred while processing your request. Please try again later.' ),
|
||||
)
|
||||
);
|
||||
|
||||
@ -1292,7 +1292,7 @@ function wp_default_scripts( $scripts ) {
|
||||
'close' => __( 'Close' ),
|
||||
'action' => __( 'Action' ),
|
||||
'discardChanges' => __( 'Discard changes' ),
|
||||
'cheatin' => __( 'Something went wrong.' ),
|
||||
'cheatin' => __( 'An error occurred. Please try again later.' ),
|
||||
'notAllowedHeading' => __( 'You need a higher level of permission.' ),
|
||||
'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ),
|
||||
'previewIframeTitle' => __( 'Site Preview' ),
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59789';
|
||||
$wp_version = '6.8-alpha-59790';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
10
wp-mail.php
10
wp-mail.php
@ -39,7 +39,15 @@ if ( ! defined( 'WP_MAIL_INTERVAL' ) ) {
|
||||
$last_checked = get_transient( 'mailserver_last_checked' );
|
||||
|
||||
if ( $last_checked ) {
|
||||
wp_die( __( 'Slow down cowboy, no need to check for new mails so often!' ) );
|
||||
wp_die(
|
||||
sprintf(
|
||||
// translators: %s human readable rate limit.
|
||||
__( 'Email checks are rate limited to once every %s.' ),
|
||||
human_time_diff( time() - WP_MAIL_INTERVAL, time() )
|
||||
),
|
||||
__( 'Slow down, no need to check for new mails so often!' ),
|
||||
429
|
||||
);
|
||||
}
|
||||
|
||||
set_transient( 'mailserver_last_checked', true, WP_MAIL_INTERVAL );
|
||||
|
Loading…
x
Reference in New Issue
Block a user