BuddyBoss Platform plugin support
-
Hi Team,
I am having problem to access the profile forums, media etc.. while WPML and BuddyPress Multilingual both are activated.
I have found the issue that one of the function doesn’t change the page URL to member page URL in. Can you please change the below function to add the support for the BuddyBoss Platform ( forked from BuddyPress ).
public function wpml_fix_redirection( $q ){ if ( !defined( 'DOING_AJAX' ) && !bp_is_blog_page() && (bool) $q->get( 'page_id' ) === false && (bool) $q->get( 'pagename' ) === true ) { $bp_current_component = bp_current_component(); $bp_current_action = bp_current_action(); $bp_pages = bp_core_get_directory_pages(); if ( $bp_current_component == 'activity' && $bp_current_action == 'just-me' ) { if ( isset( $bp_pages->members->id ) ) { $q->set( 'page_id', $bp_pages->members->id ); } } elseif ( $bp_current_component == 'activity' && ( $bp_current_action == 'p' || is_numeric( $bp_current_action ) ) ) { if ( isset( $bp_pages->members->id ) ) { $q->set( 'page_id', $bp_pages->members->id ); } } elseif ( $bp_current_component == 'groups' && $bp_current_action == 'members' ) { if ( isset( $bp_pages->groups->id ) ) { $q->set( 'page_id', $bp_pages->groups->id ); } } elseif ( $bp_current_component == 'groups' && $bp_current_action == 'my-groups' ) { if ( isset( $bp_pages->members->id ) ) { $q->set( 'page_id', $bp_pages->members->id ); } } elseif ( $bp_current_component == 'activity' && $bp_current_action == 'groups' ) { if ( isset( $bp_pages->members->id ) ) { $q->set( 'page_id', $bp_pages->members->id ); } } elseif( $bp_current_component == 'photos' && $bp_current_action == 'my-media' ){ if ( isset( $bp_pages->members->id ) ) { $q->set( 'page_id', $bp_pages->media->id ); } }elseif( $bp_current_component == 'forums' && $bp_current_action == 'topics' ){ if ( isset( $bp_pages->members->id ) ) { $q->set( 'page_id', $bp_pages->members->id ); } }else { $page_id = apply_filters( 'bpml_redirection_page_id', null, $bp_current_component, $bp_current_action, $bp_pages ); if ( $page_id ) { $q->set( 'page_id', $page_id ); } } } return $q; }
- The topic ‘BuddyBoss Platform plugin support’ is closed to new replies.