id) {
$highlight_class = 'highlight-post';
}
// Special CSS-class for online users.
$user_online_class = ($this->online->is_user_online($post->author_id)) ? 'user-online' : 'user-offline';
$user_data = get_userdata($post->author_id);
echo '
';
echo '';
echo '
';
// Post header.
echo '';
// Post message.
echo '
';
// Initial escaping.
$allowed_html = wp_kses_allowed_html('post');
$allowed_html['iframe'] = array('width' => array(), 'height' => array(), 'src' => array(), 'frameborder' => array(), 'allowfullscreen' => array());
$post_content = wp_kses($post->text, $allowed_html);
$post_content = stripslashes($post_content);
echo '
'.esc_html__('Quote from', 'asgaros-forum').' '.$this->getUsername($post->author_id).' '.sprintf(__('on %s', 'asgaros-forum'), $this->format_date($post->date)).'
'.wpautop($post_content).'
';
// Apply embedding-shortcodes if shortcodes are allowed.
if ($this->options['allow_shortcodes']) {
global $wp_embed;
$post_content = $wp_embed->run_shortcode($post_content);
}
// Automatically embed contents if enabled.
if ($this->options['embed_content']) {
global $wp_embed;
$post_content = $wp_embed->autoembed($post_content);
}
// Wrap paragraphs.
$post_content = wpautop($post_content);
// Render shortcodes.
$post_content = $this->shortcode->render_post_shortcodes($post_content);
// Create nicename-links.
$post_content = $this->mentioning->nice_name_to_link($post_content);
// This function has to be called at last to ensure that we dont break links to mentioned users.
$post_content = make_clickable($post_content);
// Apply custom filters.
$post_content = apply_filters('asgarosforum_filter_post_content', $post_content, $post->id);
echo $post_content;
echo $this->uploads->show_uploaded_files($post->id, $post->uploads);
do_action('asgarosforum_after_post_message', $post->author_id, $post->id);
echo '
';
// Show post footer when the topic is approved.
if ($this->approval->is_topic_approved($this->current_topic)) {
echo '';
$this->reactions->render_reactions_summary_area($post->id);
}
// Show signature.
if ($this->current_view != 'post') {
$signature = $this->get_signature($post->author_id);
if ($signature !== false) {
echo '
'.wp_kses_post($signature).'
';
}
}
?>