PluginProbe
Friends / 4.2.2
Friends v4.2.2
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 / keyword-match-post-text.php

keyword-match-post-text.php in Friends 4.2.2, at templates/email/keyword-match-post-text.php

55 lines 1.7 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 New Friend Post notification e-mail.
4 *
5 * @version 1.0
6 * @package Friends
7 */
8
9 $ensure_linebreaks = preg_replace( '/\<br(\s*)?\/?\>/i', PHP_EOL, $args['post']->post_content );
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 keyword string specified by the user.
18 printf( __( 'Keyword matched: %s', 'friends' ), $args['keyword'] );
19
20 echo PHP_EOL, PHP_EOL;
21
22 echo $quoted_text;
23
24 echo PHP_EOL, PHP_EOL;
25
26 printf(
27 // translators: %1$s is a username, %2$s is a URL.
28 __( 'This post was published by your friend %1$s at %2$s', 'friends' ),
29 $args['author']->display_name,
30 get_permalink( $args['post'] )
31 );
32
33 echo PHP_EOL;
34 printf(
35 // translators: %s is a URL.
36 __( 'You can also view this post on your friends page: %s', 'friends' ),
37 $args['author']->get_local_friends_page_url( $args['post']->ID )
38 );
39 echo PHP_EOL, PHP_EOL;
40
41 printf(
42 // translators: %s is a URL.
43 __( 'Manage your subscription settings at %s', 'friends' ),
44 $args['author']->display_name,
45 self_admin_url( 'admin.php?page=friends-settings' )
46 );
47 echo PHP_EOL;
48
49 printf(
50 // translators: %1$s is a username, %2$s is a URL.
51 __( 'Or just unsubscribe from %1$s\'s posts at %2$s', 'friends' ),
52 $args['author']->display_name,
53 self_admin_url( 'admin.php?page=edit-friend&user=' . $args['author']->user_login )
54 );
55