- <a class="button button-primary" href="{{ data.install_url }}"><?php esc_html_e( 'Install' ); ?></a>
- <a class="button button-secondary preview install-theme-preview" href="#"><?php esc_html_e( 'Preview' ); ?></a>
+ <# if ( data.installed ) { #>
+ <?php
+ /* translators: %s: Theme name */
+ $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
+ ?>
+ <# if ( data.activate_url ) { #>
+ <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
+ <# } #>
+ <# if ( data.customize_url ) { #>
+ <a class="button button-secondary load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
+ <# } else { #>
+ <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
+ <# } #>
+ <# } else { #>
+ <?php
+ /* translators: %s: Theme name */
+ $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
+ ?>
+ <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
+ <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
+ <# } #>