mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Themes: Do not show an update button if there's no update package.
This updates the list view to match the existing behaviour in the single theme modal. Props tristangemus for initial patch. Fixes #37774. git-svn-id: https://develop.svn.wordpress.org/trunk@38788 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -572,6 +572,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
|
||||
'parent' => $parent,
|
||||
'active' => $slug === $current_theme,
|
||||
'hasUpdate' => isset( $updates[ $slug ] ),
|
||||
'hasPackage' => isset( $updates[ $slug ] ) && ! empty( $updates[ $slug ][ 'package' ] ),
|
||||
'update' => get_theme_update_available( $theme ),
|
||||
'actions' => array(
|
||||
'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
|
||||
|
||||
Reference in New Issue
Block a user