Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Buddy Press Private Message Delete Permission to Only Admin

@prashantvatsh

Participant

Hi,

I have tried the same code

<?php if(current_user_can('manage_options')){?>
							<a class="delete" href="<?php bp_message_thread_delete_link( bp_displayed_user_id() ); ?>"><span class="dashicons dashicons-trash"></span></a>

							<?php
							}

and

<?php if(current_user_can('manage_options')){?>
				
				<a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>"><i class="fas fa-trash-alt"></i><?php _e( 'Delete', 'youzer' ); ?></a>
			<?php }?>

Both are working super fine. If I am logged in as an admin user then only I have the capability otherwise not.

Thanks

Skip to toolbar