Search.../

onPostUnpinned( )

A backend event that fires when a forum post is unpinned.

Description

The onPostUnpinned() event handler runs when an existing forum post in your site is unpinned. Only forum admins can unpin posts. The received UnpinnedPost object contains information about the post that was unpinned.

Note: Backend events are not fired when previewing your site.

Syntax

function onPostUnpinned(event: UnpinnedPost): void

onPostUnpinned Parameters

NAME
TYPE
DESCRIPTION
event
UnpinnedPost

Information about the forum post that was unpinned.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

A backend event that occurs when a forum post is unpinned

Copy Code
1// Place this code in a file named events.js
2// in the Backend section of your code files.
3
4export function wixForum_onPostUnpinned(event) {
5 const unpinnedPostId = event.postId;
6 console.log("Post unpinned");
7}