summaryrefslogtreecommitdiffstats
path: root/wp-includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/functions.php')
-rw-r--r--wp-includes/functions.php65
1 files changed, 65 insertions, 0 deletions
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index f36a79a..30a5360 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -1035,6 +1035,7 @@ function wp_check_filetype($filename, $mimes = null) {
function wp_proxy_check($ipnum) {
if ( get_option('open_proxy_check') && isset($ipnum) ) {
+ $ipnum = preg_replace( '/([0-9]{1,3})\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/', '$1', $ipnum );
$rev_ip = implode( '.', array_reverse( explode( '.', $ipnum ) ) );
$lookup = $rev_ip . '.sbl-xbl.spamhaus.org.';
if ( $lookup != gethostbyname( $lookup ) )
@@ -1138,4 +1139,68 @@ function wp_nonce_ays($action) {
include_once(ABSPATH . '/wp-admin/admin-footer.php');
}
+function wp_die($message) {
+ global $wpdb;
+
+ if ( !$wpdb->show_errors )
+ return false;
+ header('Content-Type: text/html; charset=utf-8');
+
+ $output = <<<HEAD
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>WordPress &rsaquo; Error</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <style media="screen" type="text/css">
+ <!--
+ html {
+ background: #eee;
+ }
+ body {
+ background: #fff;
+ color: #000;
+ font-family: Georgia, "Times New Roman", Times, serif;
+ margin-left: 25%;
+ margin-right: 25%;
+ padding: .2em 2em;
+ }
+
+ h1 {
+ color: #006;
+ font-size: 18px;
+ font-weight: lighter;
+ }
+
+ h2 {
+ font-size: 16px;
+ }
+
+ p, li, dt {
+ line-height: 140%;
+ padding-bottom: 2px;
+ }
+
+ ul, ol {
+ padding: 5px 5px 5px 20px;
+ }
+ #logo {
+ margin-bottom: 2em;
+ }
+ -->
+ </style>
+ </head>
+ <body>
+ <h1 id="logo"><img alt="WordPress" src="../wp-admin/images/wordpress-logo.png" /></h1>
+ <p>$message</p>
+ </body>
+ </html>
+HEAD;
+
+ $output = apply_filters('wp_die', $output, $message);
+ echo $output;
+
+ die();
+}
+
?>