src/Modules/Rollback.php
public function add_footer() {
		$screen = get_current_screen();
		if ( ! isset( $screen->parent_file ) ) {
			return;
		}
		if ( 'themes.php' !== $screen->parent_file ) {
			return;
		}
		if ( ! $this->product->is_theme() ) {
			return;
		}
		$version = $this->get_rollback();
		if ( empty( $version ) ) {
			return;
		}
		?>
		<script type="text/javascript">
			jQuery(document).ready(function ($) {
				setInterval(checkTheme, 500);

				function checkTheme() {
					var theme = '<?php echo esc_attr( $this->product->get_slug() ); ?>-action';

					if (jQuery('#' + theme).length > 0) {
						if (jQuery('.theme-overlay.active').is(':visible')) {
							if (jQuery('#' + theme + '-rollback').length === 0) {
								jQuery('.theme-actions .active-theme').prepend('<a class="button" style="float:left" id="' + theme + '-rollback" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) ); ?>">Rollback to v<?php echo esc_attr( $version['version'] ); ?></a>')
							}
						}

					}
				}
			})

		</script>
		<?php

	}
public function add_footer() {
		$screen = get_current_screen();
		if ( ! isset( $screen->parent_file ) ) {
			return;
		}
		if ( 'themes.php' !== $screen->parent_file ) {
			return;
		}
		if ( ! $this->product->is_theme() ) {
			return;
		}
		$version = $this->get_rollback();
		if ( empty( $version ) ) {
			return;
		}
		?>
		<script type="text/javascript">
			jQuery(document).ready(function ($) {
				setInterval(checkTheme, 500);

				function checkTheme() {
					var theme = '<?php echo esc_attr( $this->product->get_slug() ); ?>-action';

					if (jQuery('#' + theme).length > 0) {
						if (jQuery('.theme-overlay.active').is(':visible')) {
							if (jQuery('#' + theme + '-rollback').length === 0) {
								jQuery('.theme-actions .active-theme').prepend('<a class="button" style="float:left" id="' + theme + '-rollback" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) ); ?>">Rollback to v<?php echo esc_attr( $version['version'] ); ?></a>')
							}
						}

					}
				}
			})

		</script>
		<?php

	}
public function add_footer ( ) { $ screen = get_current_screen ( ) ; if ( ! isset ( $ screen -> parent_file ) ) { return ; } if ( 'themes.php' !== $ screen -> parent_file ) { return ; } if ( ! $ this -> product -> is_theme ( ) ) { return ; } $ version = $ this -> get_rollback ( ) ; if ( empty ( $ version ) ) { return ; } ?>
		<script type="text/javascript">
			jQuery(document).ready(function ($) {
				setInterval(checkTheme, 500);

				function checkTheme() {
					var theme = '<?php echo esc_attr ( $ this -> product -> get_slug ( ) ) ; ?>-action';

					if (jQuery('#' + theme).length > 0) {
						if (jQuery('.theme-overlay.active').is(':visible')) {
							if (jQuery('#' + theme + '-rollback').length === 0) {
								jQuery('.theme-actions .active-theme').prepend('<a class="button" style="float:left" id="' + theme + '-rollback" href="<?php echo esc_url ( wp_nonce_url ( admin_url ( 'admin-post.php?action=' . $ this -> product -> get_key ( ) . '_rollback' ) , $ this -> product -> get_key ( ) . '_rollback' ) ) ; ?>">Rollback to v<?php echo esc_attr ( $ version [ 'version' ] ) ; ?></a>')
							}
						}

					}
				}
			})

		</script>
		<?php }
Add js scripts for themes rollback.
Add js scripts for themes rollback .