Search Results for 'private'
-
Search Results
-
BuddyPress activities have a single visibility control:
hide_sitewide(0 or 1). This provides binary visibility — shown everywhere, or hidden from sitewide feeds. There’s no way to express:– **”Only me”** — private activity visible only to the author
– **”Friends only”** — visible only to the author’s friends
– **”Logged-in users”** — hidden from anonymous visitors
– **”Group members only”** — visible only within the group context where it was postedPer-item privacy is a foundational social platform feature. Facebook has had it since 2009. LinkedIn, Twitter/X (with protected tweets), Instagram, and every major social network support some form of per-post audience control. It’s as fundamental to a social platform as
hide_sitewideis — just multi-valued instead of binary.This is not a request for any specific addon’s needs. It’s a request for the same kind of infrastructure that
hide_sitewideprovides — a first-class column that any addon can use to implement privacy-aware features.#### Current State
BuddyPress 14.4.0’s activity query system is well-designed for extensibility:
–
bp_activity_get_where_conditionslets addons inject WHERE clauses
–bp_activity_get_join_sqllets addons add JOINs
– Data hydration usesSELECT *(inpopulate()and the cache-miss path ofget()), so any column added to the table is automatically returned to calling code
–bp_activity_before_save/bp_activity_after_saveprovide save-time hooksAn addon **can** add a
privacycolumn viadbDeltaand filter queries viabp_activity_get_where_conditions. However, thesave()method has a hardcoded column list in its INSERT/UPDATE SQL (inBP_Activity_Activity::save()), meaning an addon must do a separate$wpdb->update()after every save — a double-write on every activity creation. This works but is suboptimal, and the column’s general-purpose nature (used by media addons, document addons, moderation addons, group addons — not just one feature) argues for core inclusion.#### Proposed Change
**Schema:** Add one column + index to
bp_activityinbp_core_install_activity_streams()(inbp-core-admin-schema.php).dbDelta()handles adding the column on upgrade automatically:sql
-- Added after the existing <code>is_spam</code> column in the CREATE TABLE definition: privacy varchar(75) NOT NULL DEFAULT 'public', -- Added to the KEY list: KEY privacy (privacy)**Model class (
BP_Activity_Activity):**1. Add
public $privacy = 'public';property
2. Insave()— addprivacyto the INSERT/UPDATE column list alongside the existing columns (user_id, component, type, action, content, etc.)
3. Inget()— add'privacy'to the$rdefaults (defaultfalse, meaning no filtering). When set, addAND a.privacy IN (...)to the WHERE conditions.**REST API (
BP_REST_Activity_Endpoint):**4. In
prepare_item_for_response()— exposeprivacyin the response object (paralleling howhide_sitewideis currently exposed ashidden)
5. Inprepare_item_for_database()— acceptprivacyas a writable field on create/update**Migration:**
dbDelta()runs on every upgrade viabp_core_install(), so modifying the CREATE TABLE definition is sufficient for the schema change. A DB version bump inbp-core-update.phptracks the upgrade.#### Scope
– ~40 lines of changes across 4 files (
bp-core-admin-schema.php,class-bp-activity-activity.php,class-bp-rest-activity-endpoint.php,bp-core-update.php)
– Default value'public'— 100% backward compatible
– Existing queries that don’t passprivacyreturn all activities as before
–hide_sitewidecontinues to work as-is (orthogonal —hide_sitewidecontrols directory listing,privacycontrols per-item access)#### What Core Provides vs. What Addons Handle
To be explicit about scope: this proposal adds **storage and query filtering only**. Core would:
– Store the
privacyvalue on each activity row
– Allowget()callers to filter by privacy value(s)
– Expose/accept the field through the REST APICore would **not** need to:
– Define a fixed set of allowed values (addons register the values they need — e.g.,
'onlyme','friends','loggedin')
– Enforce access control based on privacy values (addons hook intobp_activity_get_where_conditionsto inject viewer-aware WHERE clauses, exactly as they would today for any custom filtering)
– Provide UI for selecting privacy (addon/theme territory)This mirrors how
hide_sitewideworks today — core stores the flag and filters on it; the decision of *when* to set it is made by callers (groups component, plugins, etc.).#### Prior Art
BuddyBoss Platform (a BuddyPress-derived platform) implemented this exact column. Their
bp_activityschema includesprivacy varchar(75) NOT NULL DEFAULT 'public', and their media, document, video, and moderation subsystems all depend on it for privacy filtering. The column is referenced in their activity save/query paths, REST API, and template layer — making it one of the most cross-cutting additions they made to the activity table. The fact that an independent platform needed this to build standard social features demonstrates both the demand and the general-purpose nature of the column.I’m happy to submit a PR for this change.
Hello,
We use bbpress, buddypress, and bbp-private-groups in a WordPress installation.
In the Buddypress group settings, the group administrator can also create a forum.I am looking for a hook to add a specific group from bbp-private-groups to a group forum when creating the group forum:
add_post_meta( $forum_id, ‘_private_group’, ‘group1’, false );.I tried the hook bbp_insert_forum.
But at that point, the group and the forum are not yet linked.Does anyone have any idea which hook I can use?
Thank you very much!I need to stop users with only subscriber status from BuddyPress private messaging.
The plugin ‘BuddyPress Restrict Messages’ looks like exactly what I need but it does not seem to work and appears to be abandoned.
Any advice/suggestions on how to do this. please?
Topic: Make user profiles private
Is there a way to make student profiles only for registered users? These pages aren’t interesting to Google and therefore penalize indexing.
Topic: Field Visibility
Where can I set in admin which fields to make public and which private, and where can I set users to be able to decide? For example, I created the surname field and associated it with the WordPress profile field, but the user can’t decide whether to make it private because it’s always public.
ThanksHi,
I love buddypress and wpjm combo. Its free and helps people get jobs, which is my private project.
However I am not so tech savy and not any real coding.
My question is if its possible, within reason, to add two choices on the member page, to filter out two user classes/types (wpjm candidates and employers).
Today I have active members and “my friends” as tabs and also a search member field under that. I would like to add candidates and employers, to filter out those users. Mainly employers – since it woud be nice for candidates to reach out if it seems good match.
I guess find the teamplate for members, add it to my child theme and ad buttons, and then connect the buttons with a filter option in the child theme function file?
Best regards,
Flamur
Topic: Segregation of groups
Hi,
I want to have multiple groups co-existing into the same wordpress installation.
I created 4 dummy users:
user1 and user2 belong to demo1 member type from the extended profile tab
user3 and user4 belong to demo2 member type from the extended profile tab

