PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / trunk
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript vtrunk
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
← All changes | admin/admin-page.php +75 -10 4.0.29trunk View file →
@@ -29,16 +29,18 @@
29 29 }
30 30
31 31 ?>" alt="BerqWP Logo">
32 32 <div class="berqwp-header-right">
33 - <?php if (empty(berqwp_get_license_key())) { ?>
34 - <a class="bwp-action-btn light bwp-upgrade-btn" href="https://berqwp.com/pricing/?referrer=plugin-installation" target="_blank">
33 + <?php if (empty(berqwp_get_license_key()) || $this->key_response->product_ref == 'Free Account') { ?>
34 + <a class="bwp-action-btn light bwp-upgrade-btn" href="https://berqwp.com/dashboard/?referrer=plugin-installation" target="_blank">
35 35 <div class="icon">
36 36 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rocket-icon lucide-rocket"><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09"/><path d="M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"/></svg>
37 37 </div>
38 - Upgrade Performance
38 + <?php esc_html_e('Upgrade to Premium', 'searchpro'); ?>
39 39 </a>
40 40 <?php } ?>
41 +
42 + <?php if ($this->is_key_verified) { ?>
41 43 <div class="optimization-methods-switch <?php echo esc_attr($configs['optimization_method'])?>" title="Optimization method">
42 44 <a class="method-local" href="<?php echo esc_attr(wp_nonce_url(admin_url('admin-post.php?action=switch_optimization_method_local'), 'switch_optimization_method_local_action')); ?>">
43 45 <div class="icon">
44 46 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server-icon lucide-server">
@@ -47,9 +49,9 @@
47 49 <line x1="6" x2="6.01" y1="6" y2="6" />
48 50 <line x1="6" x2="6.01" y1="18" y2="18" />
49 51 </svg>
50 52 </div>
51 - Local (free)
53 + Self-hosted
52 54
53 55 </a>
54 56
55 57 <a class="method-cloud" href="<?php echo esc_attr(wp_nonce_url(admin_url('admin-post.php?action=switch_optimization_method_cloud'), 'switch_optimization_method_cloud_action')); ?>">
@@ -62,8 +64,10 @@
62 64 BerqWP Cloud
63 65 </a>
64 66 </div>
65 67
68 + <?php } ?>
69 +
66 70 <a class="bwp-action-btn light" href="<?php echo esc_attr(wp_nonce_url(admin_url('admin-post.php?action=clear_cache'), 'clear_cache_action')); ?>">
67 71 <div class="icon">
68 72 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-brush-cleaning-icon lucide-brush-cleaning"><path d="m16 22-1-4"/><path d="M19 14a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v1a1 1 0 0 0 1 1"/><path d="M19 14H5l-1.973 6.767A1 1 0 0 0 4 22h16a1 1 0 0 0 .973-1.233z"/><path d="m8 22 1-4"/></svg>
69 73 </div>
@@ -127,22 +131,31 @@
127 131 <div class="berqwp-tab <?php bwp_is_tab_nav('script-manager'); ?>" data-tab="script-manager">
128 132 <div class="icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-code-corner-icon lucide-file-code-corner"><path d="M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35"/><path d="M14 2v5a1 1 0 0 0 1 1h5"/><path d="m5 16-3 3 3 3"/><path d="m9 22 3-3-3-3"/></svg></div>
129 133 <?php esc_html_e('Script Manager', 'searchpro'); ?>
130 134 </div>-->
135 + <div class="berqwp-tab <?php bwp_is_tab_nav('database'); ?>" data-tab="database">
136 + <div class="icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database-icon lucide-database"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5V19A9 3 0 0 0 21 19V5"/><path d="M3 12A9 3 0 0 0 21 12"/></svg></div>
137 + <?php esc_html_e('Database', 'searchpro'); ?>
138 + </div>
139 + <div class="berqwp-tab <?php bwp_is_tab_nav('debloat'); ?>" data-tab="debloat">
140 + <div class="icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash2-icon lucide-trash-2"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg></div>
141 + <?php esc_html_e('Debloat', 'searchpro'); ?>
142 + </div>
131 143 <div class="berqwp-tab <?php bwp_is_tab_nav('integration'); ?>" data-tab="integration">
132 144 <div class="icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-blocks-icon lucide-blocks"><path d="M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2"/><rect x="14" y="2" width="8" height="8" rx="1"/></svg></div>
133 145 <?php esc_html_e('Integration', 'searchpro'); ?>
134 146 </div>
135 - <?php if ($berqwp_can_use_cloud) { ?>
136 147 <div class="berqwp-tab <?php bwp_is_tab_nav('activate-license'); ?>" data-tab="activate-license">
137 148 <div class="icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-settings2-icon lucide-settings-2"><path d="M14 17H5"/><path d="M19 7h-9"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/></svg></div>
138 149 <?php esc_html_e('License', 'searchpro'); ?>
139 150 </div>
140 - <?php } ?>
151 +
152 + <?php if (!defined('BERQWP_HIDE_DOCS') || !BERQWP_HIDE_DOCS) { ?>
141 153 <a class="berqwp-tab tab-link" target="_blank" href="https://www.facebook.com/groups/1660827728253423">
142 154 <div class="icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" width="24"><!--!Font Awesome Free v7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--><path d="M576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 440 146.7 540.8 258.2 568.5L258.2 398.2L205.4 398.2L205.4 320L258.2 320L258.2 286.3C258.2 199.2 297.6 158.8 383.2 158.8C399.4 158.8 427.4 162 438.9 165.2L438.9 236C432.9 235.4 422.4 235 409.3 235C367.3 235 351.1 250.9 351.1 292.2L351.1 320L434.7 320L420.3 398.2L351 398.2L351 574.1C477.8 558.8 576 450.9 576 320z"/></svg></svg></div>
143 155 <?php esc_html_e('Join BerqWP Community', 'searchpro'); ?>
144 156 </a>
157 + <?php } ?>
145 158 </div>
146 159 <div class="berqwp-tab-content">
147 160 <?php do_action('berqwp_notices'); ?>
148 161 <form action="" method="post">
@@ -158,13 +171,12 @@
158 171 // require_once optifer_PATH . '/admin/tabs/image-optimization.php';
159 172 require_once optifer_PATH . '/admin/tabs/media-optimization.php';
160 173 // require_once optifer_PATH . '/admin/tabs/script-manager.php';
161 174 require_once optifer_PATH . '/admin/tabs/integration.php';
175 + require_once optifer_PATH . '/admin/tabs/database.php';
176 + require_once optifer_PATH . '/admin/tabs/debloat.php';
177 + require_once optifer_PATH . '/admin/tabs/activate-license.php';
162 178
163 - if ($berqwp_can_use_cloud) {
164 - require_once optifer_PATH . '/admin/tabs/activate-license.php';
165 - }
166 -
167 179 ?>
168 180 </form>
169 181 </div>
170 182 </div>
@@ -458,8 +470,16 @@
458 470 $('[name="berqwp_preload_yt_poster"]').parent().hide();
459 471 }
460 472 });
461 473
474 + $('[name="berqwp_heartbeat_mode"]').on('change', function() {
475 + if ($('[name="berqwp_heartbeat_mode"]:checked').val() === 'throttle') {
476 + $('.berqwp-heartbeat-interval').show();
477 + } else {
478 + $('.berqwp-heartbeat-interval').hide();
479 + }
480 + });
481 +
462 482 // $(document).ready(function () {
463 483 // const stickyDiv = $('.berqwp-dashbaord');
464 484 // const offset = stickyDiv.offset().top;
465 485
@@ -545,8 +565,53 @@
545 565 },
546 566 error: function() {
547 567 loader.hide();
548 568 alert("Page compression test failed: Please check your internet connection.");
569 + }
570 + });
571 + })
572 + })
573 + })(jQuery)
574 +</script>
575 +<script>
576 + (function($) {
577 + $(document).ready(function() {
578 + let berq_nounce = '<?php echo esc_html(wp_create_nonce('wp_rest')); ?>';
579 +
580 + $('.berqwp-db-run-action').click(function(e) {
581 + e.preventDefault();
582 +
583 + let $btn = $(this);
584 + let $action = $btn.closest('.berqwp-db-action');
585 + let task = $action.data('task');
586 + let limit = $action.find('input[name="berqwp_db_revision_limit"]').val();
587 +
588 + $btn.addClass('disabled').text('Running...');
589 +
590 + $.ajax({
591 + url: ajaxurl,
592 + type: 'POST',
593 + data: {
594 + action: 'berqwp_db_run_action',
595 + task: task,
596 + limit: limit,
597 + nonce: berq_nounce,
598 + },
599 + beforeSend: function(xhr) {
600 + xhr.setRequestHeader('X-WP-Nonce', berq_nounce);
601 + },
602 + success: function(data) {
603 + if (data.success) {
604 + alert(data.data.message);
605 + } else {
606 + alert(data.data && data.data.message ? data.data.message : 'Something went wrong.');
607 + }
608 + },
609 + error: function() {
610 + alert('Request failed. Please check your internet connection.');
611 + },
612 + complete: function() {
613 + $btn.removeClass('disabled').text($btn.data('task') === 'optimize_tables' ? 'Optimize now' : 'Clean now');
549 614 }
550 615 });
551 616 })
552 617 })