Ticket #17944: 17944-docs.diff
| File 17944-docs.diff, 5.2 KB (added by , 15 years ago) |
|---|
-
wp-admin/includes/class-wp-themes-list-table.php
172 172 $actions = apply_filters( 'theme_action_links', $actions, $themes[$theme_name] ); 173 173 174 174 $actions = implode ( ' | ', $actions ); 175 176 $ct = array( 177 'title' => $title, 178 'template_dir' => $template_dir, 179 'stylesheet_dir' => $stylesheet_dir, 180 'parent_theme' => $parent_theme, 181 ); 175 182 ?> 176 183 <a href="<?php echo $preview_link; ?>" class="<?php echo $thickbox_class; ?> screenshot"> 177 184 <?php if ( $screenshot ) : ?> … … 183 190 printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3> 184 191 <p class="description"><?php echo $description; ?></p> 185 192 <span class='action-links'><?php echo $actions ?></span> 186 <?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) { 187 /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> 188 <p><?php printf( __( 'The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?></p> 189 <?php } else { ?> 190 <p><?php printf( __( 'All of this theme’s files are located in <code>%2$s</code>.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?></p> 191 <?php } ?> 193 <?php $this->show_files_location( $ct ); ?> 192 194 <?php if ( $tags ) : ?> 193 195 <p><?php _e( 'Tags:' ); ?> <?php echo join( ', ', $tags ); ?></p> 194 196 <?php endif; ?> … … 235 237 // Only get here if each word exists in the tags or one of the fields 236 238 return true; 237 239 } 240 241 /** 242 * Show location of template and theme files 243 * 244 * @param object/array $ct The theme to show it's file locations 245 */ 246 function show_files_location( $ct ) { 247 if ( ! is_array( $ct ) ) { 248 $ct = get_object_vars( $ct ); 249 } 250 if ( current_user_can( 'edit_themes' ) && ! empty( $ct['parent_theme'] ) ) { 251 /* translators: 1: template dir, 2: stylesheet_dir, 3: theme title, 4: parent_theme */ ?> 252 <p><?php printf( __( 'The template files are located in <code>%1$s</code>. The stylesheet files are located in <code>%2$s</code>. <strong>%3$s</strong> uses templates from <strong>%4$s</strong>. Changes made to the templates will affect both themes.' ), str_replace( WP_CONTENT_DIR, '', $ct['template_dir'] ), str_replace( WP_CONTENT_DIR, '', $ct['stylesheet_dir'] ), $ct['title'], $ct['parent_theme'] ); ?></p> 253 <?php } else { ?> 254 <p><?php printf( __( 'All of this theme’s files are located in <code>%1$s</code>.' ), str_replace( WP_CONTENT_DIR, '', $ct['template_dir'] ) ); ?></p> 255 <?php } 256 } 238 257 } 239 258 240 259 ?> -
wp-admin/setup-config.php
50 50 require_once(ABSPATH . WPINC . '/class-wp-error.php'); 51 51 52 52 if (!file_exists(ABSPATH . 'wp-config-sample.php')) 53 wp_die( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');53 wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) ); 54 54 55 55 $configFile = file(ABSPATH . 'wp-config-sample.php'); 56 56 57 57 // Check if wp-config.php has been created 58 58 if (file_exists(ABSPATH . 'wp-config.php')) 59 wp_die( "<p>The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>");59 wp_die( __( "<p>The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>" ) ); 60 60 61 61 // Check if wp-config.php exists above the root directory but is not part of another install 62 62 if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) 63 wp_die( "<p>The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>");63 wp_die( __( "<p>The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>.</p>" ) ); 64 64 65 65 if (isset($_GET['step'])) 66 66 $step = $_GET['step']; -
wp-admin/themes.php
118 118 } 119 119 } 120 120 echo implode ( ' | ', $options ); 121 122 $wp_list_table->show_files_location( $ct ); 121 123 122 124 if ( $ct->tags ) : ?> 123 125 <p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>