WordPress.org

Make WordPress Core

Changeset 19760 for trunk/wp-load.php


Ignore:
Timestamp:
01/26/2012 08:34:27 PM (6 years ago)
Author:
nacin
Message:

Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings. Internationalize setup-config.php -- translators no longer have a reason to modify this file. fixes #18180.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-load.php

    r19712 r19760  
    4040    // Set a path for the link to the installer
    4141    if ( strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false )
    42         $path = '';
     42        $path = 'setup-config.php';
    4343    else
    44         $path = 'wp-admin/';
     44        $path = 'wp-admin/setup-config.php';
    4545
    46     require_once( ABSPATH . '/wp-includes/load.php' );
    47     require_once( ABSPATH . '/wp-includes/version.php' );
     46    define( 'WPINC', 'wp-includes' );
    4847    define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    49     define( 'WPINC', 'wp-includes' );
     48    require_once( ABSPATH . WPINC . '/load.php' );
     49    require_once( ABSPATH . WPINC . '/version.php' );
     50
     51    wp_load_translations_early();
    5052    wp_check_php_mysql_versions();
    5153
    5254    // Die with an error message
    53     require_once( ABSPATH . '/wp-includes/class-wp-error.php' );
    54     require_once( ABSPATH . '/wp-includes/functions.php' );
    55     require_once( ABSPATH . '/wp-includes/plugin.php' );
    56     $text_direction = /*WP_I18N_TEXT_DIRECTION*/'ltr'/*/WP_I18N_TEXT_DIRECTION*/;
    57     wp_die(sprintf(/*WP_I18N_NO_CONFIG*/"<p>There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started.</p> <p>Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>.</p> <p>You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.</p><p><a href='%ssetup-config.php' class='button'>Create a Configuration File</a></p>"/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress &rsaquo; Error'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction));
     55    $die  = '<p>' . __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>';
     56    $die .= '<p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>';
     57    $die .= '<p>' . __( "You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>';
     58    $die .= '<p><a href="' . $path . '" class="button">' . __( "Create a Configuration File" ) . '</a></p>';
    5859
     60    wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
    5961}
Note: See TracChangeset for help on using the changeset viewer.