Email::form_allowed_tags()
Description #
Filter allowed tags.
Source #
File: addons/email/email.php
public function form_allowed_tags() { $active = ap_isset_post_value( 'template', 'new_question' ); $tags = array( 'site_name', 'site_url', 'site_description', ); $type_tags = array(); if ( in_array( $active, array( 'new_question', 'edit_question' ), true ) ) { $type_tags = array( 'asker', 'question_title', 'question_link', 'question_content', 'question_excerpt', ); } elseif ( in_array( $active, array( 'new_answer', 'edit_answer' ), true ) ) { $type_tags = array( 'answerer', 'question_title', 'answer_link', 'answer_content', 'answer_excerpt', ); } elseif ( 'select_answer' === $active ) { $type_tags = array( 'selector', 'question_title', 'answer_link', 'answer_content', 'answer_excerpt', ); } elseif ( 'new_comment' === $active ) { $type_tags = array( 'commenter', 'question_title', 'comment_link', 'comment_content', ); } $tags = array_merge( $tags, $type_tags ); $html = ''; foreach ( $tags as $tag ) { $html .= '<pre>{' . esc_html( $tag ) . '}</pre>'; } return $html; }
Expand full source code Collapse full source code View on GitHub: addons/email/email.php:1053
Add your comment