Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#7446 closed enhancement (fixed)

XMLRPC Comments API

Reported by: ryan Owned by: anonymous
Priority: normal Milestone: 2.7
Component: XML-RPC Version:
Severity: normal Keywords: comments xmlrpc blessed
Cc: josephscott, redsweater

Description

Add API to XMLPRC for retrieving and managing comments.

Attachments (9)

7446.diff (4.7 KB) - added by ryan 5 years ago.
Incomplete and untested preview
7446.2.diff (8.2 KB) - added by ryan 5 years ago.
Drop separate method for setting comment status. Flesh out editComment.
7446.3.diff (12.8 KB) - added by ryan 5 years ago.
Add get_comments(). Register methods. Deprecate some old stuff.
7446.4.diff (13.4 KB) - added by ryan 5 years ago.
All methods tested except newComment. It needs some more work.
7446.5.diff (13.7 KB) - added by ryan 5 years ago.
Allow fetching comments for a particular post
7446.6.diff (14.2 KB) - added by ryan 5 years ago.
Working newComment
7446.7.diff (15.5 KB) - added by ryan 5 years ago.
Handle anonymous comments
7446.8.diff (15.7 KB) - added by ryan 5 years ago.
Add offset and number support to getComments
7446.9.diff (15.7 KB) - added by ryan 5 years ago.
Couple small corrections

Download all attachments as: .zip

Change History (19)

comment:1   ryan5 years ago

  • Keywords blessed added
  • Cc josephscott added
  • Component changed from General to XML-RPC
  • Type changed from defect to enhancement

There's been some discussion about this on the wp-xmlrpc list: http://comox.textdrive.com/pipermail/wp-xmlrpc/

ryan5 years ago

Incomplete and untested preview

ryan5 years ago

Drop separate method for setting comment status. Flesh out editComment.

ryan5 years ago

Add get_comments(). Register methods. Deprecate some old stuff.

ryan5 years ago

All methods tested except newComment. It needs some more work.

ryan5 years ago

Allow fetching comments for a particular post

comment:3   ryan5 years ago

getComments() accepts optional status and post_id. A separate getPostComments() has been suggested. It'd probably just be an alias to getComments() with different argument passing if we added it.

newComment() needs a little more work. All other methods have had basic testing and are hopefully complete.

  • Cc redsweater added

ryan5 years ago

Working newComment

comment:5   ryan5 years ago

In 7446.6 all methods are completed and tested. I left support for unregistered commenting out of newComments for now.

ryan5 years ago

Handle anonymous comments

ryan5 years ago

Add offset and number support to getComments

ryan5 years ago

Couple small corrections

comment:7   ryan5 years ago

(In [8543]) XML-RPC comments API. see #7446

When editing a comment in moderation, http://trac.wordpress.org/browser/trunk/wp-includes/comment.php?rev=8543#L863 is causing the comment to be be approved with any changes to the Approval Status.

comment:9   ryan5 years ago

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

(In [8622]) comment_approved can be zero, so check with isset instead of empty. fixes #7446

(In [8698]) Typo fix. Props josephscott. see #7446

Note: See TracTickets for help on using tickets.