Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function comment_post_wp_die_handler( $message, $title = '', $args = array() ) {
- if ( !headers_sent() ) {
- nocache_headers();
- header( 'Content-Type: text/html; charset=utf-8' );
- }
- ?>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title><?php _e('WordPress › Error'); ?></title>
- <style type="text/css">
- html {
- background: #f9f9f9;
- }
- body {
- background: #fff;
- color: #333;
- font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
- margin: 2em auto;
- width: 700px;
- padding: 1em 2em;
- -moz-border-radius: 11px;
- -khtml-border-radius: 11px;
- -webkit-border-radius: 11px;
- border-radius: 11px;
- border: 1px solid #dfdfdf;
- }
- #error-page {
- margin-top: 50px;
- }
- #error-page p {
- font-size: 12px;
- line-height: 18px;
- margin: 25px 0 20px;
- }
- #error-page code {
- font-family: Consolas, Monaco, monospace;
- }
- </style>
- </head>
- <body id="error-page">
- <p><?php if ( is_string( $message ) ) echo $message; ?></p>
- <p><a href='javascript:history.back()'><?php _e('« Back'); ?></a></p>
- </body>
- </html>
- <?php
- die();
- }
- function add_comment_post_wp_die_handler() {
- if ( false !== strpos( $_SERVER['REQUEST_URI'], 'wp-comments-post.php' ) )
- return 'comment_post_wp_die_handler';
- else
- return '_default_wp_die_handler';
- }
- add_filter('wp_die_handler', 'add_comment_post_wp_die_handler');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement