Ticket #37774: 37774.diff
File 37774.diff, 1.6 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 } 553 547 554 $parent = false; 548 555 if ( $theme->parent() ) { 549 556 $parent = $theme->parent()->display( 'Name' ); … … 571 578 'tags' => $theme->display( 'Tags' ), 572 579 'parent' => $parent, 573 580 'active' => $slug === $current_theme, 574 'hasUpdate' => isset( $updates[ $slug ] ), 581 'hasUpdate' => $hasUpdate, 582 'hasPackage' => $hasPackage, 575 583 'update' => get_theme_update_available( $theme ), 576 584 'actions' => array( 577 585 '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