Skip to content

Commit 87d6f15

Browse files
pfefferleobenland
andauthored
Add media type support (#1045)
* Add media type support improve content handling. see #1044 * add changelog * Fix typo --------- Co-authored-by: Konstantin Obenland <[email protected]>
1 parent 930db56 commit 87d6f15

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Improved
1111

1212
* Added screen reader text to the "Follow Me" block for improved accessibility
13+
* Added `media_type` support to Activity-Object-Transformers
1314
* Clarified settings page text around which users get Activitypub profiles
1415

1516
### Fixed

includes/transformer/class-base.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,22 @@ abstract protected function get_id();
120120

121121
/**
122122
* Get the replies Collection.
123+
*
124+
* @return array The replies collection.
123125
*/
124126
public function get_replies() {
125127
return Replies::get_collection( $this->wp_object );
126128
}
127129

130+
/**
131+
* Returns the default media type for an Object.
132+
*
133+
* @return string The media type.
134+
*/
135+
public function get_media_type() {
136+
return 'text/html';
137+
}
138+
128139
/**
129140
* Returns the ID of the WordPress Object.
130141
*/

readme.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ For reasons of data protection, it is not possible to see the followers of other
134134

135135
= Unreleased =
136136

137-
* Added: Screen reader text for the "Follow Me" block for improved accessibility
137+
* Improved: Added screen reader text for the "Follow Me" block for improved accessibility
138+
* Improved: Added `media_type` support to Activity-Object-Transformers
138139
* Improved: Clarified settings page text around which users get Activitypub profiles
139140
* Fixed: Prevent hex color codes in HTML attributes from being added as post tags
140141
* Fixed: A typo in the custom post content settings

0 commit comments

Comments
 (0)