customize_themes_print_templates

The timeline below displays how wordpress function customize_themes_print_templates has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.4

/**
 * Prints JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text">
					<?php 
    /* translators: Hidden accessibility text. */
    _e('Show previous theme');
    ?>
				</span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text">
					<?php 
    /* translators: Hidden accessibility text. */
    _e('Show next theme');
    ?>
				</span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text">
					<?php 
    /* translators: Hidden accessibility text. */
    _e('Close details dialog');
    ?>
				</span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}?ver={{ data.version }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Active Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
						<?php 
    /* translators: %s: Theme version. */
    printf(__('Version: %s'), '{{ data.version }}');
    ?>
					</span></h2>
					<h3 class="theme-author">
						<?php 
    /* translators: %s: Theme author link. */
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?>
					</h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    printf(
        '%1$s <span class="screen-reader-text">%2$s</span>',
        /* translators: %s: Number of ratings. */
        sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'),
        /* translators: Hidden accessibility text. */
        __('(opens in a new tab)')
    );
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
							<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
								{{{ data.update }}}
							</div>
						<# } else { #>
							<div class="notice notice-error notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Incompatible');
    ?></h3>
								<p>
									<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your versions of WordPress and PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } else if ( ! data.updateResponse.compatibleWP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your version of WordPress.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
									<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your version of PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } #>
								</p>
							</div>
						<# } #>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme">
							<?php 
    printf(
        /* translators: %s: Theme name. */
        __('This is a child theme of %s.'),
        '<strong>{{{ data.parent }}}</strong>'
    );
    ?>
						</p>
					<# } #>

					<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
							<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme does not work with your versions of WordPress and PHP.');
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } else if ( ! data.compatibleWP ) { #>
								<?php 
    _e('This theme does not work with your version of WordPress.');
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
							<# } else if ( ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme does not work with your version of PHP.');
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } #>
						</p></div>
					<# } else if ( ! data.active && data.blockTheme ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
						<?php 
    _e('This theme doesn\'t support Customizer.');
    ?>
						<# if ( data.actions.activate ) { #>
							<?php 
    printf(
        /* translators: %s: URL to the themes page (also it activates the theme). */
        ' ' . __('However, you can still <a href="%s">activate this theme</a>, and use the Site Editor to customize it.'),
        '{{{ data.actions.activate }}}'
    );
    ?>
						<# } #>
						</p></div>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<div class="theme-inactive-actions">
					<# if ( data.blockTheme ) { #>
						<?php 
    /* translators: %s: Theme name. */
    $aria_label = sprintf(_x('Activate %s', 'theme'), '{{ data.name }}');
    ?>
						<# if ( data.compatibleWP && data.compatiblePHP && data.actions.activate ) { #>
							<a href="{{{ data.actions.activate }}}" class="button button-primary activate" aria-label="<?php 
    echo esc_attr($aria_label);
    ?>"><?php 
    _e('Activate');
    ?></a>
						<# } #>
					<# } else { #>
						<# if ( data.compatibleWP && data.compatiblePHP ) { #>
							<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
						<# } else { #>
							<button class="button button-primary disabled"><?php 
    _e('Live Preview');
    ?></button>
						<# } #>
					<# } #>
					</div>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
				<# } else { #>
					<# if ( data.compatibleWP && data.compatiblePHP ) { #>
						<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
						<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } else { #>
						<button type="button" class="button disabled"><?php 
    _ex('Cannot Install', 'theme');
    ?></button>
						<button type="button" class="button button-primary disabled"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } #>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 6.2

