Discourse WordPress plugin version 0.7.0

Just pushed version 0.9.3 to the WordPress plugin repository. It includes fixes for:

  • substituting the comment url for the comment_url tag
  • not escaping the data-youtube-id attribute
  • internationalizing the comments_number function

Here’s a sample function for changing the comments number text:

add_filter( 'gettext', 'change_comments_number_text', 20, 3 );
function change_comments_number_text( $translated_text, $text, $domain ) {
	switch ( $translated_text ) {
		case 'Leave a reply' :
			$translated_text = __( 'Please leave a reply', 'wp-discourse' );
			break;

		case 'Reply' :
			$translated_text = __( 'Response', 'wp-discourse' );
			break;

		case 'Replies' :
			$translated_text = __( 'Responses', 'wp-discourse' );
			break;
	}

	return $translated_text;
}