HEX
Server: Apache
System: Linux dotw660 5.10.0-37-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User: web350 (1012)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/clients/client125/web350/web/wp-content/plugins/wp-automatic/js/wp-automatic-admin-edit.js
//Add duplicate button
jQuery(document).ready(function(){
	
	jQuery('.edit a').each(function(index,val){
		
		//getting the id
		jQuery(this).parent().after('<span class="edit wp-automatic-duplicate"><a href="' + jQuery(this).attr('href') +  '" title="Duplicate this item">Duplicate</a> | </span>');
		
	});
	
	//click duplicate button
	jQuery('.row-actions').on('click', '.wp-automatic-duplicate a', function() { 
		
		console.log(jQuery(this).parent().parent());
		
		
		//getting input
		var campName = prompt("New Campaign Name", jQuery(this).parent().parent().parent().find('.row-title').text() + "-Copy");
		if (campName != null) {
			
			jQuery(this).parent().parent().append('<div class="spinner-duplicate spinner is-active"></div>');
 
			jQuery.ajax({
				url : ajaxurl,
				type : 'POST',

				data : {
					action : 'wp_automatic_campaign_duplicate',
					href : jQuery(this).attr('href'),
					campName: campName

				},
				
				success: function(data){
					
					jQuery('.spinner-duplicate').remove();
					
					alert(data);
				} 
			});

			
		}

		
		
		return false;
		
	}); 
	
});