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 / friend-message-received-text.php

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

31 lines 1.0 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 HTML 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 );
19 echo PHP_EOL;
20
21 // translators: %s is a username.
22 printf( __( 'We just received a message from %s:', 'friends' ), $args['friend_user']->display_name );
23 echo PHP_EOL . PHP_EOL;
24
25 echo $quoted_text;
26
27 esc_html_e( 'Open the conversation to respond.', 'friends' );
28 echo PHP_EOL . PHP_EOL;
29
30 echo $args['message_url'];
31