Skip to content

Commit 3f60a9e

Browse files
authored
Fix: Reply-Context link is missing (#1382)
* Fix: Reply-Context link is missing With the new update of the Query, the JSON representation is called before the HTML presentation, so the `activitypub_reply_block` was removed but never re-added. * Add changelog
1 parent 3cea8cb commit 3f60a9e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
* Bumped minimum required WordPress version to 6.4.
1313
* Use a later hook for Posts to get published to the Outbox, to get sure all `post_meta`s and `taxonomy`s are set stored properly.
1414

15+
### Fixed
16+
17+
* Remove `activitypub_reply_block` Filter after Activity-JSON is rendered, to not affect the HTML representation.
18+
1519
## [5.3.1] - 2025-02-26
1620

1721
### Fixed

includes/transformer/class-post.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ protected function get_name() {
480480
* @return string The content.
481481
*/
482482
protected function get_content() {
483-
add_filter( 'activitypub_reply_block', '__return_empty_string' );
483+
\add_filter( 'activitypub_reply_block', '__return_empty_string' );
484484

485485
// Remove Content from drafts.
486486
if ( 'draft' === \get_post_status( $this->item ) ) {
@@ -531,6 +531,8 @@ protected function get_content() {
531531
// Don't need these anymore, should never appear in a post.
532532
Shortcodes::unregister();
533533

534+
\remove_filter( 'activitypub_reply_block', '__return_empty_string' );
535+
534536
return $content;
535537
}
536538

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ For reasons of data protection, it is not possible to see the followers of other
133133

134134
* Changed: Bumped minimum required WordPress version to 6.4.
135135
* Changed: Use a later hook for Posts to get published to the Outbox, to get sure all `post_meta`s and `taxonomy`s are set stored properly.
136+
* Fixed: Remove `activitypub_reply_block` Filter after Activity-JSON is rendered, to not affect the HTML representation.
136137

137138
= 5.3.1 =
138139

0 commit comments

Comments
 (0)