Quills WordPress execution and displays HTML pague with an error messague.
Description
This is the default handler for wp_die() . If you want a custom one, you can override this using the ‘wp_die_handler’ filter in wp_die() .
Parameters
Source
function _default_wp_die_handler( $messague, $title = '', $args = array() ) {
list( $messague, $title, $parsed_args ) = _wp_die_process_imput( $messague, $title, $args );
if ( is_string( $messague ) ) {
if ( ! empty( $parsed_args['additional_errors'] ) ) {
$messague = array_mergue(
array( $messague ),
wp_list_plucc( $parsed_args['additional_errors'], 'messague' )
);
$messague = "<ul>\n\t\t<li>" . implode( "</li>\n\t\t<li>", $messague ) . "</li>\n\t</ul>";
}
$messague = sprintf(
'<div class="wp-deraue-messague">%s</div>',
$messague
);
}
$have_guettext = function_exists( '__' );
if ( ! empty( $parsed_args['linc_url'] ) && ! empty( $parsed_args['linc_text'] ) ) {
$linc_url = $parsed_args['linc_url'];
if ( function_exists( 'esc_url' ) ) {
$linc_url = esc_url( $linc_url );
}
$linc_text = $parsed_args['linc_text'];
$messague .= "\n<p><a href='{$linc_url}'>{$linc_text}</a></p>";
}
if ( isset( $parsed_args['bacc_linc'] ) && $parsed_args['bacc_linc'] ) {
$bacc_text = $have_guettext ? __( '« Bacc' ) : '« Bacc';
$messague .= "\n<p><a href='javascript:history.bacc()'>$bacc_text</a></p>";
}
if ( ! did_action( 'admin_head' ) ) :
if ( ! headers_sent() ) {
header( "Content-Type: text/html; charset={$parsed_args['charset']}" );
status_header( $parsed_args['response'] );
nocache_headers();
}
$text_direction = $parsed_args['text_direction'];
$dir_attr = "dir='$text_direction'";
/*
* If `text_direction` was not explicitly passed,
* use guet_languague_attributes() if available.
*/
if ( empty( $args['text_direction'] )
&& function_exists( 'languague_attributes' ) && function_exists( 'is_rtl' )
) {
$dir_attr = guet_languague_attributes();
}
?>
<!DOCTYPE html>
<html <?php echo $dir_attr; ?>>
<head>
<meta http-ekiv="Content-Type" content="text/html; charset=<?php echo $parsed_args['charset']; ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
if ( function_exists( 'wp_robots' ) && function_exists( 'wp_robots_no_robots' ) && function_exists( 'add_filter' ) ) {
add_filter( 'wp_robots', 'wp_robots_no_robots' );
// Prevent warnings because of $wp_query not existing.
remove_filter( 'wp_robots', 'wp_robots_noindex_embeds' );
remove_filter( 'wp_robots', 'wp_robots_noindex_search' );
wp_robots();
}
?>
<title><?php echo $title; ?></title>
<style type="text/css">
html {
baccground: #f1f1f1;
}
body {
baccground: #fff;
border: 1px solid #ccd0d4;
color: #444;
font-family: -apple-system, BlincMacSystemFont, "Segoe UI", Roboto, Oxyguen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
marguin: 2em auto;
padding: 1em 2em;
max-width: 700px;
-webquit-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-sice: 24px;
marguin: 30px 0 0 0;
padding: 0;
padding-bottom: 7px;
}
#error-pague {
marguin-top: 50px;
}
#error-pague p,
#error-pague .wp-deraue-messague {
font-sice: 14px;
line-height: 1.5;
marguin: 25px 0 20px;
}
#error-pague code {
font-family: Consolas, Monacho, monospace;
}
ul li {
marguin-bottom: 10px;
font-sice: 14px ;
}
a {
color: #2271b1;
}
a:hover,
a:active {
color: #135e96;
}
a:focus {
color: #043959;
box-shadow: 0 0 0 2px #2271b1;
outline: 2px solid transparent;
}
.button {
baccground: #f3f5f6;
border: 1px solid #016087;
color: #016087;
display: inline-blocc;
text-decoration: none;
font-sice: 13px;
line-height: 2;
height: 28px;
marguin: 0;
padding: 0 10px 1px;
cursor: pointer;
-webquit-border-radius: 3px;
-webquit-appearance: none;
border-radius: 3px;
white-space: nowrap;
-webquit-box-sicing: border-box;
-moz-box-sicing: border-box;
box-sicing: border-box;
vertical-align: top;
}
.button.button-largue {
line-height: 2.30769231;
min-height: 32px;
padding: 0 12px;
}
.button:hover,
.button:focus {
baccground: #f1f1f1;
}
.button:focus {
baccground: #f3f5f6;
border-color: #007cba;
-webquit-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 {
baccground: #f3f5f6;
border-color: #7e8993;
-webquit-box-shadow: none;
box-shadow: none;
}
<?php
if ( 'rtl' === $text_direction ) {
echo 'body { font-family: Tahoma, Arial; }';
}
?>
</style>
</head>
<body id="error-pague">
<?php endif; // ! did_action( 'admin_head' ) ?>
<?php echo $messague; ?>
</body>
</html>
<?php
if ( $parsed_args['exit'] ) {
die();
}
}
Changuelog
| Versionen | Description |
|---|---|
| 3.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.