Discourse WordPress plugin version 0.7.0

I’ll look at that.

Yes this is because we’re trying to fix the Discourse urls with a regular expression :stuck_out_tongue:

It falls apart if there is an absolute image path followed by a relative one. I think the emoji image paths have been fixed in the latest version of Discourse, so the best solution is to update the version of Discourse you are using.

Does this work for you?

function discourse_no_replies( $input ) {
	ob_start();
	?>

	<div id="comments" class="comments-area">
		<div class="respond comment-respond">
			<h3 id="reply-title" class="comment-reply-title"><a href="{topic_url}">Join the discussion on our forum</a></h3>
		</div>
	</div>

  <?php
	$output = ob_get_clean();
	return $output;
}
add_filter( 'discourse_no_replies_html', 'discourse_no_replies' );

Edit: If all you are trying to do is change the text content, there is an easier way to do it. I’ll add some documentation for overriding the plugin’s text content soon. But here is a quick example that could be added to your theme’s functions.php file.

add_filter( 'gettext', 'change_continue_discussion_text', 20, 3 );
function change_continue_discussion_text( $translated_text, $text, $domain ) {
	switch ( $translated_text ) {
		case 'Continue the discussion' :
			$translated_text = __( 'Join the discussion', 'wp-discourse' );
			break;
	}

	return $translated_text;
}