A backend event that fires when a forum post is pinned.
The onPostPinned()
event handler runs when an existing forum post in your site is pinned.
Only forum admins can pin posts. The received PinnedPost
object contains information about the post that was pinned.
Note: Backend events are not fired when previewing your site.
function onPostPinned(event: PinnedPost): void;
Information about the forum post that was pinned.
// Place this code in a file named events.js
// in the Backend section of your code files.
export function wixForum_onPostPinned(event) {
const pinnedPostId = event.postId;
console.log("Post pinned");
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.