Opened 10 months ago

#21472 new enhancement

Allow supplying a custom text to status_header()

Reported by: nbachiyski Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: minor Keywords: has-patch
Cc:

Description

Problem: I'd like to issue a HTTP 500 error, but include a text different from Internal Server Error, so that the client knows what caused the error.

Currently for a known error code the status_header() function always uses the global array $wp_header_to_desc and the only way to have my own text is to set the value in the global array.

The patch adds a second a argument to status_header().

Attachments (1)

status-header-custom-text.diff (699 bytes) - added by nbachiyski 10 months ago.

Download all attachments as: .zip

Change History (1)

Note: See TracTickets for help on using tickets.