diff --git a/src/wp-includes/class-wp-recovery-mode-email-service.php b/src/wp-includes/class-wp-recovery-mode-email-service.php
index 82bca75f17..24e904277f 100644
a
|
b
|
final class WP_Recovery_Mode_Email_Service { |
122 | 122 | $details = ''; |
123 | 123 | } |
124 | 124 | |
| 125 | /** |
| 126 | * Filters the support message sent with the the fatal error protection email. |
| 127 | * |
| 128 | * @since 5.2.0 |
| 129 | * |
| 130 | * @param $message string The Message to include in the email. |
| 131 | */ |
| 132 | $support = apply_filters( 'recovery_email_support_info', __( 'Please contact your host for assistance with investigating this issue further.' ) ); |
| 133 | |
| 134 | /* translators: Do not translate LINK, EXPIRES, CAUSE, DETAILS, SITEURL, PAGEURL, SUPPORT: those are placeholders. */ |
125 | 135 | $message = __( |
126 | | 'Howdy, |
| 136 | 'Howdy! |
127 | 137 | |
128 | | Your site recently crashed and may not be working as expected. |
| 138 | Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email. |
129 | 139 | ###CAUSE### |
130 | | Please click the link below to initiate recovery mode and fix the problem. |
| 140 | First, visit your website (###SITEURL###) and check for any visible issues. Next, visit the page where the error was caught (###PAGEURL###) and check for any visible issues. |
| 141 | |
| 142 | ###SUPPORT### |
| 143 | |
| 144 | If your site appears broken and you can\'t access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further. |
131 | 145 | |
132 | | This link expires in ###EXPIRES###. |
| 146 | ###LINK### |
133 | 147 | |
134 | | ###LINK### ###DETAILS### |
| 148 | To keep your site safe, this link will expire in ###EXPIRES###. Don\'t worry about that, though: a new link will be emailed to you if the error occurs again after it expires. |
135 | 149 | |
136 | | --The WordPress Team |
137 | | https://wordpress.org/ |
138 | | ' |
| 150 | ###DETAILS###' |
139 | 151 | ); |
140 | 152 | $message = str_replace( |
141 | 153 | array( |
… |
… |
https://wordpress.org/ |
143 | 155 | '###EXPIRES###', |
144 | 156 | '###CAUSE###', |
145 | 157 | '###DETAILS###', |
| 158 | '###SITEURL###', |
| 159 | '###PAGEURL###', |
| 160 | '###SUPPORT###', |
146 | 161 | ), |
147 | 162 | array( |
148 | 163 | $url, |
149 | 164 | human_time_diff( time() + $rate_limit ), |
150 | 165 | $cause ? "\n{$cause}\n" : "\n", |
151 | 166 | $details, |
| 167 | home_url( '/' ), |
| 168 | home_url( $_SERVER['REQUEST_URI'] ), |
| 169 | $support, |
152 | 170 | ), |
153 | 171 | $message |
154 | 172 | ); |
… |
… |
https://wordpress.org/ |
224 | 242 | $name = $plugins[ "{$extension['slug']}/{$extension['slug']}.php" ]['Name']; |
225 | 243 | } else { |
226 | 244 | foreach ( $plugins as $file => $plugin_data ) { |
227 | | if ( 0 === strpos( $file, "{$extension['slug']}/" ) ) { |
| 245 | if ( 0 === strpos( $file, "{$extension['slug']}/" ) || $file === $extension['slug'] ) { |
228 | 246 | $name = $plugin_data['Name']; |
229 | 247 | break; |
230 | 248 | } |
… |
… |
https://wordpress.org/ |
236 | 254 | } |
237 | 255 | |
238 | 256 | /* translators: %s: plugin name */ |
239 | | $cause = sprintf( __( 'This was caused by the following plugin: %s.' ), $name ); |
| 257 | $cause = sprintf( __( 'In this case, WordPress caught an error with one of your plugins, %s.' ), $name ); |
240 | 258 | } else { |
241 | 259 | $theme = wp_get_theme( $extension['slug'] ); |
242 | 260 | $name = $theme->exists() ? $theme->display( 'Name' ) : $extension['slug']; |
243 | 261 | |
244 | 262 | /* translators: %s: theme name */ |
245 | | $cause = sprintf( __( 'This was caused by the following theme: %s.' ), $name ); |
| 263 | $cause = sprintf( __( 'In this case, WordPress caught an error with your theme, %s.' ), $name ); |
246 | 264 | } |
247 | 265 | |
248 | 266 | return $cause; |
diff --git a/src/wp-includes/class-wp-recovery-mode.php b/src/wp-includes/class-wp-recovery-mode.php
index fc38afdb54..31d33d38fe 100644
a
|
b
|
class WP_Recovery_Mode { |
299 | 299 | * |
300 | 300 | * @since 5.2.0 |
301 | 301 | * |
302 | | * @param int $rate_limit Time to wait in seconds. Defaults to 4 hours. |
| 302 | * @param int $rate_limit Time to wait in seconds. Defaults to 1 day. |
303 | 303 | */ |
304 | | return apply_filters( 'recovery_mode_email_rate_limit', 4 * HOUR_IN_SECONDS ); |
| 304 | return apply_filters( 'recovery_mode_email_rate_limit', DAY_IN_SECONDS ); |
305 | 305 | } |
306 | 306 | |
307 | 307 | /** |