Changeset 20029 for trunk/wp-admin/includes/dashboard.php
- Timestamp:
- 02/28/2012 09:24:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r19712 r20029 384 384 385 385 echo "\n\t".'<div class="versions">'; 386 $ ct = current_theme_info();386 $theme = wp_get_theme(); 387 387 388 388 echo "\n\t<p>"; 389 389 390 if ( empty( $ct->stylesheet_dir) ) {390 if ( $theme->errors() ) { 391 391 if ( ! is_multisite() || is_super_admin() ) 392 392 echo '<span class="error-message">' . __('ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.') . '</span>'; … … 402 402 $num = number_format_i18n( $num_widgets ); 403 403 404 $switch_themes = $ ct->title;404 $switch_themes = $theme->display('Name'); 405 405 if ( current_user_can( 'switch_themes') ) 406 406 $switch_themes = '<a href="themes.php">' . $switch_themes . '</a>'; … … 412 412 } else { 413 413 if ( current_user_can( 'switch_themes' ) ) 414 printf( __('Theme <span class="b"><a href="themes.php">%1$s</a></span>'), $ ct->title);414 printf( __('Theme <span class="b"><a href="themes.php">%1$s</a></span>'), $theme->display('Name') ); 415 415 else 416 printf( __('Theme <span class="b">%1$s</span>'), $ ct->title);416 printf( __('Theme <span class="b">%1$s</span>'), $theme->display('Name') ); 417 417 } 418 418 echo '</p>'; … … 1314 1314 <h4><span class="icon16 icon-appearance"></span> <?php _e( 'Customize Your Site' ); ?></h4> 1315 1315 <?php 1316 $ ct = current_theme_info();1317 if ( empty ( $ct->stylesheet_dir) ) :1316 $theme = wp_get_theme(); 1317 if ( $theme->errors() ) : 1318 1318 echo '<p>'; 1319 1319 printf( __( '<a href="%s">Install a theme</a> to get started customizing your site.' ), esc_url( admin_url( 'themes.php' ) ) ); … … 1321 1321 else: 1322 1322 $customize_links = array(); 1323 if ( 'twentyeleven' == $ ct->stylesheet)1323 if ( 'twentyeleven' == $theme->get_stylesheet() ) 1324 1324 $customize_links[] = sprintf( __( '<a href="%s">Choose light or dark</a>' ), esc_url( admin_url( 'themes.php?page=theme_options' ) ) ); 1325 1325 … … 1335 1335 if ( ! empty( $customize_links ) ) { 1336 1336 echo '<p>'; 1337 printf( __( 'Use the current theme — %1$s — or <a href="%2$s">choose a new one</a>. If you stick with % 3$s, here are a few ways to make your site look unique.' ), $ct->title, esc_url( admin_url( 'themes.php' ) ), $ct->title);1337 printf( __( 'Use the current theme — %1$s — or <a href="%2$s">choose a new one</a>. If you stick with %1$s, here are a few ways to make your site look unique.' ), $theme->display('Name'), esc_url( admin_url( 'themes.php' ) ) ); 1338 1338 echo '</p>'; 1339 1339 ?> … … 1346 1346 } else { 1347 1347 echo '<p>'; 1348 printf( __( 'Use the current theme — %1$s — or <a href="%2$s">choose a new one</a>.' ), $ ct->title, esc_url( admin_url( 'themes.php' ) ) );1348 printf( __( 'Use the current theme — %1$s — or <a href="%2$s">choose a new one</a>.' ), $this->display('Name'), esc_url( admin_url( 'themes.php' ) ) ); 1349 1349 echo '</p>'; 1350 1350 }
Note: See TracChangeset
for help on using the changeset viewer.