@@ -11,21 +11,21 @@ discard block |
||
11 | 11 | global $ao_ccss_queue; |
12 | 12 | |
13 | 13 | // Prepare the queue object. |
14 | - if ( empty( $ao_ccss_queue ) ) { |
|
14 | + if (empty($ao_ccss_queue)) { |
|
15 | 15 | $ao_ccss_queue = ''; |
16 | 16 | } else { |
17 | - $ao_ccss_queue = json_encode( $ao_ccss_queue ); |
|
17 | + $ao_ccss_queue = json_encode($ao_ccss_queue); |
|
18 | 18 | } |
19 | 19 | ?> |
20 | 20 | |
21 | 21 | <ul id="queue-panel"> |
22 | 22 | <li class="itemDetail"> |
23 | - <h2 class="itemTitle fleft"><?php _e( 'Job Queue', 'autoptimize' ); ?></h2> |
|
23 | + <h2 class="itemTitle fleft"><?php _e('Job Queue', 'autoptimize'); ?></h2> |
|
24 | 24 | <button type="button" class="toggle-btn"> |
25 | 25 | <span class="toggle-indicator dashicons dashicons-arrow-up dashicons-arrow-down"></span> |
26 | 26 | </button> |
27 | 27 | <?php |
28 | - if ( autoptimizeCriticalCSSSettings::ao_ccss_has_autorules() ) { |
|
28 | + if (autoptimizeCriticalCSSSettings::ao_ccss_has_autorules()) { |
|
29 | 29 | $_queue_visibility = 'hidden'; |
30 | 30 | } else { |
31 | 31 | $_queue_visibility = 'visible'; |
@@ -34,54 +34,54 @@ discard block |
||
34 | 34 | <div class="collapsible <?php echo $_queue_visibility; ?>"> |
35 | 35 | <!-- BEGIN Queue dialogs --> |
36 | 36 | <!-- Retry dialog --> |
37 | - <div id="queue-confirm-retry" title="<?php _e( 'Retry Job', 'autoptimize' ); ?>" class="hidden"> |
|
38 | - <p><?php _e( 'Are you sure you want to retry this job?', 'autoptimize' ); ?></p> |
|
37 | + <div id="queue-confirm-retry" title="<?php _e('Retry Job', 'autoptimize'); ?>" class="hidden"> |
|
38 | + <p><?php _e('Are you sure you want to retry this job?', 'autoptimize'); ?></p> |
|
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <!-- Remove dialog --> |
42 | - <div id="queue-confirm-rm" title="<?php _e( 'Delete Job', 'autoptimize' ); ?>" class="hidden"> |
|
43 | - <p><?php _e( 'Are you sure you want to delete this job?', 'autoptimize' ); ?></p> |
|
42 | + <div id="queue-confirm-rm" title="<?php _e('Delete Job', 'autoptimize'); ?>" class="hidden"> |
|
43 | + <p><?php _e('Are you sure you want to delete this job?', 'autoptimize'); ?></p> |
|
44 | 44 | </div> |
45 | 45 | |
46 | 46 | <!-- Remove all dialog --> |
47 | - <div id="queue-confirm-rm-all" title="<?php _e( 'Delete all jobs', 'autoptimize' ); ?>" class="hidden"> |
|
48 | - <p><?php _e( 'This will delete all jobs, are you sure?', 'autoptimize' ); ?></p> |
|
47 | + <div id="queue-confirm-rm-all" title="<?php _e('Delete all jobs', 'autoptimize'); ?>" class="hidden"> |
|
48 | + <p><?php _e('This will delete all jobs, are you sure?', 'autoptimize'); ?></p> |
|
49 | 49 | </div> |
50 | 50 | <!-- END Queue dialogs --> |
51 | 51 | |
52 | 52 | <!-- BEGIN Queue UI --> |
53 | 53 | <div class="howto"> |
54 | 54 | <div class="title-wrap"> |
55 | - <h4 class="title"><?php _e( 'How To Use Autoptimize CriticalCSS Power-Up Queue', 'autoptimize' ); ?></h4> |
|
56 | - <p class="subtitle"><?php _e( 'Click the side arrow to toggle instructions', 'autoptimize' ); ?></p> |
|
55 | + <h4 class="title"><?php _e('How To Use Autoptimize CriticalCSS Power-Up Queue', 'autoptimize'); ?></h4> |
|
56 | + <p class="subtitle"><?php _e('Click the side arrow to toggle instructions', 'autoptimize'); ?></p> |
|
57 | 57 | </div> |
58 | 58 | <button type="button" class="toggle-btn"> |
59 | 59 | <span class="toggle-indicator dashicons dashicons-arrow-up dashicons-arrow-down"></span> |
60 | 60 | </button> |
61 | 61 | <div class="howto-wrap hidden"> |
62 | - <p><?php _e( 'TL;DR:<br /><strong>Queue runs every 10 minutes.</strong> Job statuses are <span class="badge new">N</span> for NEW, <span class="badge pending">P</span> for PENDING, <span class="badge error">E</span> for ERROR and <span class="badge unknown">U</span> for UNKOWN.', 'autoptimize' ); ?></p> |
|
62 | + <p><?php _e('TL;DR:<br /><strong>Queue runs every 10 minutes.</strong> Job statuses are <span class="badge new">N</span> for NEW, <span class="badge pending">P</span> for PENDING, <span class="badge error">E</span> for ERROR and <span class="badge unknown">U</span> for UNKOWN.', 'autoptimize'); ?></p> |
|
63 | 63 | <ol> |
64 | - <li><?php _e( 'The queue operates <strong>automatically, asynchronously and on regular intervals of 10 minutes.</strong> To view updated queue status, refresh this page.', 'autoptimize' ); ?></li> |
|
65 | - <li><?php _e( 'When the conditions to create a job are met (i.e. user not logged in, no matching <span class="badge manual">MANUAL</span> rule or CSS files has changed for an <span class="badge auto">AUTO</span> rule), a <span class="badge new">N</span> job is created in the queue.', 'autoptimize' ); ?></li> |
|
66 | - <li><?php _e( "Autoptimize CriticalCSS Power-Up constantly query the queue for <span class='badge new'>N</span> jobs. When it finds one, gears spins and jobs becomes <span class='badge pending'>P</span> while they are running and <a href='https://criticalcss.com/?aff=1' target='_blank'>criticalcss.com</a> doesn't return a result.", 'autoptimize' ); ?></li> |
|
67 | - <li><?php _e( 'As soon as <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> returns a valid critical CSS file, the job is then finished and removed from the queue.', 'autoptimize' ); ?></li> |
|
68 | - <li><?php _e( 'When things go wrong, a job is marked as <span class="badge error">E</span>. You can retry faulty jobs, delete them or get in touch with <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> for assistance.', 'autoptimize' ); ?></li> |
|
69 | - <li><?php _e( 'Sometimes an unknown condition can happen. In this case, the job status becomes <span class="badge unknown">U</span> and you may want to ask <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> for help or just delete it.', 'autoptimize' ); ?></li> |
|
70 | - <li><?php _e( 'To get more information about jobs statuses, specially the ones with <span class="badge error">E</span> and <span class="badge unknown">U</span> status, hover your mouse in the status badge of that job. This information might be crucial when contacting <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> for assistance.', 'autoptimize' ); ?></li> |
|
71 | - <li><?php _e( '<strong>A word about WordPress cron:</strong> Autoptimize CriticalCSS Power-Up watch the queue by using WordPress Cron (or WP-Cron for short.) It <a href="https://www.smashingmagazine.com/2013/10/schedule-events-using-wordpress-cron/#limitations-of-wordpress-cron-and-solutions-to-fix-em" target="_blank">could be faulty</a> on very light or very heavy loads. If your site receives just a few or thousands visits a day, it might be a good idea to <a href="https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/" target="_blank">turn WP-Cron off and use your system task scheduler</a> to fire it instead.', 'autoptimize' ); ?></li> |
|
64 | + <li><?php _e('The queue operates <strong>automatically, asynchronously and on regular intervals of 10 minutes.</strong> To view updated queue status, refresh this page.', 'autoptimize'); ?></li> |
|
65 | + <li><?php _e('When the conditions to create a job are met (i.e. user not logged in, no matching <span class="badge manual">MANUAL</span> rule or CSS files has changed for an <span class="badge auto">AUTO</span> rule), a <span class="badge new">N</span> job is created in the queue.', 'autoptimize'); ?></li> |
|
66 | + <li><?php _e("Autoptimize CriticalCSS Power-Up constantly query the queue for <span class='badge new'>N</span> jobs. When it finds one, gears spins and jobs becomes <span class='badge pending'>P</span> while they are running and <a href='https://criticalcss.com/?aff=1' target='_blank'>criticalcss.com</a> doesn't return a result.", 'autoptimize'); ?></li> |
|
67 | + <li><?php _e('As soon as <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> returns a valid critical CSS file, the job is then finished and removed from the queue.', 'autoptimize'); ?></li> |
|
68 | + <li><?php _e('When things go wrong, a job is marked as <span class="badge error">E</span>. You can retry faulty jobs, delete them or get in touch with <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> for assistance.', 'autoptimize'); ?></li> |
|
69 | + <li><?php _e('Sometimes an unknown condition can happen. In this case, the job status becomes <span class="badge unknown">U</span> and you may want to ask <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> for help or just delete it.', 'autoptimize'); ?></li> |
|
70 | + <li><?php _e('To get more information about jobs statuses, specially the ones with <span class="badge error">E</span> and <span class="badge unknown">U</span> status, hover your mouse in the status badge of that job. This information might be crucial when contacting <a href="https://criticalcss.com/?aff=1" target="_blank">criticalcss.com</a> for assistance.', 'autoptimize'); ?></li> |
|
71 | + <li><?php _e('<strong>A word about WordPress cron:</strong> Autoptimize CriticalCSS Power-Up watch the queue by using WordPress Cron (or WP-Cron for short.) It <a href="https://www.smashingmagazine.com/2013/10/schedule-events-using-wordpress-cron/#limitations-of-wordpress-cron-and-solutions-to-fix-em" target="_blank">could be faulty</a> on very light or very heavy loads. If your site receives just a few or thousands visits a day, it might be a good idea to <a href="https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/" target="_blank">turn WP-Cron off and use your system task scheduler</a> to fire it instead.', 'autoptimize'); ?></li> |
|
72 | 72 | </ol> |
73 | 73 | </div> |
74 | 74 | </div> |
75 | 75 | <table id="queue-tbl" class="queue tablesorter" cellspacing="0"> |
76 | 76 | <thead> |
77 | - <tr><th class="status"><?php _e( 'Status', 'autoptimize' ); ?></th><th><?php _e( 'Target Rule', 'autoptimize' ); ?></th><th><?php _e( 'Page Path', 'autoptimize' ); ?></th><th><?php _e( 'Page Type', 'autoptimize' ); ?></th><th><?php _e( 'Creation Date', 'autoptimize' ); ?></th><th><?php _e( 'Finish Date', 'autoptimize' ); ?></th><th class="btn"><?php _e( 'Actions', 'autoptimize' ); ?></th></tr> |
|
77 | + <tr><th class="status"><?php _e('Status', 'autoptimize'); ?></th><th><?php _e('Target Rule', 'autoptimize'); ?></th><th><?php _e('Page Path', 'autoptimize'); ?></th><th><?php _e('Page Type', 'autoptimize'); ?></th><th><?php _e('Creation Date', 'autoptimize'); ?></th><th><?php _e('Finish Date', 'autoptimize'); ?></th><th class="btn"><?php _e('Actions', 'autoptimize'); ?></th></tr> |
|
78 | 78 | </thead> |
79 | 79 | <tbody id="queue"></tbody> |
80 | 80 | </table> |
81 | - <input class="hidden" type="text" id="ao-ccss-queue" name="autoptimize_ccss_queue" value='<?php echo( $ao_ccss_queue ); ?>'> |
|
81 | + <input class="hidden" type="text" id="ao-ccss-queue" name="autoptimize_ccss_queue" value='<?php echo($ao_ccss_queue); ?>'> |
|
82 | 82 | <div class="submit jobs-btn"> |
83 | 83 | <div class="alignright"> |
84 | - <span id="removeAllJobs" class="button-secondary" style="color:red;"><?php _e( 'Remove all jobs', 'autoptimize' ); ?></span> |
|
84 | + <span id="removeAllJobs" class="button-secondary" style="color:red;"><?php _e('Remove all jobs', 'autoptimize'); ?></span> |
|
85 | 85 | </div> |
86 | 86 | </div> |
87 | 87 | </div> |