Make WordPress Core

Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#10171 closed feature request (worksforme)

wp_die error template

Reported by: riivolepp's profile riivolepp Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

It would be nice if you can customize wp_die error template. Or at least style wouldn't come from wp-admin directory. Current hardcoded solution makes difficult protecting wp-admin directory ie. with http password.

Change History (7)

#1 @Denis-de-Bernardy
15 years ago

  • Keywords close added
  • Milestone changed from Unassigned to Future Release

One or two dups of this has been closed recently, based on the idea that the file's very presence is questionable in the first place. In short, it would be desirable to place the error messages inline instead, and not use wp_die at all.

#2 @dd32
15 years ago

  • Keywords close removed

+1 for moving CSS which is used on frontend and backend to wp-includes.

-1 for putting all markup inline for errors, that just utterly stupid when you can use a templated function such as wp_die();

#3 @F J Kaiser
14 years ago

-1

wp_die() can have a custom title. I missuse for various stuff, where is just want to interrupt like an install notice. You can style it with css with no problem.

#4 @johnbillion
13 years ago

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

The wp_die_handler added in 3.0 allows the output of wp_die() to be overriden.

#5 follow-up: @F J Kaiser
13 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Not really. You can just override the _default_wp_die_handler() function. Like with wp_login.php & wp_admin/install.php most people just need to override the .css files, which is only possible if you redefine the wp_admin_css function or in this case the complete _default_wp_die_handler function. Better & easier would be to just have filters for the .css files.

#6 in reply to: ↑ 5 ; follow-up: @westi
13 years ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from reopened to closed

Replying to F J Kaiser:

Not really. You can just override the _default_wp_die_handler() function. Like with wp_login.php & wp_admin/install.php most people just need to override the .css files, which is only possible if you redefine the wp_admin_css function or in this case the complete _default_wp_die_handler function. Better & easier would be to just have filters for the .css files.

The best way to override the look and feel of the _default_wp_die_handler() is to register another one.

#7 in reply to: ↑ 6 @F J Kaiser
13 years ago

Replying to westi:

The best way to override the look and feel of the _default_wp_die_handler() is to register another one.

That answer is pretty much the same, most people would give on "how can I alter the output of the gallery shortcode". The answer is: Copy/Paste the whole 200 lines of code ... to modify 1 line.

I understand that I can intercept & completely override it with a filter, but - like in most cases - it's not necessary to produce a lot of reduntant code if you simply can alter - the part that matters: - "the css" with exchanging the stylesheet with a simple filter. Imho a lot of core wp would be much easier to handle for themers if it would make use of WPs strongest parts: Filters & the Backpress procedural (scripts/styles) API. Isn't that why we have it?

Note: See TracTickets for help on using tickets.