-
Notifications
You must be signed in to change notification settings - Fork 81
Trigger Actor updates on (un)setting a post as sticky. #1982
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
Conversation
I’m not entirely convinced that the current “Sticky post” feature in WordPress — which is typically toggled via the Quick Edit or post editor — can fully capture the intended semantics in a fediverse context. From experience, the concept of “pinning” content on federated profiles (e.g. Mastodon or Misskey) is better represented and understood when explicitly configured within the actor’s profile feed. It’s a social signal, not just a display tweak. That makes me wonder — should this feature be considered more of a presentation layer element (handled locally), or should it be mapped to an Update activity for the Actor object itself across the fediverse? In either case, it seems crucial to define: How pinned/sticky state is stored at the AP level (in actor metadata? as a featured collection?), Whether this state syncs with existing sticky_posts logic or diverges for ActivityPub purposes. Would love to hear your thoughts on how to bridge these models — especially regarding backend implementation and compatibility with other platforms. |
While I agree that for single-profile "blog" actors this feature could be implemented relatively simply, I can foresee a potential side effect: the sticky status might also affect the site's native post feed (e.g., /posts or homepage query), which could unintentionally distort the intended layout or content flow. In the ActivityPub context, pinning a post is usually more about visibility on the remote profile — it's a social affordance, not necessarily a site-wide editorial choice. If sticky posts start overriding local feed logic (e.g., query_posts() ordering), that might not be desirable for all users. Perhaps it would make sense to differentiate "fediverse pinning" from traditional WordPress sticky_post behavior, or at least offer a toggle to prevent site-level layout interference when pinning posts for federation. |
The existing WordPress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to trigger Actor updates when posts are marked as sticky or unsticky, ensuring remote ActivityPub platforms refresh the "featured" endpoint to reflect changes in sticky post status.
Key changes:
- Hooks into WordPress sticky posts option updates to detect changes
- Triggers profile updates for authors whose posts have sticky status changes
- Adds comprehensive test coverage for the sticky post detection functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
includes/scheduler/class-actor.php | Adds hook for sticky posts changes and implements detection logic to trigger Actor updates |
tests/includes/scheduler/class-test-actor.php | Adds test case to verify sticky post changes trigger appropriate Actor updates |
Comments suppressed due to low confidence (1)
tests/includes/scheduler/class-test-actor.php:333
- The test calls get_latest_outbox_item() but this method is not defined in the visible code. The test may fail if this helper method doesn't exist in the test class.
$last_item = $this->get_latest_outbox_item();
Send Actor updates if the list of sticky posts change, to force remote platforms to re-read the "featured" endpoint.
Fixes: https://wordpress.com/blog/2025/07/18/3-fresh-features-activitypub-experience-for-wordpress/#comment-448212
Proposed changes:
Other information:
Testing instructions:
Changelog entry
Changelog Entry Details
Significance
Type
Message
Trigger Actor updates on (un)setting a post as sticky.