| 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 |
|