Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 11 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:


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 13 years ago.

Download all attachments as: .zip

Change History (10)

#1 @josephscott
13 years ago

  • Owner changed from anonymous to josephscott

#2 @foolswisdom
13 years ago

  • Milestone set to 2.4 (future)

Every ticket should have a milestone.

#3 @matt
13 years ago

+1, triple-check the SQL and escaping.

#4 @josephscott
13 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.

#5 @josephscott
13 years ago

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

#6 @josephscott
13 years ago

  • Cc josephscott added

#7 @josephscott
13 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.

#8 @josephscott
13 years ago

  • Keywords has-patch added

#9 @ryan
13 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.