Make WordPress Core


Ignore:
Timestamp:
09/28/2006 05:35:59 PM (18 years ago)
Author:
ryan
Message:

Add support for RTL in install.php, upgrade.php and inline-uploading.php. Props Sewar. #3136

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade.php

    r3918 r4259  
    11<?php
    22define('WP_INSTALLING', true);
    3 if (!file_exists('../wp-config.php')) die("There doesn't seem to be a wp-config.php file. Double check that you updated wp-config-sample.php with the proper database connection information and renamed it to wp-config.php.");
     3if (!file_exists('../wp-config.php'))
     4    die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://codex.wordpress.org/Installing_WordPress#Step_3:_Set_up_wp-config.php'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file.");
     5
    46require('../wp-config.php');
    57timer_start();
    68require_once(ABSPATH . '/wp-admin/upgrade-functions.php');
    79
    8 $step = $_GET['step'];
    9 if (!$step) $step = 0;
    10 header( 'Content-Type: text/html; charset=utf-8' );
     10if (isset($_GET['step']))
     11    $step = $_GET['step'];
     12else
     13    $step = 0;
     14@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
    1115?>
    1216<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    13 <html xmlns="http://www.w3.org/1999/xhtml">
     17<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    1418<head>
    15     <title>WordPress &rsaquo; Upgrade</title>
    16     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    17     <style media="screen" type="text/css">
    18     <!--
    19     html {
    20         background: #eee;
    21     }
    22     body {
    23         background: #fff;
    24         color: #000;
    25         font-family: Georgia, "Times New Roman", Times, serif;
    26         margin-left: 20%;
    27         margin-right: 20%;
    28         padding: .2em 2em;
    29     }
    30 
    31     h1 {
    32         color: #006;
    33         font-size: 18px;
    34         font-weight: lighter;
    35     }
    36 
    37     h2 {
    38         font-size: 16px;
    39     }
    40 
    41     p, li, dt {
    42         line-height: 140%;
    43         padding-bottom: 2px;
    44     }
    45 
    46     ul, ol {
    47         padding: 5px 5px 5px 20px;
    48     }
    49     #logo {
    50         margin-bottom: 2em;
    51     }
    52 .step a, .step input {
    53     font-size: 2em;
    54 }
    55 .step, th {
    56     text-align: right;
    57 }
    58 #footer {
    59 text-align: center; border-top: 1px solid #ccc; padding-top: 1em; font-style: italic;
    60 }
    61     -->
    62     </style>
     19    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
     20    <title><?php _e('WordPress &rsaquo; Upgrade'); ?></title>
     21    <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install.css?version=<?php bloginfo('version'); ?>" type="text/css" />
     22    <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>
     23    <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/install-rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
     24    <?php endif; ?>
    6325</head>
    6426<body>
     
    6628<?php
    6729switch($step) {
    68 
    6930    case 0:
    70     $goback = wp_specialchars(wp_get_referer());
     31        $goback = wp_specialchars(wp_get_referer());
    7132?>
    7233<p><?php _e('This file upgrades you from any previous version of WordPress to the latest. It may take a while though, so be patient.'); ?></p>
    73     <h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
     34<h2 class="step"><a href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress &raquo;'); ?></a></h2>
    7435<?php
    75     break;
     36        break;
     37    case 1:
     38        wp_upgrade();
    7639
    77     case 1:
    78     wp_upgrade();
    79 
    80     if ( empty( $_GET['backto'] ) )
    81         $backto = __get_option('home');
    82     else
    83         $backto = wp_specialchars( $_GET['backto'] , 1 );
     40        if ( empty( $_GET['backto'] ) )
     41            $backto = __get_option('home');
     42        else
     43            $backto = wp_specialchars( $_GET['backto'] , 1 );
    8444?>
    8545<h2><?php _e('Step 1'); ?></h2>
     
    9555
    9656<?php
    97     break;
     57        break;
    9858}
    9959?>
Note: See TracChangeset for help on using the changeset viewer.