<?php

if ( !defined( 'ABSPATH' ) ) {
    exit;
}
?>
<div class="polylai-modal-bg" id="polylai-modal-cron" style="display: none;">
	<div class="polylai-modal-dialog">
		<div class="polylai-modal-header">
			<h4><?php 
_e( 'How to configure Cron in your hosting', 'ai-translator-for-polylang' );
?></h4>	
			<span class="dashicons dashicons-no" data-polyalai-close></span>
		</div>
		<div class="polylai-modal-body">
			<?php 
_e( 'The WP PolylAI translation procedure needs to be run <strong>every minute</strong>.', 'ai-translator-for-polylang' );
?><br />
			<br />
			<?php 
_e( 'If you know how to manually configure crontab then use the string:', 'ai-translator-for-polylang' );
?><br />
			<br />
			<pre class="polylai-cron-panel">* * * * * php "<?php 
echo esc_html( ABSPATH );
?>index.php" -- polylai_cron</pre>
			<br />
			<?php 
_e( 'Otherwise, read the following guides based on your current hosting provider:', 'ai-translator-for-polylang' );
?><br />
			<br />
			<ul>
				<li>
					<span class="dashicons dashicons-arrow-right-alt2"></span> <a href="https://cpanel.net/blog/tips-and-tricks/how-to-configure-a-cron-job/" target="_blank">cPanel</a>
				</li>
				<li>
					<span class="dashicons dashicons-arrow-right-alt2"></span> <a href="https://support.cloudways.com/en/articles/5124057-how-to-create-cron-jobs-on-cloudways" target="_blank">Cloudways</a>
				</li>
				<li>
					<span class="dashicons dashicons-arrow-right-alt2"></span> <a href="https://help.dreamhost.com/hc/en-us/articles/215088668-Create-a-cron-job" target="_blank">Dreamhost</a>
				</li>
				<li>
					<span class="dashicons dashicons-arrow-right-alt2"></span> <a href="https://www.siteground.com/kb/manage-cron-jobs/" target="_blank">SiteGround</a>
				</li>
				<li>
					<span class="dashicons dashicons-arrow-right-alt2"></span> <a href="https://www.godaddy.com/help/create-cron-jobs-16086" target="_blank">GoDaddy</a>
				</li>
				<li>
					<span class="dashicons dashicons-arrow-right-alt2"></span> <a href="https://support.plesk.com/hc/en-us/articles/12377347218711-How-to-add-a-scheduled-task-in-Plesk-UI-using-crontab-syntax" target="_blank">Plesk</a>
				</li>
				<li>
					<span class="dashicons dashicons-arrow-right-alt2"></span> <a href="https://kinsta.com/docs/wordpress-hosting/site-management/cron-jobs/" target="_blank">Kinsta</a>
				</li>
			</ul>
			<?php 
_e( "If you can't find your provider or need help, write in the forum. If you have a premium license you can contact our 1:1 support", 'ai-translator-for-polylang' );
?><br />			
			<br />
			<strong><?php 
_e( 'After you have set up the cron, wait one minute and you should see the activity in the plugin settings.', 'ai-translator-for-polylang' );
?></strong>

		</div>
		<div class="polylai-modal-footer">
			<a class="button" target="_blank" href="https://wordpress.org/support/plugin/polyai-translator"><?php 
_e( 'PolylAISupport forum', 'ai-translator-for-polylang' );
?></a>
			
			<?php 
?>
				<a class="button" href="?page=polylai-pricing"><?php 
_e( 'Premium support', 'ai-translator-for-polylang' );
?></a>
			<?php 
?>
		</div>
	</div>
</div>