Now, I noticed that user3 can see the content of user1 and user2. Please note that I named my demo users with display name including the “group” they belong to 😉

How can I make sure that all content of a specific and defined (by what) group of users is strictly private and can be seen only by members of this group?
Anyone an idea please?
Thanks,
Hello guys!
I’ve seen this question in here a couple of times and maybe others would enjoy this code.
I couldn’t find a good solution in trying to “hide” the official and hidden groups, when users are creating them (it just would not allow me to hide them!).I then managed to fix a code and make it work so at least it shows an error when a user (besides admin) tries to create a group that is NOT private. In this way when a user tries to create a public/hidden group it will not allow the user to “proceed” with the next step unless private group is chosen.
Feel free to update the CSS to your liking!
Hope it helps, enjoy! 🙂
function restrict_group_type_selection() { // Ensure this script only runs during the group settings creation step if (bp_is_group_creation_step('group-settings')) { // Check if the user is not an admin (wrap the condition outside the script for cleaner HTML output) if (!current_user_can('manage_options')) { ?> <style type="text/css"> .group-type-error-message { color: #ffffff; background-color: #f95959; position: relative; margin-top: 20px !important; border: 0 !important; font-weight: 600; } } </style> <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function () { const nextButton = document.getElementById('group-creation-next'); // Target the "Next step" button if (nextButton) { nextButton.addEventListener('click', function (event) { const selectedGroupType = document.querySelector('input[name="group-status"]:checked'); let errorContainer = document.getElementById('group-type-error-message'); // Remove any existing error message if (errorContainer) { errorContainer.remove(); } if (!selectedGroupType || selectedGroupType.value !== 'private') { // Prevent moving to the next step if the group type is not 'private' event.preventDefault(); // Create and display a styled error message errorContainer = document.createElement('div'); errorContainer.id = 'group-type-error-message'; errorContainer.className = 'group-type-error-message'; errorContainer.innerText = 'You are only allowed to create private groups.'; // Insert the error message after the "Next" button nextButton.parentNode.appendChild(errorContainer); } }); } }); </script> <?php } } } add_action('bp_after_group_settings_creation_step', 'restrict_group_type_selection');Hello,
Suppose that I have 100 groups (public, private, hidden) and many people request to join my private groups. I receive like 1000 join requests (200 in one group and 800 for the rest of the groups).
My questions Is there any way to do the following:
- Bulk approving or rejecting group join requests for a single group
- Bulk approving or rejecting group join requests for all the groups I have under one place instead of opening group by group
Hopefully, this is something achievable (or an easy workaround using a plugin or code) as it’s a very important function that I couldn’t find.
I’m encountering an issue with BuddyPress default email notifications on my site. Only two types of emails are being triggered: private messages and friend requests. However, other default emails, such as group invitations and account activations, comments etc, are not being sent. Could you please assist in identifying the cause of this issue or guide me on troubleshooting steps?