Changeset 4892
- Timestamp:
- 02/20/2007 01:24:31 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r4875 r4892 1294 1294 } 1295 1295 1296 function wp_die( $message, $title = '') {1296 function wp_die( $message, $title = '' ) { 1297 1297 global $wp_locale; 1298 1299 if ( is_wp_error( $message ) ) { 1300 if ( empty($title) ) { 1301 $error_data = $message->get_error_data(); 1302 if ( is_array($error_data) && isset($error_data['title']) ) 1303 $title = $error_data['title']; 1304 } 1305 $errors = $message->get_error_messages(); 1306 switch ( count($errors) ) : 1307 case 0 : 1308 $message = ''; 1309 break; 1310 case 1 : 1311 $message = "<p>{$errors[0]}</p>"; 1312 break; 1313 default : 1314 $message = "<ul>\n\t\t<li>" . join( "</li>\n\t\t<li>", $errors ) . "</li>\n\t</ul>"; 1315 break; 1316 endswitch; 1317 } elseif ( is_string($message) ) { 1318 $message = "<p>$message</p>"; 1319 } 1298 1320 1299 1321 header('Content-Type: text/html; charset=utf-8'); … … 1320 1342 <body> 1321 1343 <h1 id="logo"><img alt="WordPress" src="<?php echo $admin_dir; ?>images/wordpress-logo.png" /></h1> 1322 <p><?php echo $message; ?></p> 1344 <?php echo $message; ?> 1345 1323 1346 </body> 1324 1347 </html> 1325 1348 <?php 1326 1327 1349 die(); 1328 1350 }
Note: See TracChangeset
for help on using the changeset viewer.