BuddyDev

Search

[Resolved] Activity confirm action support for confirm bp action plugin

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2934
    Ravi on #22532

    Hello Tosin,

    Please try the following code. Replace your code with this

    
    
    function bpdelete_remove_activity_delete_text(){
    	$url   = bp_get_activity_delete_url();
    	$class = 'delete-activity';
    
    	$link = '<a href="' . esc_url( $url ) . '" class="button item-button bp-secondary-action delete-activity confirm no-ajaxy fas fa-trash-alt" rel="nofollow">' . __( '', 'buddypress' ) . '</a>';
    	return $link;
    }
    add_filter('bp_get_activity_delete_link', 'bpdelete_remove_activity_delete_text', 9 );
    

    Please let me know if it works or not.

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #22542

    Hello

    I just tried the code but it did not work.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2934
    Ravi on #22544

    Hello Tosin,

    Please link me to your site with some demo credential so that I can check there.

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #22546
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2934
    Ravi on #22550

    Hello Tosin,

    It seems you have not used my code. Make sure in your bp-custom.php file. The following filter attached with priority 9

    
    add_filter('bp_get_activity_delete_link', 'bpdelete_remove_activity_delete_text', 9 );
    

    Or please post me code from bp-custom.php again.

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #22553

    This is the code im my bp-custom.php file

     function bpdelete_remove_activity_delete_text(){
    	$url   = bp_get_activity_delete_url();
    	$class = 'delete-activity';
    
    	$link = '<a href="' . esc_url( $url ) . '" class="button item-button bp-secondary-action delete-activity confirm no-ajaxy fas fa-trash-alt" rel="nofollow">' . __( '', 'buddypress' ) . '</a>';
    	return $link;
    }
    add_filter('bp_get_activity_delete_link', 'bpdelete_remove_activity_delete_text', 9 ); 
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2934
    Ravi on #22556

    Hello Tosin,

    I have checked again. Now it is working for me. Please check

    Regards
    Ravi

  • Participant
    Level: Guru
    Posts: 885
    Tosin on #22557

    Hello,

    It is working now I tried to re-save the bp-confirm-actions settings page twice and now it’s working perfectly, also i’m not so sure but I think caching was part of the problem.

    Thank you so much for your patience and assistance, i’m very grateful

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2934
    Ravi on #22560

    Hello Tosin,

    Thank you for the acknowledgement. I am glad that I could help.

    Regards
    Ravi

The topic ‘ [Resolved] Activity confirm action support for confirm bp action plugin’ is closed to new replies.

This topic is: resolved