PluginProbe
Friends / 4.2.1
Friends v4.2.1
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
friends / templates / email / unknown-friend-message-received-text.php

unknown-friend-message-received-text.php in Friends 4.2.1, at templates/email/unknown-friend-message-received-text.php

32 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template contains the text for the Friend Message Received notification e-mail.
4 *
5 * @version 1.0
6 * @package Friends
7 */
8
9 $ensure_linebreaks = preg_replace( '/\<br(\s*)?\/?\>/i', PHP_EOL, $args['message'] );
10 $plain_text = wp_strip_all_tags( $ensure_linebreaks );
11 $normalized_whitespace = preg_replace( '/(' . PHP_EOL . '\s*' . PHP_EOL . ')+/m', PHP_EOL . PHP_EOL, $plain_text );
12 $quoted_text = '> ' . str_replace( PHP_EOL, PHP_EOL . '> ', trim( $normalized_whitespace ) );
13
14 // This is a text e-mail, not a place for HTML escaping.
15 // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
16
17 // translators: %s is a user display name.
18 printf( __( 'Hi %s!', 'friends' ), $args['user']->display_name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
19 echo PHP_EOL;
20
21 // translators: %s is a username.
22 printf( __( 'We just received a message from %s:', 'friends' ), $args['sender_name'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
23 echo PHP_EOL . PHP_EOL;
24
25 echo $quoted_text;
26
27 // translators: %s is a URL.
28 printf( wp_strip_all_tags( __( 'Maybe you want to <a href=%s>follow them</a> to respond?', 'friends' ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
29 echo PHP_EOL . PHP_EOL;
30
31 echo home_url( '?add-friend=' . esc_url( $args['feed_url'] ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
32