| 1 | Index: functions.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- functions.php (revision 18391) |
|---|
| 4 | +++ functions.php (working copy) |
|---|
| 5 | @@ -2811,30 +2811,21 @@ |
|---|
| 6 | $message .= "\n<p><a href='javascript:history.back()'>$back_text</p>"; |
|---|
| 7 | } |
|---|
| 8 | |
|---|
| 9 | - if ( defined( 'WP_SITEURL' ) && '' != WP_SITEURL ) |
|---|
| 10 | - $admin_dir = WP_SITEURL . '/wp-admin/'; |
|---|
| 11 | - elseif ( function_exists( 'get_bloginfo' ) && '' != get_bloginfo( 'wpurl' ) ) |
|---|
| 12 | - $admin_dir = get_bloginfo( 'wpurl' ) . '/wp-admin/'; |
|---|
| 13 | - elseif ( strpos( $_SERVER['PHP_SELF'], 'wp-admin' ) !== false ) |
|---|
| 14 | - $admin_dir = ''; |
|---|
| 15 | - else |
|---|
| 16 | - $admin_dir = 'wp-admin/'; |
|---|
| 17 | - |
|---|
| 18 | if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) : |
|---|
| 19 | - if ( !headers_sent() ) { |
|---|
| 20 | - status_header( $r['response'] ); |
|---|
| 21 | - nocache_headers(); |
|---|
| 22 | - header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 23 | - } |
|---|
| 24 | - |
|---|
| 25 | - if ( empty($title) ) |
|---|
| 26 | - $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error'; |
|---|
| 27 | - |
|---|
| 28 | - $text_direction = 'ltr'; |
|---|
| 29 | - if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] ) |
|---|
| 30 | - $text_direction = 'rtl'; |
|---|
| 31 | - elseif ( function_exists( 'is_rtl' ) && is_rtl() ) |
|---|
| 32 | - $text_direction = 'rtl'; |
|---|
| 33 | + if ( !headers_sent() ) { |
|---|
| 34 | + status_header( $r['response'] ); |
|---|
| 35 | + nocache_headers(); |
|---|
| 36 | + header( 'Content-Type: text/html; charset=utf-8' ); |
|---|
| 37 | + } |
|---|
| 38 | + |
|---|
| 39 | + if ( empty($title) ) |
|---|
| 40 | + $title = $have_gettext ? __('WordPress › Error') : 'WordPress › Error'; |
|---|
| 41 | + |
|---|
| 42 | + $text_direction = 'ltr'; |
|---|
| 43 | + if ( isset($r['text_direction']) && 'rtl' == $r['text_direction'] ) |
|---|
| 44 | + $text_direction = 'rtl'; |
|---|
| 45 | + elseif ( function_exists( 'is_rtl' ) && is_rtl() ) |
|---|
| 46 | + $text_direction = 'rtl'; |
|---|
| 47 | ?> |
|---|
| 48 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 49 | <!-- Ticket #11289, IE bug fix: always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression abcdefghijklmnopqrstuvwxyz1234567890aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz11223344556677889900abacbcbdcdcededfefegfgfhghgihihjijikjkjlklkmlmlnmnmononpopoqpqprqrqsrsrtstsubcbcdcdedefefgfabcadefbghicjkldmnoepqrfstugvwxhyz1i234j567k890laabmbccnddeoeffpgghqhiirjjksklltmmnunoovppqwqrrxsstytuuzvvw0wxx1yyz2z113223434455666777889890091abc2def3ghi4jkl5mno6pqr7stu8vwx9yz11aab2bcc3dd4ee5ff6gg7hh8ii9j0jk1kl2lmm3nnoo4p5pq6qrr7ss8tt9uuvv0wwx1x2yyzz13aba4cbcb5dcdc6dedfef8egf9gfh0ghg1ihi2hji3jik4jkj5lkl6kml7mln8mnm9ono --> |
|---|
| 50 | @@ -2842,14 +2833,41 @@ |
|---|
| 51 | <head> |
|---|
| 52 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|---|
| 53 | <title><?php echo $title ?></title> |
|---|
| 54 | - <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" /> |
|---|
| 55 | -<?php |
|---|
| 56 | -if ( 'rtl' == $text_direction ) : ?> |
|---|
| 57 | - <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install-rtl.css" type="text/css" /> |
|---|
| 58 | -<?php endif; ?> |
|---|
| 59 | + <style> |
|---|
| 60 | + html { |
|---|
| 61 | + background: #f9f9f9; |
|---|
| 62 | + } |
|---|
| 63 | + body { |
|---|
| 64 | + background: #fff; |
|---|
| 65 | + color: #333; |
|---|
| 66 | + font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; |
|---|
| 67 | + margin: 2em auto; |
|---|
| 68 | + width: 700px; |
|---|
| 69 | + padding: 1em 2em; |
|---|
| 70 | + -moz-border-radius: 11px; |
|---|
| 71 | + -khtml-border-radius: 11px; |
|---|
| 72 | + -webkit-border-radius: 11px; |
|---|
| 73 | + border-radius: 11px; |
|---|
| 74 | + border: 1px solid #dfdfdf; |
|---|
| 75 | + } |
|---|
| 76 | + #error-page { |
|---|
| 77 | + margin-top: 50px; |
|---|
| 78 | + } |
|---|
| 79 | + #error-page p { |
|---|
| 80 | + font-size: 12px; |
|---|
| 81 | + line-height: 18px; |
|---|
| 82 | + margin: 25px 0 20px; |
|---|
| 83 | + } |
|---|
| 84 | + #error-page code { |
|---|
| 85 | + font-family: Consolas, Monaco, monospace; |
|---|
| 86 | + } |
|---|
| 87 | + <?php if ( 'rtl' == $text_direction ) : ?> |
|---|
| 88 | + body { font-family: Tahoma, arial; } |
|---|
| 89 | + <?php endif; ?> |
|---|
| 90 | + </style> |
|---|
| 91 | </head> |
|---|
| 92 | <body id="error-page"> |
|---|
| 93 | -<?php endif; ?> |
|---|
| 94 | +<?php endif; // !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ?> |
|---|
| 95 | <?php echo $message; ?> |
|---|
| 96 | </body> |
|---|
| 97 | </html> |
|---|