Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change preview showing the name instead of the preferredUsername #1011

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Outsource Constants to a separate file
* Better handling of `readme.txt` and `README.md`

### Fixed

* Fixed: Fediverse preview showing `preferredUsername` instead of `name`.

## 4.2.1 - 2024-11-20

### Added
Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=== ActivityPub ===
Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nuriapena, cavalierlife
Contributors: automattic, pfefferle, mediaformat, mattwiebe, akirk, jeherve, nuriapena, cavalierlife, andremenrath
Tags: OStatus, fediverse, activitypub, activitystream
Requires at least: 5.5
Tested up to: 6.7
Expand Down Expand Up @@ -138,6 +138,7 @@ For reasons of data protection, it is not possible to see the followers of other
* Added: GitHub action to enforce Changelog updates.
* Improved: Outsource Constants to a separate file
* Improved: Better handling of `readme.txt` and `README.md`
* Fixed: Fediverse preview showing `preferredUsername` instead of `name`.

= 4.2.1 =

Expand Down
10 changes: 5 additions & 5 deletions templates/post-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
margin-bottom: 1em;
font-style: normal;
}
main address .preferred-username,
main address .name,
main address .webfinger {
color: #000;
}
.preferred-username {
.name {
color: #ccc;
font-weight: bold;
display: block;
Expand Down Expand Up @@ -183,7 +183,7 @@
<div>
<div class="fake-image"></div>
<div>
<div class="preferred-username">
<div class="name">
████ ██████
</div>
<div class="webfinger">
Expand All @@ -201,8 +201,8 @@
<address>
<img src="<?php echo esc_url( $user->get_icon()['url'] ); ?>" alt="<?php echo esc_attr( $user->get_name() ); ?>" />
<div>
<div class="preferred-username">
<?php echo esc_html( $user->get_preferred_username() ); ?>
<div class="name">
<?php echo esc_html( $user->get_name() ); ?>
</div>
<div class="webfinger">
<?php echo esc_html( '@' . $user->get_webfinger() ); ?>
Expand Down
Loading