PluginProbe
Friends / 2.8.1
Friends v2.8.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 / keyword-match-post-text.php

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

52 lines 1.5 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 = strip_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 // translators: %s is a keyword string specified by the user.
15 printf( __( 'Keyword matched: %s', 'friends' ), $args['keyword'] );
16
17 echo PHP_EOL, PHP_EOL;
18
19 echo $quoted_text;
20
21 echo PHP_EOL, PHP_EOL;
22
23 printf(
24 // translators: %1$s is a username, %2$s is a URL.
25 __( 'This post was published by your friend %1$s at %2$s', 'friends' ),
26 $args['author']->display_name,
27 get_permalink( $args['post'] )
28 );
29
30 echo PHP_EOL;
31 printf(
32 // translators: %s is a URL.
33 __( 'You can also view this post on your friends page: %s', 'friends' ),
34 $args['author']->get_local_friends_page_url( $args['post']->ID )
35 );
36 echo PHP_EOL, PHP_EOL;
37
38 printf(
39 // translators: %s is a URL.
40 __( 'Manage your subscription settings at %s', 'friends' ),
41 $args['author']->display_name,
42 self_admin_url( 'admin.php?page=friends-settings' )
43 );
44 echo PHP_EOL;
45
46 printf(
47 // translators: %1$s is a username, %2$s is a URL.
48 __( 'Or just unsubscribe from %1$s\'s posts at %2$s', 'friends' ),
49 $args['author']->display_name,
50 self_admin_url( 'admin.php?page=edit-friend&user=' . $args['author']->user_login )
51 );
52