Skip to content

Instantly share code, notes, and snippets.

@noameppel
Last active January 4, 2016 02:48
Show Gist options
  • Select an option

  • Save noameppel/8557154 to your computer and use it in GitHub Desktop.

Select an option

Save noameppel/8557154 to your computer and use it in GitHub Desktop.
WordPress 26879-3.patch
Index: wp-admin/setup-config.php
===================================================================
--- wp-admin/setup-config.php (revision 26873)
+++ wp-admin/setup-config.php (working copy)
@@ -116,7 +116,8 @@
setup_config_display_header();
?>
-<p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ) ?></p>
+
+<p><?php _e( "To get started, we need some information on the database. This information is available through your web host. If you don't have it, you'll need to get in touch with them. Here's what you need:" ) ?></p>
<ol>
<li><?php _e( 'Database name' ); ?></li>
<li><?php _e( 'Database username' ); ?></li>
@@ -124,8 +125,8 @@
<li><?php _e( 'Database host' ); ?></li>
<li><?php _e( 'Table prefix (if you want to run more than one WordPress in a single database)' ); ?></li>
</ol>
-<p><strong><?php _e( "If for any reason this automatic file creation doesn&#8217;t work, don&#8217;t worry. All this does is fill in the database information to a configuration file. You may also simply open <code>wp-config-sample.php</code> in a text editor, fill in your information, and save it as <code>wp-config.php</code>." ); ?></strong></p>
-<p><?php _e( "In all likelihood, these items were supplied to you by your Web Host. If you do not have this information, then you will need to contact them before you can continue. If you&#8217;re all ready&hellip;" ); ?></p>
+<p><?php _e( "Once you fill in this information, WordPress will create a configuration file called wp-config.php. This connects WordPress with your database (that's where your content, settings, photos, and all that good stuff is stored). Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ); ?></p>
+<p><?php _e( "If you&#8217;re all ready&hellip;" ); ?></p>
<p class="step"><a href="setup-config.php?step=1<?php if ( isset( $_GET['noapi'] ) ) echo '&amp;noapi'; ?>" class="button button-large"><?php _e( 'Let&#8217;s go!' ); ?></a></p>
<?php
@@ -264,7 +265,7 @@
setup_config_display_header();
?>
<p><?php _e( "Sorry, but I can&#8217;t write the <code>wp-config.php</code> file." ); ?></p>
-<p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p>
+<p><?php _e( 'Please create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p>
<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php
foreach( $config_file as $line ) {
echo htmlentities($line, ENT_COMPAT, 'UTF-8');
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php (revision 26873)
+++ wp-includes/functions.php (working copy)
@@ -2210,7 +2210,7 @@
padding-bottom: 7px;
}
#error-page {
- margin-top: 50px;
+ margin-top: 134px;
}
#error-page p {
font-size: 14px;
@@ -2220,6 +2220,32 @@
#error-page code {
font-family: Consolas, Monaco, monospace;
}
+ #logo {
+ margin: 6px 0 14px 0;
+ border-bottom: none;
+ text-align:center;
+ }
+ #logo a {
+ background-image: url('/wp-admin/images/w-logo-blue.png?ver=20131202');
+ background-image: none, url('/wp-admin/images/wordpress-logo.svg?ver=20131107');
+ background-size: 80px 80px;
+ background-position: center top;
+ background-repeat: no-repeat;
+ color: #999;
+ height: 80px;
+ font-size: 20px;
+ font-weight: normal;
+ line-height: 1.3em;
+ margin: -137px auto 10px;
+ padding: 0;
+ text-decoration: none;
+ width: 80px;
+ text-indent: -9999px;
+ outline: none;
+ overflow: hidden;
+ display: block;
+ }
+
ul li {
margin-bottom: 10px;
font-size: 14px ;
Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php (revision 26873)
+++ wp-includes/wp-db.php (working copy)
@@ -833,7 +833,8 @@
if ( !@mysql_select_db( $db, $dbh ) ) {
$this->ready = false;
wp_load_translations_early();
- $this->bail( sprintf( __( '<h1>Can&#8217;t select database</h1>
+ $this->bail( sprintf( __( '<h1 id="logo"><a href="http://wordpress.org/">WordPress</a></h1>
+<h1>Can&#8217;t select database</h1>
<p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p>
<ul>
<li>Are you sure it exists?</li>
@@ -1155,6 +1156,7 @@
if ( !$this->dbh ) {
wp_load_translations_early();
$this->bail( sprintf( __( "
+<h1 id='logo'><a href='http://wordpress.org/'>WordPress</a></h1>
<h1>Error establishing a database connection</h1>
<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>
<ul>
Index: wp-load.php
===================================================================
--- wp-load.php (revision 26873)
+++ wp-load.php (working copy)
@@ -53,10 +53,10 @@
$path = wp_guess_url() . '/wp-admin/setup-config.php';
// Die with an error message
- $die = __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>';
- $die .= '<p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>';
- $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>';
- $die .= '<p><a href="' . $path . '" class="button button-large">' . __( "Create a Configuration File" ) . '</a>';
-
- wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
+ $die = '<h1 id="logo">' . __( "<a href='http://wordpress.org/'>WordPress</a>" ) . '</h1>';
+ $die .= '<h1 style="text-align: center;">' . __( "Welcome to WordPress!" ) . '</h1>';
+ $die .= '<p>' . __( "WordPress is web software you can use to create a beautiful website, blog, or almost <a href='http://wordpress.org/showcase/'>anything you can imagine</a>. The core software is built by hundreds of community volunteers, and there are thousands of <a href='http://wordpress.org/plugins/'>plugins</a> and <a href='http://wordpress.org/themes/'>themes</a> available to transform your site." ) . '</p>';
+ $die .= '<p style="text-align: center;">' . __( "We'd love you to join the family." ) . '</p>';
+ $die .= '<p style="text-align: center;"><a href="' . $path . '" class="button button-large">' . __( "Let's Get Started!" ) . '</a>';
+ wp_die( $die, __( "Welcome to WordPress!" ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment