API / Minn\Http / DiePage

DiePage final class

Minn\Http\DiePage · public/minn/src/Minn/Http/DiePage.php · 126 lines

The page wp_die shows a browser, as the reference draws it (probe functions-remaining): its stylesheet word for word, the html element's language (or dir='rtl' for a right-to-left message, which also sets a Tahoma font), the charset, the robots tag, the title and the message as given, then any links. The caller escapes what needs escaping. The stylesheet is kept here with four spaces for each of its tabs.

Uses 1

Constants and properties

privateSTYLES = ' html { background: #f1f1f1; } body { background: #fff; border: 1px solid #ccd0d4; color: #444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; margin: 2em auto; padding: 1em 2em; max-width: 700px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04); box-shadow: 0 1px 1px rgba(0, 0, 0, .04); } h1 { border-bottom: 1px solid #dadada; clear: both; color: #666; font-size: 24px; margin: 30px 0 0 0; padding: 0; padding-bottom: 7px; } #error-page { margin-top: 50px; } #error-page p, #error-page .wp-die-message { font-size: 14px; line-height: 1.5; margin: 25px 0 20px; } #error-page code { font-family: Consolas, Monaco, monospace; } ul li { margin-bottom: 10px; font-size: 14px ; } a { color: #3858e9; } a:hover, a:active { color: #183ad6; } a:focus { color: #183ad6; box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 1.5px) var(--wp-admin-theme-color, #3858e9); outline: 2px solid transparent; } .button { background: #f3f5f6; border: 1px solid #016087; color: #016087; display: inline-block; text-decoration: none; font-size: 13px; line-height: 2; height: 28px; margin: 0; padding: 0 10px 1px; cursor: pointer; -webkit-border-radius: 3px; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; vertical-align: top; } .button.button-large { line-height: 2.30769231; min-height: 32px; padding: 0 12px; } .button:hover, .button:focus { background: #f1f1f1; } .button:focus { background: #f3f5f6; border-color: #007cba; -webkit-box-shadow: 0 0 0 1px #007cba; box-shadow: 0 0 0 1px #007cba; color: #016087; outline: 2px solid transparent; outline-offset: 0; } .button:active { background: #f3f5f6; border-color: #7e8993; -webkit-box-shadow: none; box-shadow: none; }'

Public

statichtml(string $languageAttributes, string $direction, string $charset, string $robots, string $title, string $message, string $links): string#

The whole page: $languageAttributes go inside <html> unless the direction is 'rtl'; $robots is the printed robots tag.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatestyles(): string#

The stylesheet with its tabs back.