Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter('wp_die_handler', 'custom_wp_die_handler', 999, 3 );
- function custom_wp_die_handler( $message, $title = '', $args = array() )
- {
- list( $message, $title, $parsed_args ) = _wp_die_process_input( $message, $title, $args );
- if ( is_string( $message ) ) {
- if ( ! empty( $parsed_args['additional_errors'] ) ) {
- $message = array_merge(
- array( $message ),
- wp_list_pluck( $parsed_args['additional_errors'], 'message' )
- );
- $message = "<ul>\n\t\t<li>" . implode( "</li>\n\t\t<li>", $message ) . "</li>\n\t</ul>";
- }
- $message = sprintf(
- '<p>%s</p>',
- $message
- );
- }
- $have_gettext = function_exists( '__' );
- if ( ! empty( $parsed_args['link_url'] ) && ! empty( $parsed_args['link_text'] ) ) {
- $link_url = $parsed_args['link_url'];
- if ( function_exists( 'esc_url' ) ) {
- $link_url = esc_url( $link_url );
- }
- $link_text = $parsed_args['link_text'];
- $message .= "\n<p><a href='{$link_url}'>{$link_text}</a></p>";
- }
- if ( isset( $parsed_args['back_link'] ) && $parsed_args['back_link'] ) {
- $back_text = $have_gettext ? __( '« Back' ) : '« Back';
- $message .= "\n<p><a href='javascript:history.back()'>$back_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 get_language_attributes() if available.
- if ( empty( $args['text_direction'] )
- && function_exists( 'language_attributes' ) && function_exists( 'is_rtl' )
- ) {
- $dir_attr = get_language_attributes();
- }
- ?>
- <!DOCTYPE html>
- <html <?php echo $dir_attr; ?>>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $parsed_args['charset']; ?>" />
- <?php
- if ( function_exists( 'wp_robots' ) && function_exists( 'wp_robots_no_robots' ) && function_exists( 'add_filter' ) ) {
- add_filter( 'wp_robots', 'wp_robots_no_robots' );
- wp_robots();
- }
- ?>
- <title><?php echo $title; ?></title>
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <style media="all">
- @import url(https://fonts.googleapis.com/css?family=opensans:500);
- ._1,._404,.c{position:relative}body,hr{color:#fff}body,hr:after{background:#3c9}body{font-family:'Open Sans',sans-serif;max-height:700px;overflow:hidden}.c{text-align:center;display:block;width:80%;margin:100px auto}._404{font-size:220px;display:inline-block;z-index:2;height:250px;letter-spacing:15px}._1,hr:after{font-size:2em}._1,._2{display:block;text-align:center}._1{letter-spacing:12px;line-height:80%;padding:20px}._2{position:relative;font-size:20px}.btn,.text,hr:after{display:inline-block;position:relative}.text{font-size:70px;text-align:center;margin:19px 0 0;z-index:3;width:100%;line-height:1.2em}.btn{background-color:#fff;width:358px;padding:5px;z-index:5;font-size:25px;margin:0 10px 0 auto;color:#3c9;text-decoration:none}.cloud,.cloud:after,.cloud:before{position:absolute;background:#fff;z-index:-1}.right{float:right;width:60%}hr{padding:0;border:none;border-top:5px solid #fff;text-align:center;margin:0 auto;width:420px;height:10px;z-index:-10}hr:after{content:"\2022";top:-.75em;padding:0 .2em}.cloud{width:350px;height:120px;background:linear-gradient(top,#fff 100%);background:-webkit-linear-gradient(top,#fff 100%);background:-moz-linear-gradient(top,#fff 100%);background:-ms-linear-gradient(top,#fff 100%);background:-o-linear-gradient(top,#fff 100%);border-radius:100px;-webkit-border-radius:100px;-moz-border-radius:100px;margin:120px auto 20px;transition:1s}.cloud:after,.cloud:before{content:''}.cloud:after{width:100px;height:100px;top:-50px;left:50px;border-radius:100px;-webkit-border-radius:100px;-moz-border-radius:100px}.cloud:before{width:180px;height:180px;top:-90px;right:50px;border-radius:200px;-webkit-border-radius:200px;-moz-border-radius:200px}.x1{top:-50px;left:100px;-webkit-transform:scale(.3);-moz-transform:scale(.3);transform:scale(.3);opacity:.9;-webkit-animation:15s linear infinite moveclouds;-moz-animation:15s linear infinite moveclouds;-o-animation:15s linear infinite moveclouds}.x1_5{top:-80px;left:250px;-webkit-transform:scale(.3);-moz-transform:scale(.3);transform:scale(.3);-webkit-animation:17s linear infinite moveclouds;-moz-animation:17s linear infinite moveclouds;-o-animation:17s linear infinite moveclouds}.x2,.x3{left:250px;-webkit-animation:25s linear infinite moveclouds;-moz-animation:25s linear infinite moveclouds;-o-animation:25s linear infinite moveclouds}.x2{top:30px;-webkit-transform:scale(.6);-moz-transform:scale(.6);transform:scale(.6);opacity:.6}.x3{bottom:-70px;-webkit-transform:scale(.6);-moz-transform:scale(.6);transform:scale(.6);opacity:.8}.x4{left:470px;botttom:20px;-webkit-transform:scale(.75);-moz-transform:scale(.75);transform:scale(.75);opacity:.75;-webkit-animation:18s linear infinite moveclouds;-moz-animation:18s linear infinite moveclouds;-o-animation:18s linear infinite moveclouds}.x5{left:200px;top:300px;-webkit-transform:scale(.5);-moz-transform:scale(.5);transform:scale(.5);opacity:.8;-webkit-animation:20s linear infinite moveclouds;-moz-animation:20s linear infinite moveclouds;-o-animation:20s linear infinite moveclouds}@-webkit-keyframes moveclouds{0%{margin-left:1000px}100%{margin-left:-1000px}}@-moz-keyframes moveclouds{0%{margin-left:1000px}100%{margin-left:-1000px}}@-o-keyframes moveclouds{0%{margin-left:1000px}100%{margin-left:-1000px}}
- </style>
- </head>
- <body>
- <?php endif; // ! did_action( 'admin_head' ) ?>
- <div id="clouds">
- <div class="cloud x1"></div>
- <div class="cloud x1_5"></div>
- <div class="cloud x2"></div>
- <div class="cloud x3"></div>
- <div class="cloud x4"></div>
- <div class="cloud x5"></div>
- </div>
- <div class='c'>
- <div class='_404'><?php if ( isset ( $args['response'] ) ) { echo $args['response']; } else { echo '404'; } ?></div>
- <hr>
- <div class='_1'><?php echo $title ?></div>
- <div class='_2'> </div>
- <a class='btn' href='<?php echo get_site_url(); ?>'>BACK TO MARS</a>
- </div>
- </body>
- </html>
- <?php
- if ( $parsed_args['exit'] ) {
- die();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement