Skip to content

Instantly share code, notes, and snippets.

@MarkoKaartinen
Created March 10, 2017 06:59
Show Gist options
  • Save MarkoKaartinen/dfee449f6fd0443dc3b031f5d6e9090e to your computer and use it in GitHub Desktop.
Save MarkoKaartinen/dfee449f6fd0443dc3b031f5d6e9090e to your computer and use it in GitHub Desktop.
<?php
function custom_discourse_comment( $input ) {
ob_start();
?>
<div class="media">
<div class="media-left">
<a href="{comment_url}">
<img class="media-object" src="{avatar_url}" alt="{username}" style="width:64px; height:64px;">
</a>
</div>
<div class="media-body">
<h4 class="media-heading">{username} <small><a href="{comment_url}">{comment_created_at}</a></small></h4>
{comment_body}
</div>
</div>
<?php
$output = ob_get_clean();
return $output;
}
add_filter( 'discourse_comment_html', 'custom_discourse_comment' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment