Skip to content

Commit 4eaaebb

Browse files
pfefferleobenland
authored andcommitted
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 2da88f7 commit 4eaaebb

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Fixed
11+
12+
* Remove `activitypub_reply_block` Filter after Activity-JSON is rendered, to not affect the HTML representation.
13+
814
## [5.3.1] - 2025-02-26
915

1016
### Fixed

includes/transformer/class-post.php

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

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

536+
\remove_filter( 'activitypub_reply_block', '__return_empty_string' );
537+
536538
return $content;
537539
}
538540

readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ For reasons of data protection, it is not possible to see the followers of other
129129

130130
== Changelog ==
131131

132+
= Unreleased =
133+
134+
* Fixed: Remove `activitypub_reply_block` Filter after Activity-JSON is rendered, to not affect the HTML representation.
135+
132136
= 5.3.1 =
133137

134138
* Fixed: Blog profile settings can be saved again without errors.

0 commit comments

Comments
 (0)