Skip to content

Add unspam and untrash comment endpoints - #1564

Open
crazytonyli wants to merge 1 commit into
trunkfrom
comments-unspam-untrash
Open

Add unspam and untrash comment endpoints#1564
crazytonyli wants to merge 1 commit into
trunkfrom
comments-unspam-untrash

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Description

Mirror wp-admin's "Not Spam" and "Restore" actions with dedicated executor methods, implemented as paramless POST variants that send the REST status param's unspam/untrash values. These restore the comment's saved pre-spam/pre-trash status and fire the unspam_comment / untrash_comment hooks, which a plain hold status write would not do.

Not Spam Restore

Changelog

  • I've added an entry to CHANGELOG.md under ## [Unreleased], using the Keep a Changelog categories (Added, Changed, Deprecated, Removed, Fixed, Security). Prefix breaking changes with **BREAKING:**.

Mirror wp-admin's "Not Spam" and "Restore" actions with dedicated
executor methods, implemented as paramless POST variants that send the
REST status param's unspam/untrash values. These restore the comment's
saved pre-spam/pre-trash status and fire the unspam_comment /
untrash_comment hooks, which a plain hold status write would not do.
Replaces the CommentStatus.custom("unspam") / custom("untrash")
workaround used by the mobile apps.
@wpmobilebot

Copy link
Copy Markdown
Collaborator

XCFramework Build

This PR's XCFramework is available for testing. Add to your Package.swift:

.package(url: "https://github.com/automattic/wordpress-rs", branch: "pr-build/1564")

Built from 1e0dca4

@jkmassel jkmassel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has some unwanted side-effects. See #1566

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants