Skip to content

Commit

Permalink
Change priority of attachments (#1082)
Browse files Browse the repository at this point in the history
* Change priority of attachments

Use `image` as highest prio, followed by `audio` and `video`.

This should also improve the enclosure handling.

* changelog
  • Loading branch information
pfefferle authored Dec 16, 2024
1 parent 8770b5b commit ce32243
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Improve Interactions moderation
* Compatibility with Akismet
* Comment type mapping for `Like` and `Announce`
* Changed priority of Attachments, to favor `Image` over `Audio` and `Video`

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion includes/transformer/class-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ protected function get_attachment() {
);

$media = array(
'image' => array(),
'audio' => array(),
'video' => array(),
'image' => array(),
);
$id = $this->wp_object->ID;

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ For reasons of data protection, it is not possible to see the followers of other
* Improved: Interactions moderation
* Improved: Compatibility with Akismet
* Improved: Comment type mapping for `Like` and `Announce`
* Improved: Changed priority of Attachments, to favor `Image` over `Audio` and `Video`
* Fixed: Empty `url` attributes in the Reply block no longer cause PHP warnings

= 4.4.0 =
Expand Down

0 comments on commit ce32243

Please sign in to comment.