HEX
Server: Apache
System: Linux p3plzcpnl504740.prod.phx3.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User: l2pbkn5l6xav (4972877)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /home/l2pbkn5l6xav/public_html/wp-content/themes/total/welcome/js/welcome.js
jQuery(function($){
	$(document).on('click', '.total-install-plugin', function(){	
		event.preventDefault();
		var $button = $(this);

		if ( $button.hasClass( 'updating-message' ) ) {
			return;
		}

		wp.updates.installPlugin( {
			slug:    $button.data( 'slug' )
		} );
	});

	$(document).on('click', '.total-activate-plugin', function(){
		event.preventDefault();
		var $button = $(this);
		$button.addClass('updating-message').html( importer_params.activating_text );

		total_activate_plugin($button);
		
	});

	$( document ).on('wp-plugin-installing', function(event, args) {
		event.preventDefault();

		$('.total-install-plugin').addClass('updating-message').html( importer_params.installing_text );

	});

	$( document ).on('wp-plugin-install-success', function( event, response ) {

		event.preventDefault();
		var $button = $('.total-install-plugin');

		$button.html( importer_params.activating_text );

		setTimeout( function() {
			total_activate_plugin($button);
		}, 1000 );

	});

	function total_activate_plugin($button){
		$.ajax({
			url: ajaxurl,
			type: 'POST',
			data: {
				'action' : 'total_activate_plugin',
				'slug' : $button.data('slug'),
				'file' : $button.data('filename')
			},
		})
		.done(function (result) {
			var result = JSON.parse(result)
			if( result.success ) {
				$button.removeClass( 'total-activate-plugin total-install-plugin updating-message button button-primary' ).html( importer_params.importer_page ).attr('href', importer_params.importer_url);
			} else {
				$button.removeClass( 'updating-message' ).html(importer_params.error);
			}

		});
	}
});