bp_get_activity_delete_url()

Return the URL to delete a single activity item.


Description Description


Return Return

(string) $link Activity delete link. Contains $redirect_to arg if on single activity page.


Top ↑

Source Source

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

	function bp_get_activity_delete_url() {
		global $activities_template;

		$url = trailingslashit( bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/delete/' . $activities_template->activity->id );

		// Determine if we're on a single activity page, and customize accordingly.
		if ( bp_is_activity_component() && is_numeric( bp_current_action() ) ) {
			$url = add_query_arg( array( 'redirect_to' => wp_get_referer() ), $url );
		}

		$url = wp_nonce_url( $url, 'bp_activity_delete_link' );

		/**
		 * Filters the activity delete URL.
		 *
		 * @since 2.1.0
		 *
		 * @param string $url Activity delete URL.
		 */
		return apply_filters( 'bp_get_activity_delete_url', $url );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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