Ticket #37774: 37774.2.diff
File 37774.2.diff, 1.7 KB (added by , 8 years ago) |
---|
-
src/wp-admin/includes/theme.php
544 544 $slug = $theme->get_stylesheet(); 545 545 $encoded_slug = urlencode( $slug ); 546 546 547 if ( isset( $updates[ $slug ] ) ) { 548 $hasUpdate = true; 549 $hasPackage = ! empty( $updates[ $slug ][ 'package' ] ) ? true : false; 550 } else { 551 $hasUpdate = false; 552 $hasPackage = false; 553 } 554 547 555 $parent = false; 548 556 if ( $theme->parent() ) { 549 557 $parent = $theme->parent()->display( 'Name' ); … … 571 579 'tags' => $theme->display( 'Tags' ), 572 580 'parent' => $parent, 573 581 'active' => $slug === $current_theme, 574 'hasUpdate' => isset( $updates[ $slug ] ), 582 'hasUpdate' => $hasUpdate, 583 'hasPackage' => $hasPackage, 575 584 'update' => get_theme_update_available( $theme ), 576 585 'actions' => array( 577 586 'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null, -
src/wp-admin/themes.php
377 377 <div class="theme-screenshot blank"></div> 378 378 <# } #> 379 379 380 <# if ( data.hasUpdate ) { #>380 <# if ( data.hasUpdate && data.hasPackage ) { #> 381 381 <div class="update-message notice inline notice-warning notice-alt"><p><?php _e( 'New version available. <button class="button-link" type="button">Update now</button>' ); ?></p></div> 382 382 <# } #> 383 383