- Timestamp:
- 03/11/2018 04:43:59 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php
r42343 r42827 265 265 $author = wp_kses( $theme->author, $themes_allowedtags ); 266 266 267 /* translators: %s: theme name */ 267 268 $preview_title = sprintf( __( 'Preview “%s”' ), $name ); 268 269 $preview_url = add_query_arg( … … 293 294 switch ( $status ) { 294 295 case 'update_available': 295 $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>'; 296 $actions[] = sprintf( 297 '<a class="install-now" href="%s" title="%s">%s</a>', 298 esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ), 299 /* translators: %s: theme version */ 300 esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ), 301 __( 'Update' ) 302 ); 296 303 break; 297 304 case 'newer_installed': 298 305 case 'latest_installed': 299 $actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>'; 306 $actions[] = sprintf( 307 '<span class="install-now" title="%s">%s</span>', 308 esc_attr__( 'This theme is already installed and is up to date' ), 309 _x( 'Installed', 'theme' ) 310 ); 300 311 break; 301 312 case 'install': 302 313 default: 303 $actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>'; 304 break; 305 } 306 307 $actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>'; 314 $actions[] = sprintf( 315 '<a class="install-now" href="%s" title="%s">%s</a>', 316 esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ), 317 /* translators: %s: theme name */ 318 esc_attr( sprintf( __( 'Install %s' ), $name ) ), 319 __( 'Install Now' ) 320 ); 321 break; 322 } 323 324 $actions[] = sprintf( 325 '<a class="install-theme-preview" href="%s" title="%s">%s</a>', 326 esc_url( $preview_url ), 327 /* translators: %s: theme name */ 328 esc_attr( sprintf( __( 'Preview %s' ), $name ) ), 329 __( 'Preview' ) 330 ); 308 331 309 332 /** … … 324 347 325 348 <h3><?php echo $name; ?></h3> 326 <div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> 349 <div class="theme-author"><?php 350 /* translators: %s: theme author */ 351 printf( __( 'By %s' ), $author ); 352 ?></div> 327 353 328 354 <div class="action-links"> … … 422 448 switch ( $status ) { 423 449 case 'update_available': 424 echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>'; 450 printf( 451 '<a class="theme-install button button-primary" href="%s" title="%s">%s</a>', 452 esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ), 453 /* translators: %s: theme version */ 454 esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ), 455 __( 'Update' ) 456 ); 425 457 break; 426 458 case 'newer_installed': 427 459 case 'latest_installed': 428 echo '<span class="theme-install" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>'; 460 printf( 461 '<span class="theme-install" title="%s">%s</span>', 462 esc_attr__( 'This theme is already installed and is up to date' ), 463 _x( 'Installed', 'theme' ) 464 ); 429 465 break; 430 466 case 'install': 431 467 default: 432 echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>'; 468 printf( 469 '<a class="theme-install button button-primary" href="%s">%s</a>', 470 esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ), 471 __( 'Install' ) 472 ); 433 473 break; 434 474 } 435 475 ?> 436 476 <h3 class="theme-name"><?php echo $name; ?></h3> 437 <span class="theme-by"><?php printf( __( 'By %s' ), $author ); ?></span> 477 <span class="theme-by"><?php 478 /* translators: %s: theme author */ 479 printf( __( 'By %s' ), $author ); 480 ?></span> 438 481 <?php if ( isset( $theme->screenshot_url ) ) : ?> 439 482 <img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" />
Note: See TracChangeset
for help on using the changeset viewer.