Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can we add wire to custom component?


  • talk2manoj
    Participant

    @talk2manoj

    Hi,

    Is there any way to add wire to custom component?

    Like http://domain.com/members/admin/component/wire

    In bp-wire-teamplatetags.php there is a function (bp_wire_get_action) which we can be used for root component like group etc. but what if I want it for users.

    Also Is it possible to have wire working without showing it in any menu.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

  • talk2manoj
    Participant

    @talk2manoj

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


    hyrxx
    Participant

    @hyrxx

    what are you trying to achieve by moving it to each component?

    so the user can comment on activity groups etc? that seems a little strange to me,

    create your own wire by copying some code from the wire component and modify it to suit your needs?

    im still kinda working out what your doing

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How can we add wire to custom component?’ is closed to new replies.
Skip to toolbar