/**
 * Prints JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text">
					<?php 
    /* translators: Hidden accessibility text. */
    _e('Show previous theme');
    ?>
				</span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text">
					<?php 
    /* translators: Hidden accessibility text. */
    _e('Show next theme');
    ?>
				</span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text">
					<?php 
    /* translators: Hidden accessibility text. */
    _e('Close details dialog');
    ?>
				</span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}?ver={{ data.version }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Active Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
						<?php 
    /* translators: %s: Theme version. */
    printf(__('Version: %s'), '{{ data.version }}');
    ?>
					</span></h2>
					<h3 class="theme-author">
						<?php 
    /* translators: %s: Theme author link. */
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?>
					</h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    printf(
        '%1$s <span class="screen-reader-text">%2$s</span>',
        /* translators: %s: Number of ratings. */
        sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'),
        /* translators: Hidden accessibility text. */
        __('(opens in a new tab)')
    );
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
							<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
								{{{ data.update }}}
							</div>
						<# } else { #>
							<div class="notice notice-error notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Incompatible');
    ?></h3>
								<p>
									<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your versions of WordPress and PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } else if ( ! data.updateResponse.compatibleWP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your version of WordPress.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
									<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your version of PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } #>
								</p>
							</div>
						<# } #>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme">
							<?php 
    printf(
        /* translators: %s: Theme name. */
        __('This is a child theme of %s.'),
        '<strong>{{{ data.parent }}}</strong>'
    );
    ?>
						</p>
					<# } #>

					<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
							<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme does not work with your versions of WordPress and PHP.');
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } else if ( ! data.compatibleWP ) { #>
								<?php 
    _e('This theme does not work with your version of WordPress.');
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
							<# } else if ( ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme does not work with your version of PHP.');
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } #>
						</p></div>
					<# } else if ( ! data.active && data.blockTheme ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
						<?php 
    _e('This theme doesn\'t support Customizer.');
    ?>
						<# if ( data.actions.activate ) { #>
							<?php 
    printf(
        /* translators: %s: URL to the themes page (also it activates the theme). */
        ' ' . __('However, you can still <a href="%s">activate this theme</a>, and use the Site Editor to customize it.'),
        '{{{ data.actions.activate }}}'
    );
    ?>
						<# } #>
						</p></div>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>

					<# if ( data.blockTheme ) { #>
						<?php 
    /* translators: %s: Theme name. */
    $aria_label = sprintf(_x('Activate %s', 'theme'), '{{ data.name }}');
    ?>
						<# if ( data.compatibleWP && data.compatiblePHP && data.actions.activate ) { #>
							<a href="{{{ data.actions.activate }}}" class="button button-primary activate" aria-label="<?php 
    echo esc_attr($aria_label);
    ?>"><?php 
    _e('Activate');
    ?></a>
						<# } #>
					<# } else { #>
						<# if ( data.compatibleWP && data.compatiblePHP ) { #>
							<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
						<# } else { #>
							<button class="button button-primary disabled"><?php 
    _e('Live Preview');
    ?></button>
						<# } #>
					<# } #>
				<# } else { #>
					<# if ( data.compatibleWP && data.compatiblePHP ) { #>
						<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
						<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } else { #>
						<button type="button" class="button disabled"><?php 
    _ex('Cannot Install', 'theme');
    ?></button>
						<button type="button" class="button button-primary disabled"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } #>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 6.1

