Make WordPress Core

Opened 4 years ago

Last modified 18 months ago

#27671 assigned enhancement

wp_die() handler for admin-post.php

Reported by: danielbachhuber Owned by: whyisjake
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Administration Keywords: good-first-bug has-patch needs-testing
Focuses: Cc:


Similar to how admin-ajax.php has _ajax_wp_die_handler, it would be nice if admin-post.phphad a custom wp_die() handler for errors.

Attachments (1)

admin-post.diff (964 bytes) - added by gorantq 18 months ago.

Download all attachments as: .zip

Change History (7)

#1 @nacin
4 years ago

This was done specifically so our AJAX methods would become testable. What would be the benefit to admin-post.php? Same?

#2 @danielbachhuber
4 years ago

For me, use wp_die() as an error handler with admin-post.

#3 @paulschreiber
4 years ago

I looked in admin-ajax.php but couldn't find any handlers. The only place I found _ajax_wp_die_handler was in class-wp-customize-manager.php.

#4 @johnbillion
4 years ago

  • Owner set to whyisjake
  • Status changed from new to assigned

#5 @prasoon2211
3 years ago

I was taking a look at this ticket and found out that the _ajax_wp_die_handler has moved to wp-includes/functions.php.

18 months ago

#6 @gorantq
18 months ago

  • Keywords has-patch needs-testing added; needs-patch removed
Note: See TracTickets for help on using tickets.