Changeset 12813 for trunk/wp-admin/options-network.php
- Timestamp:
- 01/23/2010 07:06:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-network.php
r12787 r12813 35 35 <?php 36 36 function filestats( $err ) { 37 print '<h2>' . esc_html__('Server Summary') . '</h2>'; 38 print '<p>' . __("If you post a message to the WordPress support forum at <a target='_blank' href='http://wordpress.org/support/'>http://wordpress.org/support/</a> then copy and paste the following information into your message:") . '</p>'; 39 40 print "<blockquote style='background: #eee; border: 1px solid #333; padding: 5px;'>"; 41 print "<br /><strong>ERROR: $err</strong><br />"; 37 ?> 38 <h2><?php esc_html_e('Server Summary'); ?></h2> 39 <p><?php _e('If you post a message to the WordPress support forum at <a target="_blank" href="http://wordpress.org/support/">http://wordpress.org/support/</a> then copy and paste the following information into your message:'); ?></p> 40 <blockquote style="background: #eee; border: 1px solid #333; padding: 5px;"> 41 <br /><strong><?php echo __('ERROR:') . " $err"; ?></strong><br /> 42 <?php 42 43 clearstatcache(); 43 44 $files = array( "htaccess.dist", ".htaccess" ); 44 45 46 $indent = ' '; 45 47 foreach ( (array) $files as $val ) { 46 48 $stats = @stat( $val ); 47 49 if( $stats ) { 48 print "<h2>$val</h2>"; 49 print " uid/gid: " . $stats[ 'uid' ] . "/" . $stats[ 'gid' ] . "<br />\n";50 print " size: " . $stats[ 'size' ] . "<br />";51 print " perms: " . substr( sprintf('%o', fileperms( $val ) ), -4 ) . "<br />";52 print " readable: ";53 print is_readable( $val ) == true ? "yes" : "no";54 print "<br />";55 print " writeable: "; 56 print is_writeable( $val ) == true ? "yes" : "no";57 print "<br />"; 58 } elseif( file_exists( $val ) == false ) {59 print "<h2>$val</h2>";60 print " FILE NOT FOUND: $val<br />"; 50 ?> 51 <h2><?php echo esc_html( $val ); ?></h2> 52 <?php echo $indent . sprintf( __('uid/gid: %1$s/%2$s'), $stats[ 'uid' ], $stats[ 'gid' ] ); ?><br /> 53 <?php echo $indent . sprintf( __('size: %s'), $stats['size'] ); ?><br/> 54 <?php echo $indent . sprintf( __('perms: %s'), substr( sprintf('%o', fileperms( $val ) ), -4 ) ); ?><br/> 55 <?php echo $indent . sprintf( __('readable: %s'), is_readable( $val ) ? __('yes') : __('no') ); ?><br/> 56 <?php echo $indent . sprintf( __('writeable: %s'), is_writeable( $val ) ? __('yes') : __('no') ); ?><br/> 57 <?php 58 } elseif( ! file_exists( $val ) ) { 59 ?> 60 <h2><?php echo esc_html( $val ); ?></h2> 61 <?php echo $indent . sprintf( __('FILE NOT FOUND: %s'), $val ); ?><br/> 62 <?php 61 63 } 62 64 } 63 print"</blockquote>";65 echo "</blockquote>"; 64 66 } 65 67 … … 74 76 $htaccess_sample = ABSPATH . 'wp-admin/includes/htaccess.ms'; 75 77 if ( !file_exists( $htaccess_sample ) ) 76 wp_die( "Sorry, I need a {$htaccess_sample} to work from. Please re-upload this file to your WordPress installation.");78 wp_die( sprintf( __('Sorry, I need a %s to work from. Please re-upload this file to your WordPress installation.'), $htaccess_sample ) ); 77 79 78 80 $htaccess_file = file( $htaccess_sample ); … … 85 87 $htaccess_file = str_replace( "BASE", $base, $htaccess ); 86 88 } else { 87 wp_die( "Sorry, I need to be able to read {$htaccess_sample}. Please check the permissions on this file.");89 wp_die( sprintf( __('Sorry, I need to be able to read %s. Please check the permissions on this file.'), $htaccess_sample ) ); 88 90 } 89 91 90 92 //@todo: check for super-cache in use 91 93 ?> 92 <li><p> Replace the contents of your <code>.htaccess</code> with the following:</p>94 <li><p><?php _e('Replace the contents of your <code>.htaccess</code> with the following:'); ?></p> 93 95 <textarea name="htaccess" cols="120" rows="20"> 94 96 <?php echo $htaccess_file; ?> … … 106 108 <h2><?php esc_html_e('What do I need?'); ?></h2> 107 109 <ul> 108 <li> Access to your server to change directory permissions. This can be done through ssh or ftp for example.</li>109 <li> A valid email where your password and administrative emails will be sent.</li>110 <li> Wildcard dns records if you're going to use the virtual host (sub-domain) functionality. Check the <a href='http://trac.mu.wordpress.org/browser/trunk/README.txt'>README</a> for further details.</li>110 <li><?php _e( 'Access to your server to change directory permissions. This can be done through ssh or ftp for example.' ); ?></li> 111 <li><?php _e( 'A valid email where your password and administrative emails will be sent.' ); ?></li> 112 <li><?php _e( "Wildcard dns records if you're going to use the virtual host (sub-domain) functionality. Check the <a href='http://trac.mu.wordpress.org/browser/trunk/README.txt'>README</a> for further details."); ?></li> 111 113 </ul> 112 114 <?php 113 $mod_rewrite_msg = " <p>If the <code>mod_rewrite</code> module is disabled ask your administrator to enable that module, or look at the <a href='http://httpd.apache.org/docs/mod/mod_rewrite.html'>Apache documentation</a> or <a href='http://www.google.com/search?q=apache+mod_rewrite'>elsewhere</a> for help setting it up.</p>";115 $mod_rewrite_msg = "\n<p>" . __( "If the <code>mod_rewrite</code> module is disabled ask your administrator to enable that module, or look at the <a href='http://httpd.apache.org/docs/mod/mod_rewrite.html'>Apache documentation</a> or <a href='http://www.google.com/search?q=apache+mod_rewrite'>elsewhere</a> for help setting it up." ) . '</p>'; 114 116 115 if ( function_exists( "apache_get_modules") ) {117 if ( function_exists( 'apache_get_modules' ) ) { 116 118 $modules = apache_get_modules(); 117 if ( in_array( "mod_rewrite", $modules ) == false ) {118 echo "<p><strong>Warning!</strong> It looks like mod_rewrite is not installed.</p>". $mod_rewrite_msg;119 } else {119 if ( ! in_array( 'mod_rewrite', $modules ) ) 120 echo '<p>' . __('<strong>Warning!</strong> It looks like mod_rewrite is not installed.') . '</p>' . $mod_rewrite_msg; 121 else 120 122 $rewrite_enabled = true; 121 }122 123 } else { 123 ?><p>Please make sure <code>mod_rewrite</code> is installed as it will be activated at the end of this install.</p><?php 124 echo $mod_rewrite_msg; 124 echo '<p>' . __( 'Please make sure <code>mod_rewrite</code> is installed as it will be activated at the end of this install.' ) . '</p>' . $mod_rewrite_msg; 125 125 } 126 126 return $rewrite_enabled; … … 128 128 129 129 function printstep1form( $rewrite_enabled = false ) { 130 $weblog_title = ucfirst( get_option( 'blogname' ) ) . ' Sites';130 $weblog_title = sprintf( __('%s Sites'), ucfirst( get_option( 'blogname' ) ) ); 131 131 $email = get_option( 'admin_email' ); 132 132 $hostname = get_clean_basedomain(); … … 137 137 ?> 138 138 <input type='hidden' name='action' value='step2' /> 139 <h2> Site Addresses</h2>140 <p> Please choose whether you would like sites in your WordPress install to use sub-domains or sub-directories. You can not change this later.</p>139 <h2><?php esc_html_e( 'Site Addresses' ); ?></h2> 140 <p><?php _e( 'Please choose whether you would like sites in your WordPress install to use sub-domains or sub-directories. You cannot change this later.' ); ?></p> 141 141 <?php if ( !$rewrite_enabled ) { ?> 142 <p>< strong>Note</strong> It looks like <code>mod_rewrite</code> is not installed.</p>142 <p><?php _e( '<strong>Note</strong> It looks like <code>mod_rewrite</code> is not installed.'); ?></p> 143 143 <?php } ?> 144 144 <p class="blog-address"> 145 <label><input type='radio' name='vhost' value='yes' <?php if( $rewrite_enabled ) echo 'checked="checked"'; ?> /> Sub-domains (like <code>blog1.example.com</code>)</label><br />146 <label><input type='radio' name='vhost' value='no' <?php if( !$rewrite_enabled ) echo 'checked="checked"'; ?> /> Sub-directories (like <code>example.com/blog1</code>)</label>145 <label><input type='radio' name='vhost' value='yes'<?php if( $rewrite_enabled ) echo ' checked="checked"'; ?> /> <?php _e( 'Sub-domains (like <code>blog1.example.com</code>)' ); ?></label><br /> 146 <label><input type='radio' name='vhost' value='no'<?php if( !$rewrite_enabled ) echo ' checked="checked"'; ?> /> <?php _e( 'Sub-directories (like <code>example.com/blog1</code>) '); ?></label> 147 147 </p> 148 148 149 <h2> Server Address</h2>149 <h2><?php esc_html_e( 'Server Address' ); ?></h2> 150 150 <?php if ( isset( $nowww ) ) { ?> 151 <h3> We recommend you change your siteurl to <code><?php echo $nowww; ?></code> before enabling the network feature. It will still be possible to visit your site using the "www" prefix with an address like <code><?php echo $hostname; ?></code> but any links will not have the "www" prefix.</h3>151 <h3><?php printf( __( 'We recommend you change your siteurl to <code>%1$s</code> before enabling the network feature. It will still be possible to visit your site using the "www" prefix with an address like <code>%2$s</code> but any links will not have the "www" prefix.' ), $nowww, $hostname ); ?></h3> 152 152 <?php } ?> 153 153 <table class="form-table"> 154 154 <tr> 155 <th scope='row'> Server Address</th>155 <th scope='row'><?php esc_html_e( 'Server Address' ); ?></th> 156 156 <td> 157 <p> This will be the Internet address of your site: <strong><em><?php echo $hostname; ?></em></strong>.</p>158 <input type='hidden' name='basedomain' value='<?php echo $hostname?>' />159 <p> Do not use an IP address (like 127.0.0.1) or a single word hostname like <q>localhost</q> as your server address.</p>157 <p><?php printf( __( 'This will be the Internet address of your site: <strong><em>%s</em></strong>.' ), $hostname ); ?></p> 158 <input type='hidden' name='basedomain' value='<?php echo esc_attr( $hostname ); ?>' /> 159 <p><?php _e( 'Do not use an IP address (like 127.0.0.1) or a single word hostname like <q>localhost</q> as your server address.' ); ?></p> 160 160 </td> 161 161 </tr> 162 162 </table> 163 163 164 <h2> Site Details</h2>164 <h2><?php esc_html_e( 'Site Details' ); ?></h2> 165 165 <table class="form-table"> 166 166 <tr> 167 <th scope='row'> Site Title</th>167 <th scope='row'><?php esc_html_e( 'Site Title' ); ?></th> 168 168 <td> 169 <input name='weblog_title' type='text' size='45' value='<?php echo $weblog_title?>' />170 <br /> What would you like to call your site?169 <input name='weblog_title' type='text' size='45' value='<?php echo esc_attr( $weblog_title ); ?>' /> 170 <br /><?php _e( 'What would you like to call your site?' ); ?> 171 171 </td> 172 172 </tr> 173 173 <tr> 174 <th scope='row'> Email</th>174 <th scope='row'><?php esc_html_e( 'Email' ); ?></th> 175 175 <td> 176 <input name='email' type='text' size='45' value='<?php echo $email?>' />177 <br /> Your email address.176 <input name='email' type='text' size='45' value='<?php echo esc_attr( $email ); ?>' /> 177 <br /><?php _e( 'Your email address.' ); ?> 178 178 </td> 179 179 </tr> 180 180 </table> 181 <p class='submit'><input class="button" name='submit' type='submit' value=' Proceed' /></p>181 <p class='submit'><input class="button" name='submit' type='submit' value='<?php esc_attr_e( 'Proceed' ); ?>' /></p> 182 182 <?php 183 183 } … … 185 185 function step2() { 186 186 ?> 187 <h2> Enabling WordPress Sites</h2>188 <p> Complete the following steps to enable the features for creating a network of sites. <strong>Note:</strong> We recommend you make a backup copy of your existing <code>wp-config.php</code> and <code>.htaccess</code> files.</p>187 <h2><?php esc_html_e( 'Enabling WordPress Sites' ); ?></h2> 188 <p><?php _e( 'Complete the following steps to enable the features for creating a network of sites. <strong>Note:</strong> We recommend you make a backup copy of your existing <code>wp-config.php</code> and <code>.htaccess</code> files.' ); ?></p> 189 189 <ol> 190 <li> Create a <code>blogs.dir</code> directory in your <code>wp-content</code> directory. This directory is used to stored uploaded media for your additional sites and must be writeable by the web server.</li>190 <li><?php _e( 'Create a <code>blogs.dir</code> directory in your <code>wp-content</code> directory. This directory is used to stored uploaded media for your additional sites and must be writeable by the web server.' ); ?></li> 191 191 <?php step2_config(); ?> 192 192 <?php step2_htaccess(); ?> … … 203 203 $config_sample = ABSPATH . 'wp-admin/includes/wp-config.ms'; 204 204 if ( !file_exists( $config_sample ) ) 205 wp_die( "Sorry, I need a {$config_sample} to work from. Please re-upload this file to your WordPress installation.");205 wp_die( sprintf( __( 'Sorry, I need a <code>%s</code> to work from. Please re-upload this file to your WordPress installation.' ), $config_sample ) ); 206 206 207 207 $wp_config_file = file( $config_sample ); 208 208 ?> 209 <li><p> Replace the contents of your <code>wp-config.php</code> with the following:</p>209 <li><p><?php _e( 'Replace the contents of your <code>wp-config.php</code> with the following:' ); ?></p> 210 210 <textarea name="wp-config" cols="120" rows="20"> 211 211 <?php
Note: See TracChangeset
for help on using the changeset viewer.