/**
 * Prints JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}?ver={{ data.version }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Active Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
						<?php 
    /* translators: %s: Theme version. */
    printf(__('Version: %s'), '{{ data.version }}');
    ?>
					</span></h2>
					<h3 class="theme-author">
						<?php 
    /* translators: %s: Theme author link. */
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?>
					</h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    printf(
        '%1$s <span class="screen-reader-text">%2$s</span>',
        /* translators: %s: Number of ratings. */
        sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'),
        /* translators: Accessibility text. */
        __('(opens in a new tab)')
    );
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
							<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
								{{{ data.update }}}
							</div>
						<# } else { #>
							<div class="notice notice-error notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Incompatible');
    ?></h3>
								<p>
									<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your versions of WordPress and PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } else if ( ! data.updateResponse.compatibleWP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your version of WordPress.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
									<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it does not work with your version of PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } #>
								</p>
							</div>
						<# } #>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme">
							<?php 
    printf(
        /* translators: %s: Theme name. */
        __('This is a child theme of %s.'),
        '<strong>{{{ data.parent }}}</strong>'
    );
    ?>
						</p>
					<# } #>

					<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
							<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme does not work with your versions of WordPress and PHP.');
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } else if ( ! data.compatibleWP ) { #>
								<?php 
    _e('This theme does not work with your version of WordPress.');
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
							<# } else if ( ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme does not work with your version of PHP.');
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } #>
						</p></div>
					<# } else if ( ! data.active && data.blockTheme ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
						<?php 
    _e('This theme doesn\'t support Customizer.');
    ?>
						<# if ( data.actions.activate ) { #>
							<?php 
    printf(
        /* translators: %s: URL to the themes page (also it activates the theme). */
        ' ' . __('However, you can still <a href="%s">activate this theme</a>, and use the Site Editor to customize it.'),
        '{{{ data.actions.activate }}}'
    );
    ?>
						<# } #>
						</p></div>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>

					<# if ( data.blockTheme ) { #>
						<?php 
    /* translators: %s: Theme name. */
    $aria_label = sprintf(_x('Activate %s', 'theme'), '{{ data.name }}');
    ?>
						<# if ( data.compatibleWP && data.compatiblePHP && data.actions.activate ) { #>
							<a href="{{{ data.actions.activate }}}" class="button button-primary activate" aria-label="<?php 
    echo esc_attr($aria_label);
    ?>"><?php 
    _e('Activate');
    ?></a>
						<# } #>
					<# } else { #>
						<# if ( data.compatibleWP && data.compatiblePHP ) { #>
							<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
						<# } else { #>
							<button class="button button-primary disabled"><?php 
    _e('Live Preview');
    ?></button>
						<# } #>
					<# } #>
				<# } else { #>
					<# if ( data.compatibleWP && data.compatiblePHP ) { #>
						<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
						<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } else { #>
						<button type="button" class="button disabled"><?php 
    _ex('Cannot Install', 'theme');
    ?></button>
						<button type="button" class="button button-primary disabled"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } #>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 5.9

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
						<?php 
    /* translators: %s: Theme version. */
    printf(__('Version: %s'), '{{ data.version }}');
    ?>
					</span></h2>
					<h3 class="theme-author">
						<?php 
    /* translators: %s: Theme author link. */
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?>
					</h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    printf(
        '%1$s <span class="screen-reader-text">%2$s</span>',
        /* translators: %s: Number of ratings. */
        sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'),
        /* translators: Accessibility text. */
        __('(opens in a new tab)')
    );
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
							<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
								{{{ data.update }}}
							</div>
						<# } else { #>
							<div class="notice notice-error notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Incompatible');
    ?></h3>
								<p>
									<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } else if ( ! data.updateResponse.compatibleWP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
									<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } #>
								</p>
							</div>
						<# } #>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme">
							<?php 
    printf(
        /* translators: %s: Theme name. */
        __('This is a child theme of %s.'),
        '<strong>{{{ data.parent }}}</strong>'
    );
    ?>
						</p>
					<# } #>

					<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
							<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme doesn&#8217;t work with your versions of WordPress and PHP.');
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } else if ( ! data.compatibleWP ) { #>
								<?php 
    _e('This theme doesn&#8217;t work with your version of WordPress.');
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
							<# } else if ( ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme doesn&#8217;t work with your version of PHP.');
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } #>
						</p></div>
					<# } else if ( ! data.active && data.blockTheme ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
						<?php 
    _e('This theme doesn\'t support Customizer.');
    ?>
						<# if ( data.actions.activate ) { #>
							<?php 
    printf(
        /* translators: %s: URL to the themes page (also it activates the theme). */
        ' ' . __('However, you can still <a href="%s">activate this theme</a>, and use the Site Editor to customize it.'),
        '{{{ data.actions.activate }}}'
    );
    ?>
						<# } #>
						</p></div>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>

					<# if ( data.blockTheme ) { #>
						<?php 
    /* translators: %s: Theme name. */
    $aria_label = sprintf(_x('Activate %s', 'theme'), '{{ data.name }}');
    ?>
						<# if ( data.compatibleWP && data.compatiblePHP && data.actions.activate ) { #>
							<a href="{{{ data.actions.activate }}}" class="button button-primary activate" aria-label="<?php 
    echo esc_attr($aria_label);
    ?>"><?php 
    _e('Activate');
    ?></a>
						<# } #>
					<# } else { #>
						<# if ( data.compatibleWP && data.compatiblePHP ) { #>
							<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
						<# } else { #>
							<button class="button button-primary disabled"><?php 
    _e('Live Preview');
    ?></button>
						<# } #>
					<# } #>
				<# } else { #>
					<# if ( data.compatibleWP && data.compatiblePHP ) { #>
						<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
						<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } else { #>
						<button type="button" class="button disabled"><?php 
    _ex('Cannot Install', 'theme');
    ?></button>
						<button type="button" class="button button-primary disabled"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } #>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 5.5

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
						<?php 
    /* translators: %s: Theme version. */
    printf(__('Version: %s'), '{{ data.version }}');
    ?>
					</span></h2>
					<h3 class="theme-author">
						<?php 
    /* translators: %s: Theme author link. */
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?>
					</h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    printf(
        '%1$s <span class="screen-reader-text">%2$s</span>',
        /* translators: %s: Number of ratings. */
        sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'),
        /* translators: Accessibility text. */
        __('(opens in a new tab)')
    );
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<# if ( data.updateResponse.compatibleWP && data.updateResponse.compatiblePHP ) { #>
							<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
								{{{ data.update }}}
							</div>
						<# } else { #>
							<div class="notice notice-error notice-alt notice-large" data-slug="{{ data.id }}">
								<h3 class="notice-title"><?php 
    _e('Update Incompatible');
    ?></h3>
								<p>
									<# if ( ! data.updateResponse.compatibleWP && ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } else if ( ! data.updateResponse.compatibleWP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
									<# } else if ( ! data.updateResponse.compatiblePHP ) { #>
										<?php 
    printf(
        /* translators: %s: Theme name. */
        __('There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.'),
        '{{{ data.name }}}'
    );
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
									<# } #>
								</p>
							</div>
						<# } #>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme">
							<?php 
    printf(
        /* translators: %s: Theme name. */
        __('This is a child theme of %s.'),
        '<strong>{{{ data.parent }}}</strong>'
    );
    ?>
						</p>
					<# } #>

					<# if ( ! data.compatibleWP || ! data.compatiblePHP ) { #>
						<div class="notice notice-error notice-alt notice-large"><p>
							<# if ( ! data.compatibleWP && ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme doesn&#8217;t work with your versions of WordPress and PHP.');
    if (current_user_can('update_core') && current_user_can('update_php')) {
        printf(
            /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
            ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
            self_admin_url('update-core.php'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    } elseif (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    } elseif (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } else if ( ! data.compatibleWP ) { #>
								<?php 
    _e('This theme doesn&#8217;t work with your version of WordPress.');
    if (current_user_can('update_core')) {
        printf(
            /* translators: %s: URL to WordPress Updates screen. */
            ' ' . __('<a href="%s">Please update WordPress</a>.'),
            self_admin_url('update-core.php')
        );
    }
    ?>
							<# } else if ( ! data.compatiblePHP ) { #>
								<?php 
    _e('This theme doesn&#8217;t work with your version of PHP.');
    if (current_user_can('update_php')) {
        printf(
            /* translators: %s: URL to Update PHP page. */
            ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
            esc_url(wp_get_update_php_url())
        );
        wp_update_php_annotation('</p><p><em>', '</em>');
    }
    ?>
							<# } #>
						</p></div>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>

					<# if ( data.compatibleWP && data.compatiblePHP ) { #>
						<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
					<# } else { #>
						<button class="button button-primary disabled"><?php 
    _e('Live Preview');
    ?></button>
					<# } #>
				<# } else { #>
					<# if ( data.compatibleWP && data.compatiblePHP ) { #>
						<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
						<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } else { #>
						<button type="button" class="button disabled"><?php 
    _ex('Cannot Install', 'theme');
    ?></button>
						<button type="button" class="button button-primary disabled"><?php 
    _e('Install &amp; Preview');
    ?></button>
					<# } #>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 5.3

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version">
						<?php 
    /* translators: %s: Theme version. */
    printf(__('Version: %s'), '{{ data.version }}');
    ?>
					</span></h2>
					<h3 class="theme-author">
						<?php 
    /* translators: %s: Theme author link. */
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?>
					</h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    printf(
        '%1$s <span class="screen-reader-text">%2$s</span>',
        /* translators: %s: Number of ratings. */
        sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'),
        /* translators: Accessibility text. */
        __('(opens in a new tab)')
    );
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme">
							<?php 
    printf(
        /* translators: %s: Theme name. */
        __('This is a child theme of %s.'),
        '<strong>{{{ data.parent }}}</strong>'
    );
    ?>
						</p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: .10

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    printf(
        '%1$s <span class="screen-reader-text">%2$s</span>',
        /* translators: %s: number of ratings */
        sprintf(__('(%s ratings)'), '{{ data.num_ratings }}'),
        /* translators: accessibility text */
        __('(opens in a new tab)')
    );
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 5.2

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<a class="num-ratings" target="_blank" href="{{ data.reviews_url }}">
								<?php 
    /* translators: %s: number of ratings */
    echo sprintf(__('(%s ratings) <span class="screen-reader-text">link to view ratings opens in a new tab</span>'), '{{ data.num_ratings }}');
    ?>
							</a>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 9.5

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<span class="num-ratings">
								<?php 
    /* translators: %s: number of ratings */
    echo sprintf(__('(%s ratings)'), '{{ data.num_ratings }}');
    ?>
							</span>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 9.3

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<span class="num-ratings">
								<?php 
    /* translators: %s: number of ratings */
    echo sprintf(__('(%s ratings)'), '{{ data.num_ratings }}');
    ?>
							</span>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></a>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></span>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: .20

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<span class="num-ratings">
								<?php 
    /* translators: %s: number of ratings */
    echo sprintf(__('(%s ratings)'), '{{ data.num_ratings }}');
    ?>
							</span>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 9.2

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<span class="num-ratings">
								<?php 
    /* translators: %s: number of ratings */
    echo sprintf(__('(%s ratings)'), '{{ data.num_ratings }}');
    ?>
							</span>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></a>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></span>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: .10

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<span class="num-ratings">
								<?php 
    /* translators: %s: number of ratings */
    echo sprintf(__('(%s ratings)'), '{{ data.num_ratings }}');
    ?>
							</span>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></button>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></button>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 4.9

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix" role="document">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot && data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>

					<# if ( data.stars && 0 != data.num_ratings ) { #>
						<div class="theme-rating">
							{{{ data.stars }}}
							<span class="num-ratings">
								<?php 
    /* translators: %s: number of ratings */
    echo sprintf(__('(%s ratings)'), '{{ data.num_ratings }}');
    ?>
							</span>
						</div>
					<# } #>

					<# if ( data.hasUpdate ) { #>
						<div class="notice notice-warning notice-alt notice-large" data-slug="{{ data.id }}">
							<h3 class="notice-title"><?php 
    _e('Update Available');
    ?></h3>
							{{{ data.update }}}
						</div>
					<# } #>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{{ data.tags }}}</p>
					<# } #>
				</div>
			</div>

			<div class="theme-actions">
				<# if ( data.active ) { #>
					<button type="button" class="button button-primary customize-theme"><?php 
    _e('Customize');
    ?></a>
				<# } else if ( 'installed' === data.type ) { #>
					<?php 
    if (current_user_can('delete_themes')) {
        ?>
						<# if ( data.actions && data.actions['delete'] ) { #>
							<a href="{{{ data.actions['delete'] }}}" data-slug="{{ data.id }}" class="button button-secondary delete-theme"><?php 
        _e('Delete');
        ?></a>
						<# } #>
					<?php 
    }
    ?>
					<button type="button" class="button button-primary preview-theme" data-slug="{{ data.id }}"><?php 
    _e('Live Preview');
    ?></span>
				<# } else { #>
					<button type="button" class="button theme-install" data-slug="{{ data.id }}"><?php 
    _e('Install');
    ?></button>
					<button type="button" class="button button-primary theme-install preview" data-slug="{{ data.id }}"><?php 
    _e('Install &amp; Preview');
    ?></button>
				<# } #>
			</div>
		</div>
	</script>
	<?php 
}

WordPress Version: 4.6

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    $preview_url = esc_url(add_query_arg('theme', '__THEME__'));
    // Token because esc_url() strips curly braces.
    $preview_url = str_replace('__THEME__', '{{ data.id }}', $preview_url);
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>
					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{ data.tags }}</p>
					<# } #>
				</div>
			</div>

			<# if ( ! data.active ) { #>
				<div class="theme-actions">
					<div class="inactive-theme">
						<?php 
    /* translators: %s: Theme name */
    $aria_label = sprintf(__('Preview %s'), '{{ data.name }}');
    ?>
						<a href="<?php 
    echo $preview_url;
    ?>" target="_top" class="button button-primary" aria-label="<?php 
    echo esc_attr($aria_label);
    ?>"><?php 
    _e('Live Preview');
    ?></a>
					</div>
				</div>
			<# } #>
		</div>
	</script>
	<?php 
}

