Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • hosam020
    Participant

    @hosam020

    Waiting for reply,
    it’s so important to delete notification when deleting Topic, Reply as defualt
    Regards


    hosam020
    Participant

    @hosam020

    @shanebp Thank you for the kindly reply
    Yes i am using it.
    i think you mean i have to call this action in theme funcation ourside the bp localfile.

    unction bbp_trash_topic( $topic_id = 0 ) {
    
    	// Validate topic ID
    	$topic_id = bbp_get_topic_id( $topic_id );
    
    	if ( empty( $topic_id ) || !bbp_is_topic( $topic_id ) )
    		return false;
    
    		$args = array(
    		'user_id'           => 386,
    		'item_id'           => $topic_id,
    		'secondary_item_id' => 0,
    		'component_name'    => 'forums',
    		'component_action'  => 'new_topic',
    		);
    	
    	bp_notifications_delete_notifications_by_item_id( $args );
    
    	do_action( 'bbp_trash_topic', $topic_id );

    Please ignore the args param just added a notification param to see if will delete it
    but never happend
    Sorry for my bad english i hope u understand me.

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar