Skip to:

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8479 closed enhancement (fixed)

WP User Profile Compatibility

Reported by: vanpop's profile vanpop Owned by: slaffik's profile slaFFik
Milestone: 10.0.0 Priority: low
Severity: trivial Version: 2.0
Component: Administration Keywords: has-patch commit


Adding a check to see if the WP User Profiles plugin is active allows for creating a new WP User Profile section that adds the BuddyPress Extended Profile tab to the User Profile navigation by using 'bp-profile-edit' for the section/id/slug/name. Happy to explain further if that isn't clear and also happy to hear if what I'm doing is crazy and I should not do it. Thanks! :)

By adding:

    if ( is_plugin_active( 'wp-user-profiles/wp-user-profiles.php' ) ) {


    if ( ! bp_current_user_can( 'bp_moderate' ) && empty( $this->is_self_profile ) ) {
        die( '-1' );

at line 999 of class-bp-members-admin.php, the extended profile tab can be added to the WP User Profiles plugin tabbed nav. Happy to explain further if that isn't clear

Attachments (1)

8479.patch (8.6 KB) - added by imath 3 years ago.

Download all attachments as: .zip

Change History (9)

#1 @imath
3 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to Up Next

Hi thanks for your report.

I believe what you suggest should be made in a more generic way eg:

if ( true === apply_filters( 'bp_admin_profile_override_user_admin', false ) ) {

Then any plugin wishing to deal differently with this part of BuddyPress can do it and not only the WP User Profiles plugin.

#2 @vanpop
3 years ago

Hi @imath, Thanks for your response.

I agree, although I have since realized that the Extended Profile fields are not properly saved when WP User Profiles is active, so I'm hoping/going to try to see if I can find a way to correct that as well.

However, I still think that adding the filter in is harmless/helpful enough if you agree.

Thanks again!

#3 @imath
3 years ago

  • Keywords dev-feedback added
  • Milestone changed from Up Next to 10.0.0

Any objection about introducing this new filter?

3 years ago

#4 @imath
3 years ago

  • Keywords has-patch added; 2nd-opinion dev-feedback removed
  • Version set to 2.0

Hi @vanpop

Better later than never! Sorry about the delay. I've just attached a patch about introducing a new filter to disable the BP Admin User's community profile. You just need to include the code below to remove this community profile.

add_filter( 'bp_members_is_community_profile_enabled', '__return_false' );

As I was working into this area, I've also applied WP 3.9 change about the Edit User Screen title

#5 @dcavins
3 years ago

This looks OK to me.

#6 @imath
3 years ago

  • Keywords commit added

Thanks for your feedback @dcavins let's have this in!

#7 @imath
3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In 13131:

Let advanced users disable the WP Admin community profile

Introduce the bp_members_is_community_profile_enabled() function to check the community profile is enabled. Advanced users can edit this status returning false when filtering bp_members_is_community_profile_enabled.

Props vanpop, dcavins

Fixes #8479

#8 @imath
3 years ago

In 13133:

Fix a failing test for multisite configs

In [13131] only one of the two tests checking register/activate pages are automatically created was updated to take in account the need to include the BP_PLUGIN_DIR . 'bp-members/bp-members-admin.php' file.

Antiprops imath

See #8479

Note: See TracTickets for help on using tickets.