我正在使用wordpress订阅评论&我想在'$ message。= __(“评论:\ n”,'订阅评论')之后找到一个hr行。 $ comment-> comment_content。 “\ n \ n”;'
如果您有任何想法请告诉我如何设计输出?我是php的新手
if ( $comment->comment_approved == '1' && $comment->comment_type == '' ) {
// Comment has been approved and isn't a trackback or a pingback, so we should send out notifications
$message = sprintf(__("There is a new comment on the post \"%s\"", 'subscribe-to-comments') . ". \n%s\n\n", $post->post_title, get_permalink($comment->comment_post_ID));
$message .= sprintf(__("Author: %s\n", 'subscribe-to-comments'), $comment->comment_author);
$message .= __("Comment:\n", 'subscribe-to-comments') . $comment->comment_content . "\n\n";
$message .= __("See all comments on this post here:\n", 'subscribe-to-comments');
$message .= get_permalink($comment->comment_post_ID) . "#comments\n\n";
//add link to manage comment notifications
$message .= __("To manage your subscriptions or to block all notifications from this site, click the link below:\n", 'subscribe-to-comments');
$message .= get_settings('home') . '/?wp-subscription-manager=1&email=[email]&key=[key]';
$subject = sprintf(__('New Comment On: %s', 'subscribe-to-comments'), $post->post_title);
}
答案 0 :(得分:0)
只需添加$message .= '<br />';