Ticket #5342 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

Output WP_Error message when adding categories via AJAX

Reported by: ryan Owned by: anonymous
Priority: normal Milestone: 2.5
Component: General Version:
Severity: normal Keywords: ajax category error
Cc:

Description (last modified by ryan) (diff)

Currently, adding categories via AJAX outputs a generic error message when something goes wrong in wp_insert_category() since that function does not return WP_Error. Let's add an option to wp_insert_category() that tells it to return WP_Error instead of 0. We must maintain returning 0 by default for back-compat reasons.

Attachments

inset_cat_wp_err.diff Download (1.3 KB) - added by ryan 4 years ago.

Change History

ryan4 years ago

comment:1   ryan4 years ago

  • Description modified (diff)

comment:2   ryan4 years ago

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

(In [6329]) Output WP_Error message when adding categories via AJAX. fixes #5342

Note: See TracTickets for help on using tickets.