Skip to:
Content

BuddyPress.org

Opened 2 months ago

Last modified 2 months ago

#8479 new enhancement

WP User Profile Compatibility

Reported by: vanpop Owned by: slaFFik
Milestone: Up Next Priority: low
Severity: trivial Version:
Component: Administration Keywords: 2nd-opinion
Cc:

Description

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' ) ) {
        return;
    } 

after:

    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

Change History (2)

#1 @imath
2 months 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:

<?php
if ( true === apply_filters( 'bp_admin_profile_override_user_admin', false ) ) {
     return;
}

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
2 months 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!

Note: See TracTickets for help on using tickets.