Email::template_new_answer( array $template )

Description #

Add default new answer email template.

Parameters #

  • $template
    array (Required) Template subject and body.

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: addons/email/email.php

	public function template_new_answer( $template ) {
		$template['subject'] = __( 'New answer posted by {answerer}', 'anspress-question-answer' );
		$body                = '';
		$body               .= '<div class="ap-email-event">';
		$body               .= __( 'A new answer is posted by', 'anspress-question-answer' ) . ' <b class="user-name">{answerer}</b>';
		$body               .= '</div>';
		$body               .= '<div class="ap-email-body">';
		$body               .= '<h1 class="ap-email-title"><a href="{answer_link}">{question_title}</a></h1>';
		$body               .= '<div class="ap-email-content">';
		$body               .= '{answer_excerpt} ';
		$body               .= '</div>';
		$body               .= '</div>';
		$template['body']    = $body;

		return $template;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment