Skip to:
Content
Pages
Categories
Search
Top
Bottom

I want accept and reject button functionality on notification section


  • cisdev
    Participant

    @cisdev

    Hello,
    I am working with buddy press and i have one task I want accept and reject both button functionality on notification section in place of Read|Delete action and both should be work like real button work accept and reject.

    I am trying but it is not working. my add code for accept and reject both button .

    
    <div class="action">
    		<a>"><?php _e( 'Accept', 'buddypress' ); ?></a> &nbsp;
    		<a>"><?php _e( 'Reject', 'buddypress' ); ?></a>
    
    		<?php do_action( 'bp_friend_requests_item_action' ); ?>
    	</div>

    using bp_friend_accept_request_link() i am not getting friend id like i got
    url
    localhost/myfolder/members/username/friends/requests/accept/?_wpnonce=3abfc1f1dd

    but it should be like
    localhost/myfolder/members/username/friends/requests/accept/22?_wpnonce=3abfc1f1dd

    i am missing 22and this is friend id. so please solve my problem.

    i also want when user accept and reject friend request then friend request notification should be hide or delete.

    Thanks

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

  • Henry Wright
    Moderator

    @henrywright

    i am missing 22and this is friend id. so please solve my problem.

    Are you using bp_friend_accept_request_link() outside of the loop? That might be the reason you’re not getting the friendship ID.

    Inside bp_friend_accept_request_link(), friends_get_friendship_id() is used to get the ID. This function accepts 2 arguments, the first is the ID of a particular user and the second is the ID of the logged-in user. If you use the function in the wrong context, the first argument is likely not set.


    cisdev
    Participant

    @cisdev

    Hello @henrywright,

    Thanks for your reply.i am working with my custom code but i am unable to do,i have try many times with my added custom code.in Notification section I want accept and reject both button functionality on notification section in place of Read|Delete action and also want same functionality like accept and reject both button working and also i want hide and remove when user accept or reject
    friend request then notification should be hide or remove from notification section.

    Please if you have any code or solution please share.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I want accept and reject button functionality on notification section’ is closed to new replies.
Skip to toolbar