WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 4 years ago

#4599 closed enhancement (fixed)

XMLRPC should implement a method for deleting categories

Reported by: redsweater Owned by: josephscott
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.2.1
Component: XML-RPC Keywords: has-patch
Focuses: Cc:

Description

The wp.newCategory method is a great addition to the remote API. But it seems like it's missing its counterpart: wp.deleteCategory, or some similarly named method.

I've also been wondering whether it would have been a good idea to make the "newCategory" method a plural? If we were dealing in wp.newCategories and wp.deleteCategories it would reduce the number of separate network requests that are required when multiples are being manipulated.

Attachments (1)

xml-rpc.php.diff (1.5 KB) - added by josephscott 6 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 josephscott7 years ago

  • Owner changed from anonymous to josephscott

comment:2 foolswisdom7 years ago

  • Milestone set to 2.4 (future)

Every ticket should have a milestone.

comment:3 matt7 years ago

+1, triple-check the SQL and escaping.

josephscott6 years ago

comment:4 josephscott6 years ago

The attached diff adds a new method, wp.deleteCategory(blog_id, username, password, category_id). Will return a 0 (zero) or a 1.

comment:5 josephscott6 years ago

Forgot the mention, this contains a small clean up item for wp.newCategory as well.

comment:6 josephscott6 years ago

  • Cc josephscott added

comment:7 josephscott6 years ago

Joe Cheng brought up a good point, when a category that is deleted has children be aware that all of the children will be bumped up a level.

comment:8 josephscott6 years ago

  • Keywords has-patch added

comment:9 ryan6 years ago

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

(In [6417]) wp.deleteCategory xmlrpc method from josephscott. fixes #4599

Note: See TracTickets for help on using tickets.