From 4e1feb62aff7a072a7fc1fc923d429a653af94eb Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 20 May 2009 16:32:22 +0000 Subject: [PATCH] Pass text direction to wp_die(). Allow locales to set text direction in local packages. Props nbachiyski. fixes #6132 git-svn-id: http://svn.automattic.com/wordpress/trunk@11408 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 5 ++++- wp-load.php | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index b12bd80b91..415d39f193 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2416,6 +2416,9 @@ function wp_die( $message, $title = '', $args = array() ) { $title = $have_gettext? __('WordPress › Error') : 'WordPress › Error'; } + $text_direction = 'ltr'; + if ( isset($r['text_direction']) && $r['text_direction'] == 'rtl' ) $text_direction = 'rtl'; + if ( ( $wp_locale ) && ( 'rtl' == $wp_locale->text_direction ) ) $text_direction = 'rtl'; ?> > @@ -2424,7 +2427,7 @@ function wp_die( $message, $title = '', $args = array() ) { <?php echo $title ?> text_direction ) ) : ?> +if ( 'rtl' == $text_direction ) : ?> diff --git a/wp-load.php b/wp-load.php index cb919103e4..aee3b39f59 100644 --- a/wp-load.php +++ b/wp-load.php @@ -46,7 +46,8 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) { require_once( ABSPATH . '/wp-includes/classes.php' ); require_once( ABSPATH . '/wp-includes/functions.php' ); require_once( ABSPATH . '/wp-includes/plugin.php' ); - wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

Create a Configuration File"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/"WordPress › Error"/*/WP_I18N_ERROR_TITLE*/); + $text_direction = /*WP_I18N_TEXT_DIRECTION*/"ltr"/*/WP_I18N_TEXT_DIRECTION*/; + wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

Create a Configuration File"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/"WordPress › Error"/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction)); }