WordPress Version: 4.5

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    $preview_url = esc_url(add_query_arg('theme', '__THEME__'));
    // Token because esc_url() strips curly braces.
    $preview_url = str_replace('__THEME__', '{{ data.id }}', $preview_url);
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap wp-clearfix">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about wp-clearfix">
				<div class="theme-screenshots">
				<# if ( data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>
					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{ data.tags }}</p>
					<# } #>
				</div>
			</div>

			<# if ( ! data.active ) { #>
				<div class="theme-actions">
					<div class="inactive-theme">
						<a href="<?php 
    echo $preview_url;
    ?>" target="_top" class="button button-primary"><?php 
    _e('Live Preview');
    ?></a>
					</div>
				</div>
			<# } #>
		</div>
	</script>
	<?php 
}

WordPress Version: 4.4

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    $preview_url = esc_url(add_query_arg('theme', '__THEME__'));
    // Token because esc_url() strips curly braces.
    $preview_url = str_replace('__THEME__', '{{ data.id }}', $preview_url);
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about">
				<div class="theme-screenshots">
				<# if ( data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h2 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h2>
					<h3 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h3>
					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{ data.tags }}</p>
					<# } #>
				</div>
			</div>

			<# if ( ! data.active ) { #>
				<div class="theme-actions">
					<div class="inactive-theme">
						<a href="<?php 
    echo $preview_url;
    ?>" target="_top" class="button button-primary"><?php 
    _e('Live Preview');
    ?></a>
					</div>
				</div>
			<# } #>
		</div>
	</script>
	<?php 
}

