class Data_AccessLow-level data access (no HTTP).
class final
- Full name
Kernowdev\ClanbiteSocialKit\Social\Data_Access
Methods
accept_friend_request()Accept a pending request where current user is the target (friend_user_id).are_friends()Whether two users have an accepted friendship.count_accepted_friends()Number of accepted friendships for a user (unique friend user IDs).count_comment_reactions()Total reactions on one comment.count_comments()Comment count for a post.count_profile_status_posts_visible_to_viewer()Count post_type = status rows for a player profile, respecting the same visibility rules as self::query_profile_feed().count_reactions()Reaction count for a post.decline_friend_request()Decline (delete) a pending request where current user is the target.delete_comment_tree()Delete a comment with its replies and their reactions.delete_owned_post()Delete a post and dependent rows (author, team or group manager, or site administrator).ensure_accepted_friendship_between()Ensure an accepted friendship exists between two users (creates or upgrades a row; idempotent).get_accepted_friend_ids()WordPress user IDs that are accepted friends of this user (either direction).get_comment_reaction_counts_by_comment()Counts per reaction_type for one comment.get_comment_reaction_reactor_user_ids_for_comments()Recent distinct reactor user IDs per reaction slug per comment.get_comment_reaction_summaries_for_comments()Batch reaction summaries for many comments (feed / thread).get_comment_row()Single comment row or null.get_friendship_row_between()Any friendship row between two users (any status).get_pending_incoming()Pending requests where the user is the recipient.get_pending_outgoing()Pending requests the user sent.get_poll_vote_counts()Vote counts per option index for a post.get_post_media_rows()Media rows for a post.get_post()Fetch one post row.get_reaction_counts_by_post()Counts per reaction_type for one post.get_reaction_reactor_user_ids_for_posts()Recent distinct reactor user IDs per reaction slug per post (newest reactions first).get_reaction_summaries_for_posts()Batch reaction summaries for feed formatting (counts + viewer’s slugs).get_user_comment_reaction_slugs()Reaction type slugs the viewer has on this comment.get_user_poll_vote_option_index()Which option index the user voted for, if any.get_user_reaction_slugs()Reaction types the user has on this post.insert_comment()Insert comment.insert_friend_request()Insert a pending friend request (from -> to).insert_poll_vote()Record a viewer vote (one per user per post; enforced by UNIQUE KEY).insert_post_media_rows()Link attachment rows to a social post (validated by caller).insert_post()Insert a post.parse_poll_json()Decode stored poll JSON into question + option labels.query_comments()List comments for a post by top-level pages, including descendants for those parents.query_group_feed()Paginated feed for a single group.query_home_feed()Home feed: posts from self + accepted friends.query_profile_feed()Profile feed: posts by one author, visibility rules for viewer.query_team_feed()Team feed: posts scoped to a team.record_view()Record a unique view for a post for the given logged-in user.remove_accepted_friendship()Remove an accepted friendship row (either participant may end the friendship).table_name()Full prefixed table name for Social Kit custom tables.toggle_comment_reaction()Toggle one reaction on a comment (insert/remove row).toggle_like()Back-compat: toggle the like reaction only.toggle_reaction()Toggle one reaction type for a user (insert/remove row).update_comment_content()Replace a comment's content.update_owned_post_privacy()Update visibility and replies toggle (author only, non-team posts).update_owned_post()Update post body and optional link fields (author only).user_can_delete_comment_row()Whether a user may delete a comment: its author, whoever manages the post it is on, or a site administrator (moderation).user_can_delete_post_row()Whether the user can delete a post row: anyone who can manage it, plus site administrators (moderation).user_can_edit_comment_row()Whether a user may edit a comment: its author.user_can_manage_post_row()Whether the user can manage a post row (author or team admin when scoped to a team).user_has_comment_reaction()Whether the user has a given reaction on a comment.user_has_reaction()Whether user has a reaction on post.
Defined in inc/Social/Data_Access.php
Changelog
| Version | Description |
|---|---|
| 1.6.2 | Updated. |
| 1.4.1 | Updated. |