Skip to content

Commit

Permalink
Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
obenland committed Jan 8, 2025
1 parent 5160bd1 commit ef6c5c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

* Undefined array key warnings in various places
* @-mentions in federated comments being displayed with a line break

## [4.6.0] - 2024-12-20

Expand Down
17 changes: 6 additions & 11 deletions includes/transformer/class-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,18 @@ protected function get_attributed_to() {
* @return string The content.
*/
protected function get_content() {
$comment = $this->wp_object;
$content = $comment->comment_content;

$at_replies = '';
$reply_context = $this->extract_reply_context();
$comment = $this->wp_object;
$content = $comment->comment_content;
$mentions = '';

foreach ( $reply_context as $acct => $url ) {
$at_replies .= sprintf(
foreach ( $this->extract_reply_context() as $acct => $url ) {
$mentions .= sprintf(
'<a class="u-mention mention" href="%s">%s</a> ',
esc_url( $url ),
esc_html( $acct )
);
}

if ( $at_replies ) {
$content = $at_replies . $content;
}
$content = $mentions . $content;

/**
* Filter the content of the comment.
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ For reasons of data protection, it is not possible to see the followers of other
* Added: A filter to make custom comment types manageable in WP.com Calypso
* Changed: Hide ActivityPub post meta keys from the custom Fields UI
* Fixed: Undefined array key warnings in various places
* Fixed: @-mentions in federated comments being displayed with a line break

= 4.6.0 =

Expand Down

0 comments on commit ef6c5c9

Please sign in to comment.