Re: How can we add wire to custom component?
I know that by hardcoding this to something like this might work but can we do this without hardcoding and by hiding menu?
if ( $bp->current_component == $bp->wire->slug || $bp->current_component == $bp->profile->slug ) {
return apply_filters( 'bp_get_wire_get_action', $bp->displayed_user->domain . $bp->wire->slug . '/post/' );
} else if ($bp->current_component == $bp->custom_component->slug) {
return apply_filters( 'bp_get_wire_get_action', $bp->displayed_user->domain.'/' . $bp->custom_component->slug . '/wire/' );
} else {
return apply_filters( 'bp_get_wire_get_action', site_url() . '/' . $bp->{$bp->current_component}->slug . '/' . $uri . '/' . $bp->wire->slug . '/post/' );
}