PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | templates/settings/settings-trackback-and-comments.php +32 -35 3.2.22 → 4.7.0 View file →
@@ -1,9 +1,6 @@
1 -<?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?>
2 -<?php
3 -$trackback_action_arr = $options->get_option('trackbacks_action', array());
4 -$comments_action_arr = $options->get_option('comments_action', array());
5 -?>
1 +<?php if (!defined('ABSPATH')) die('No direct access allowed'); ?>
2 +
6 3 <h3><?php esc_html_e('Trackback/comments actions', 'wp-optimize'); ?></h3>
7 4 <div class="wpo-fieldgroup">
8 5 <div class="wpo-fieldgroup__subgroup">
9 6 <h3 class="wpo-first-child"><?php esc_html_e('Trackbacks', 'wp-optimize'); ?></h3>
@@ -8,31 +5,31 @@
8 5 <div class="wpo-fieldgroup__subgroup">
9 6 <h3 class="wpo-first-child"><?php esc_html_e('Trackbacks', 'wp-optimize'); ?></h3>
10 7
11 8 <div id="trackbacks_notice"></div>
12 -
9 +
13 10 <p>
14 11 <small><?php esc_html_e('Use these buttons to enable or disable any future trackbacks on all your previously published posts.', 'wp-optimize'); ?></small>
15 12 </p>
16 -
13 +
17 14 <p>
18 15 <button class="button btn-updraftplus" type="button" id="wp-optimize-disable-enable-trackbacks-enable" name="wp-optimize-disable-enable-trackbacks-enable"><?php esc_html_e('Enable', 'wp-optimize'); ?></button>
19 -
16 +
20 17 <button class="button btn-updraftplus" type="button" id="wp-optimize-disable-enable-trackbacks-disable" name="wp-optimize-disable-enable-trackbacks-disable"><?php esc_html_e('Disable', 'wp-optimize'); ?></button>
21 - <img id="trackbacks_spinner" class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); ?>" alt="...">
22 - <span id="trackbacks_actionmsg">
23 - <?php
24 - if (!empty($trackback_action_arr)) {
25 -
26 - $trackback_action_timestamp = WP_Optimize()->format_date_time($trackback_action_arr['timestamp']);
27 - if ($trackback_action_arr['action']) {
28 - printf(esc_html__('All trackbacks on existing posts were enabled on the %s.', 'wp-optimize'), esc_html($trackback_action_timestamp));
29 - } else {
30 - printf(esc_html__('All trackbacks on existing posts were disabled on the %s.', 'wp-optimize'), esc_html($trackback_action_timestamp));
18 + <img id="trackbacks_spinner" class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="...">
19 + <span id="trackbacks_actionmsg">
20 + <?php
21 + if (!$settings_trackback_data['empty']) {
22 +
23 + if ($settings_trackback_data['enabled']) {
24 + // translators: %s is a date and time
25 + printf(esc_html__('All trackbacks on existing posts were enabled on the %s.', 'wp-optimize'), esc_html($settings_trackback_data['last_action_timestamp']));
26 + } else {
27 + // translators: %s is a date and time
28 + printf(esc_html__('All trackbacks on existing posts were disabled on the %s.', 'wp-optimize'), esc_html($settings_trackback_data['last_action_timestamp']));
29 + }
31 30 }
32 -
33 - }
34 - ?>
31 + ?>
35 32 </span>
36 33 </p>
37 34
38 35 </div>
@@ -39,9 +36,9 @@
39 36
40 37 <div class="wpo-fieldgroup__subgroup">
41 38
42 39 <h3><?php esc_html_e('Comments', 'wp-optimize'); ?></h3>
43 -
40 +
44 41 <div id="comments_notice"></div>
45 42
46 43 <p><small><?php esc_html_e('Use these buttons to enable or disable any future comments on all your previously published posts.', 'wp-optimize'); ?></small></p>
47 44
@@ -49,23 +46,23 @@
49 46 <button class="button btn-updraftplus" type="button" id="wp-optimize-disable-enable-comments-enable" name="wp-optimize-disable-enable-comments-enable"><?php esc_html_e('Enable', 'wp-optimize'); ?></button>
50 47
51 48 <button class="button btn-updraftplus" type="button" id="wp-optimize-disable-enable-comments-disable" name="wp-optimize-disable-enable-comments-disable"><?php esc_html_e('Disable', 'wp-optimize'); ?></button>
52 49
53 - <img id="comments_spinner" class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); ?>" alt="...">
50 + <img id="comments_spinner" class="wpo_spinner" src="<?php echo esc_url(admin_url('images/spinner-2x.gif')); // phpcs:ignore PluginCheck.CodeAnalysis.ImageFunctions.NonEnqueuedImage -- N/A ?>" alt="...">
54 51 <span id="comments_actionmsg">
55 - <?php
56 - if (!empty($comments_action_arr)) {
57 -
58 - $comments_action_timestamp = WP_Optimize()->format_date_time($comments_action_arr['timestamp']);
59 - if ($comments_action_arr['action']) {
60 - printf(esc_html__('All comments on existing posts were enabled on the %s.', 'wp-optimize'), esc_html($comments_action_timestamp));
61 - } else {
62 - printf(esc_html__('All comments on existing posts were disabled on the %s.', 'wp-optimize'), esc_html($comments_action_timestamp));
52 + <?php
53 + if (!$settings_comments_data['empty']) {
54 +
55 + if ($settings_comments_data['enabled']) {
56 + // translators: %s is a date and time
57 + printf(esc_html__('All comments on existing posts were enabled on the %s.', 'wp-optimize'), esc_html($settings_comments_data['last_action_timestamp']));
58 + } else {
59 + // translators: %s is a date and time
60 + printf(esc_html__('All comments on existing posts were disabled on the %s.', 'wp-optimize'), esc_html($settings_comments_data['last_action_timestamp']));
61 + }
63 62 }
64 -
65 - }
66 - ?>
63 + ?>
67 64 </span>
68 65 </p>
69 66
70 67 </div>
71 -</div>
68 +</div>