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 / new-friend-post-text.php

new-friend-post-text.php in Friends 4.2.1, at templates/email/new-friend-post-text.php

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