bp_get_message_thread_delete_link( int $user_id = null )

Generate the URL for deleting the current thread.


Parameters Parameters

$user_id

(int) (Optional) ID of the user relative to whom the link should be generated. Default: ID of logged-in user.

Default value: null


Top ↑

Return Return

(string)


Source Source

File: bp-messages/bp-messages-template.php

	function bp_get_message_thread_delete_link( $user_id = null ) {
		global $messages_template;

		if ( null === $user_id ) {
			$user_id = bp_loggedin_user_id();
		}

		$domain = bp_core_get_user_domain( $user_id );

		/**
		 * Filters the URL for deleting the current thread.
		 *
		 * @since 1.0.0
		 *
		 * @param string $value   URL for deleting the current thread.
		 * @param int    $user_id ID of the user relative to whom the link should be generated.
		 */
		return apply_filters( 'bp_get_message_thread_delete_link', wp_nonce_url( trailingslashit( $domain . bp_get_messages_slug() . '/' . bp_current_action() . '/delete/' . $messages_template->thread->thread_id ), 'messages_delete_thread' ), $user_id );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.