Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#30965 closed enhancement (fixed)

get_comment_statuses() - does not contain the "Trash" comment status

Reported by: tyxla's profile tyxla Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 2.7
Component: Comments Keywords: has-patch needs-refresh
Focuses: Cc:


The get_comment_statuses() function is expected to retrieve all of the available comment statuses, however it does not return the trash status.

Attachments (1)

get_comment_statuses.patch (436 bytes) - added by tyxla 9 years ago.
Adding the trash comment status to the output of get_comment_statuses()

Download all attachments as: .zip

Change History (8)

#1 @tyxla
9 years ago

  • Keywords needs-patch added

9 years ago

Adding the trash comment status to the output of get_comment_statuses()

#2 follow-up: @tyxla
9 years ago

  • Keywords has-patch added; needs-patch removed

#3 in reply to: ↑ 2 @rachelbaker
9 years ago

  • Type changed from defect (bug) to enhancement
  • Version changed from 4.1 to 2.7

I agree that trash being omitted from the returned values of get_comment_statuses() is misleading. get_comment_statuses() was created, and is only internally used, to provide comment_statuses for the XMLRPC wp.editComment endpoint. I believe the reason trash was left off the returned values here is that they don't include handling for trashing, or editing and trashing comments.

If this ticket is going to move forward the logic in wp_xmlrpc_server::wp_editComment() will also need a refresh, and test coverage.

#4 @rachelbaker
9 years ago

  • Keywords dev-feedback added

#5 @rachelbaker
9 years ago

  • Keywords needs-refresh added; dev-feedback removed

Related #20977

#6 @wonderboymusic
9 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 34524:

Comments: In get_comment_statuses(), also return trash.
XML-RPC: In wp_xmlrpc_server::wp_editComment(), allow comments to be trashed.

Introduce unit tests for wp_editComment in xmlrpc/* #NeverForget

Props tyxla, wonderboymusic.
Fixes #30965.

#7 @netweb
9 years ago

  • Milestone changed from Awaiting Review to 4.4
Note: See TracTickets for help on using tickets.