Ticket #6271: 6271.diff
| File 6271.diff, 1.7 kB (added by DD32, 9 months ago) |
|---|
-
wp-includes/functions.php
old new 1347 1348 } 1348 1349 1349 1350 1350 function wp_die( $message, $title = '' ) {1351 function wp_die( $message, $title = '', $logo = true ) { 1351 1352 global $wp_locale; 1352 1353 1353 1354 if ( function_exists( 'is_wp_error' ) && is_wp_error( $message ) ) { … … 1382 1383 $admin_dir = 'wp-admin/'; 1383 1384 1384 1385 if ( !function_exists( 'did_action' ) || !did_action( 'admin_head' ) ) : 1385 if( !headers_sent() ){ 1386 status_header( 500 ); 1387 nocache_headers(); 1388 header( 'Content-Type: text/html; charset=utf-8' ); 1389 } 1386 if( !headers_sent() ){ 1387 status_header( 500 ); 1388 nocache_headers(); 1389 header( 'Content-Type: text/html; charset=utf-8' ); 1390 } 1391 1392 if ( empty($title) ) 1393 $title = function_exists( '__' ) ? __( 'WordPress › Error' ) : 'WordPress › Error'; 1390 1394 1391 if ( empty($title) ) {1392 if ( function_exists( '__' ) )1393 $title = __( 'WordPress › Error' );1394 else1395 $title = 'WordPress › Error';1396 }1397 1398 1395 ?> 1399 1396 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 1400 1397 <html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) ) language_attributes(); ?>> … … 1409 1406 </head> 1410 1407 <body id="error-page"> 1411 1408 <?php endif; ?> 1409 <?php if( $logo ): ?><h1 id="logo"><img alt="<?php echo function_exists('__') ? __( 'WordPress' ) : 'WordPress'; ?>" src="<?php echo $admin_dir ?>images/wordpress-logo.png" /></h1><?php endif; ?> 1410 1412 1411 <?php echo $message; ?> 1413 1412 </body> 1414 1413 </html>
