Merged
Conversation
Merged
11d2998 to
9894a39
Compare
Contributor
Test this PR in WordPress PlaygroundYou can test this pull request directly in WordPress Playground: This will install and activate the plugin with the changes from this PR. |
- Register convert_friend_users_to_subscriptions batched migration
- Simplify role setup to subscription-only; remove friend/acquaintance
- Remove multi-cap checks replaced by single has_cap('subscription')
- Remove make_friend(), convert_to_user(), dead convert_to_user call
- Remove WP_User_Query role lookups from all_subscriptions/search/starred
- Simplify multi-cap guards to single has_cap('subscription') check
- Remove convert-to-user/convert-from-user GET handlers and UI links
- Remove get_friend_roles() method (checked for cap that no longer exists)
- Remove friends_default_friend_role option (no longer read anywhere)
- Remove role_friend/role_acquaintance JS vars
- Replace role__in WP_User_Query with User_Query::all_subscriptions()
- Simplify edit-friend.php Type row to always show Virtual User
- Simplify friends-list.php unfriend action (always Unfriend, not Delete)
- Remove followed_by assignment based on friend cap (always false)
The friend role was removed in this branch; update the test setup to use the subscription role so tests pass.
- Replace "as a friend" with "subscribe to" for the first-subscription CTA - Simplify "extend your network" to mention only subscriptions and Fediverse - When ActivityPub is not installed, mention Fediverse following as a possibility - Remove the automatic status bullet point (feature removed) - Show ActivityPub and EMA plugins as installed with settings link when active
d00b3be to
3548729
Compare
User::create() now always delegates to Subscription::create(), removing the legacy code path that created WP user-backed subscriptions. Tests are updated to use Subscription objects: post queries use modify_get_posts_args_by_author(), user options use the friend object's methods, and user lookups use User::get_user_by_id().
…nd optimize with bulk SQL The migration was only targeting friend/acquaintance roles but sites may already have users with the subscription role. Also replaces the slow per-post wp_update_post loop with bulk INSERT/UPDATE queries for dramatically faster conversion of users with many posts.
Use array_fill with implode to build placeholders inline instead of interpolating a variable, satisfying both wpdb->prepare() placeholder counting and PHPCS rules.
The direct $wpdb UPDATE doesn't invalidate WordPress post object caches, so subsequent get_post() calls return stale post_author values. Query affected post IDs first and clean their caches after the update.
akirk
added a commit
that referenced
this pull request
Mar 26, 2026
The Add Friend page was accidentally removed in #515 (Remove Friendship functionality). The intent was to move it to the frontend (#516), but until that lands, the admin page is needed. All links throughout the plugin still point to admin.php?page=add-friend, causing an access denied error. Restores the page as subscription-only (no friendship request flow).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the WordPress to WordPress "Friendship" functionality. We will focus on RSS and ActivityPub subscriptions, see #514.
This removes a lot of code and complexity.