WordPress Version: 4.2

/**
 * Print JS templates for the theme-browsing UI in the Customizer.
 *
 * @since 4.2.0
 */
function customize_themes_print_templates()
{
    $preview_url = esc_url(add_query_arg('theme', '__THEME__'));
    // Token because esc_url() strips curly braces.
    $preview_url = str_replace('__THEME__', '{{ data.id }}', $preview_url);
    ?>
	<script type="text/html" id="tmpl-customize-themes-details-view">
		<div class="theme-backdrop"></div>
		<div class="theme-wrap">
			<div class="theme-header">
				<button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show previous theme');
    ?></span></button>
				<button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Show next theme');
    ?></span></button>
				<button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php 
    _e('Close details dialog');
    ?></span></button>
			</div>
			<div class="theme-about">
				<div class="theme-screenshots">
				<# if ( data.screenshot[0] ) { #>
					<div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div>
				<# } else { #>
					<div class="screenshot blank"></div>
				<# } #>
				</div>

				<div class="theme-info">
					<# if ( data.active ) { #>
						<span class="current-label"><?php 
    _e('Current Theme');
    ?></span>
					<# } #>
					<h3 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php 
    printf(__('Version: %s'), '{{ data.version }}');
    ?></span></h3>
					<h4 class="theme-author"><?php 
    printf(__('By %s'), '{{{ data.authorAndUri }}}');
    ?></h4>
					<p class="theme-description">{{{ data.description }}}</p>

					<# if ( data.parent ) { #>
						<p class="parent-theme"><?php 
    printf(__('This is a child theme of %s.'), '<strong>{{{ data.parent }}}</strong>');
    ?></p>
					<# } #>

					<# if ( data.tags ) { #>
						<p class="theme-tags"><span><?php 
    _e('Tags:');
    ?></span> {{ data.tags }}</p>
					<# } #>
				</div>
			</div>

			<# if ( ! data.active ) { #>
				<div class="theme-actions">
					<div class="inactive-theme">
						<a href="<?php 
    echo $preview_url;
    ?>" target="_top" class="button button-primary"><?php 
    _e('Live Preview');
    ?></a>
					</div>
				</div>
			<# } #>
		</div>
	</script>
	<?php 
}