PHPackages                             automattic/buddypress-hidden-profiles - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. automattic/buddypress-hidden-profiles

ActiveWordpress-plugin

automattic/buddypress-hidden-profiles
=====================================

Hide BuddyPress profiles from non-admins.

1.1.0(12mo ago)2668↓44.2%GPL-2.0-or-laterPHPPHP &gt;=8.2

Since May 16Pushed 10mo ago3 watchersCompare

[ Source](https://github.com/Automattic/BuddyPress-Hidden-Profiles)[ Packagist](https://packagist.org/packages/automattic/buddypress-hidden-profiles)[ RSS](/packages/automattic-buddypress-hidden-profiles/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (5)Used By (0)

BuddyPress Hidden Profiles
==========================

[](#buddypress-hidden-profiles)

**Contributors:** garyj
**Tags:** BuddyPress, BuddyBoss, profiles, privacy, admin
**Requires at least:** 6.6
**Tested up to:** 6.8
**Stable tag:** 1.1.0
**License:** GPLv2 or later
**License URI:**

Allows site admins to mark BuddyPress user profiles as hidden, excluding them from directories, searches, and making their profile pages return a 404 for non-admins.

Description
-----------

[](#description)

This plugin provides a simple way to hide specific BuddyPress user profiles from non-administrative users. When a profile is marked as hidden:

- The profile page returns a 404 error for non-admins
- The user is excluded from member directories
- The user is excluded from search results
- The user is excluded from AJAX-loaded member lists

Hidden profiles remain visible to:

- The profile owner themselves
- Site administrators
- Users with the `manage_options` capability

Features
--------

[](#features)

- Simple checkbox interface in the WordPress user profile screen
- Complete profile hiding from non-admins
- Efficient caching of hidden user IDs
- WP-CLI support for bulk operations
- Maintains visibility for admins and profile owners
- Extensible via filters for custom hiding logic

Installation
------------

[](#installation)

1. Upload the `buddypress-hidden-profiles` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Configure hidden profiles through the WordPress user profile screen or set the user meta value.

Usage
-----

[](#usage)

### WordPress Admin Interface

[](#wordpress-admin-interface)

1. Go to Users → All Users
2. Click on the user you want to hide
3. Scroll down to the "Profile Visibility" section
4. Check the "Hidden Profile" checkbox
5. Click "Update User"

### WP-CLI

[](#wp-cli)

You can also manage hidden profiles using WP-CLI:

```
# Hide a profile
wp user meta update  profile_visibility hidden

# Unhide a profile
wp user meta delete  profile_visibility

# Clear the hidden users cache
wp cache delete bp_hidden_user_ids
```

### Extending with Filters

[](#extending-with-filters)

The plugin provides two filters for extending its functionality:

#### 1. `buddypress_hidden_profiles_is_hidden`

[](#1-buddypress_hidden_profiles_is_hidden)

This filter allows you to determine if a specific user's profile should be hidden. It's called when checking individual profiles.

Here's how it could be used:

```
add_filter(
    'buddypress_hidden_profiles_is_hidden',
    function( $is_hidden, $user_id ) {
        // If another filter has already decided, respect that decision.
        if ( is_bool( $is_hidden ) ) {
            return $is_hidden;
        }

        // Example: Hide users with a specific meta value.
        $should_hide = get_user_meta( $user_id, 'my_custom_meta', true );
        if ( ! empty( $should_hide ) ) {
            return true;
        }

        // Fall back to default check.
        return null;
    },
    10,
    2
);
```

#### 2. `buddypress_hidden_profiles_additional_hidden_ids`

[](#2-buddypress_hidden_profiles_additional_hidden_ids)

This filter allows you to add user IDs to the list of hidden users. It's used in directory listings and should return IDs determined by a performant query.

Here's how it could be used:

```
add_filter(
    'buddypress_hidden_profiles_additional_hidden_ids',
    function( $additional_hidden ) {
        global $wpdb;

        // Example: Get users with a specific meta value in a single query.
        $extra_hidden = $wpdb->get_col(
            $wpdb->prepare(
                "SELECT user_id FROM {$wpdb->usermeta}
                WHERE meta_key = %s",
                'my_custom_meta'
            )
        );

        return array_merge( $additional_hidden, $extra_hidden );
    }
);
```

### Cache Management

[](#cache-management)

The plugin caches the list of hidden IDs for better performance. It automatically clears its cache when:

- A user is registered
- A user is deleted
- A user's role changes

You can also manually clear the cache using WP-CLI:

```
wp cache delete bp_hidden_user_ids
```

Requirements
------------

[](#requirements)

- WordPress 6.6 or higher
- PHP 8.2 or higher
- BuddyPress or BuddyBoss Platform

Troubleshooting
---------------

[](#troubleshooting)

If a hidden profile is still visible:

1. Clear the WordPress object cache
2. Verify the user has the correct meta value: `profile_visibility = hidden`
3. Check that the viewing user is not an admin or the profile owner
4. Ensure the cache is cleared after making changes
5. Check if any filters are overriding the default behavior

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes.

License
-------

[](#license)

This plugin is licensed under the GPLv2 or later. See [LICENSE](LICENSE) for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance52

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

2

Last Release

360d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba7751eebec0f74a4963e9a062f49e58222b97872bf193d95f0505f3df321d09?d=identicon)[GaryJones](/maintainers/GaryJones)

![](https://www.gravatar.com/avatar/7c5869ecbb8e0eac7e8b8e0f3cf7bdd8d5fcdc4abc10a72281872c53f8639d44?d=identicon)[automattic](/maintainers/automattic)

---

Top Contributors

[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (7 commits)")

### Embed Badge

![Health badge](/badges/automattic-buddypress-hidden-profiles/health.svg)

```
[![Health](https://phpackages.com/badges/automattic-buddypress-hidden-profiles/health.svg)](https://phpackages.com/packages/automattic-buddypress-hidden-profiles)
```

###  Alternatives

[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[johnbillion/user-switching

Instant switching between user accounts in WordPress and WooCommerce.

19768.3k2](/packages/johnbillion-user-switching)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
