--- a/wp/wp-includes/class-wp-recovery-mode-email-service.php Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/class-wp-recovery-mode-email-service.php Wed Sep 21 18:19:35 2022 +0200
@@ -75,7 +75,7 @@
}
$err_message = sprintf(
- /* translators: 1. Last sent as a human time diff, 2. Wait time as a human time diff. */
+ /* translators: 1: Last sent as a human time diff, 2: Wait time as a human time diff. */
__( 'A recovery link was already sent %1$s ago. Please wait another %2$s before requesting a new email.' ),
human_time_diff( $last_sent ),
human_time_diff( $last_sent + $rate_limit )
@@ -194,19 +194,29 @@
);
$email = array(
- 'to' => $this->get_recovery_mode_email_address(),
+ 'to' => $this->get_recovery_mode_email_address(),
/* translators: %s: Site title. */
- 'subject' => __( '[%s] Your Site is Experiencing a Technical Issue' ),
- 'message' => $message,
- 'headers' => '',
+ 'subject' => __( '[%s] Your Site is Experiencing a Technical Issue' ),
+ 'message' => $message,
+ 'headers' => '',
+ 'attachments' => '',
);
/**
- * Filter the contents of the Recovery Mode email.
+ * Filters the contents of the Recovery Mode email.
*
* @since 5.2.0
+ * @since 5.6.0 The `$email` argument includes the `attachments` key.
*
- * @param array $email Used to build wp_mail().
+ * @param array $email {
+ * Used to build a call to wp_mail().
+ *
+ * @type string|array $to Array or comma-separated list of email addresses to send message.
+ * @type string $subject Email subject
+ * @type string $message Message contents
+ * @type string|array $headers Optional. Additional headers.
+ * @type string|array $attachments Optional. Files to attach.
+ * }
* @param string $url URL to enter recovery mode.
*/
$email = apply_filters( 'recovery_mode_email', $email, $url );
@@ -215,7 +225,8 @@
$email['to'],
wp_specialchars_decode( sprintf( $email['subject'], $blogname ) ),
$email['message'],
- $email['headers']
+ $email['headers'],
+ $email['attachments']
);
if ( $switched_locale ) {
@@ -278,7 +289,7 @@
* @since 5.3.0
*
* @param array $extension The extension that caused the error.
- * @return bool|array A plugin array {@see get_plugins()} or `false` if no plugin was found.
+ * @return array|false A plugin array {@see get_plugins()} or `false` if no plugin was found.
*/
private function get_plugin( $extension ) {
if ( ! function_exists( 'get_plugins' ) ) {
@@ -320,8 +331,8 @@
}
$debug = array(
- /* translators: %s: Current WordPress version number. */
'wp' => sprintf(
+ /* translators: %s: Current WordPress version number. */
__( 'WordPress version %s' ),
$wp_version
),