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/intro-page.php +135 -25 1.9.7trunk View file →
@@ -1,42 +1,120 @@
1 1 <?php
2 2 if (!defined('ABSPATH'))
3 3 exit;
4 4
5 +do_action('berqwp_notices');
5 6 ?>
6 -<link rel="preconnect" href="https://fonts.googleapis.com">
7 +<!--<link rel="preconnect" href="https://fonts.googleapis.com">
7 8 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
8 9 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500&display=swap" rel="stylesheet">
9 -<link rel="stylesheet" href="<?php echo esc_attr(optifer_URL . '/admin/css/style.css?v=' . BERQWP_VERSION); ?>">
10 +<link rel="stylesheet" href="<?php echo esc_attr(optifer_URL . '/admin/css/style.css?v=' . BERQWP_VERSION); ?>">-->
10 11
11 12 <div class="wrap">
12 13 <h1 style="display:none">BerqWP</h1>
13 14 <div></div>
14 15 <div id="berqwp-intro">
15 - <h2 class="title">Automate PageSpeed optimization with just a few clicks</h2>
16 + <img src="<?php echo esc_attr(optifer_URL . '/admin/img/logo.png'); ?>" alt="BerqWP" class="logo">
17 + <h2 class="title">Automate performance optimization with just a few clicks</h2>
16 18
17 - <form class="license-verification" action="" method="post">
18 - <?php wp_nonce_field('berqwp_save_settings', 'berqwp_save_nonce'); ?>
19 - <input type="password" name="berqwp_license_key" placeholder="Enter your license key" required>
20 - <input type="submit" value="Activate" disabled>
21 - </form>
22 - <?php
23 - if (!empty($error)) {
24 - echo wp_kses_post('<p style="color:red">'.$error.'</p>');
25 - }
26 - ?>
27 - <p class="license-msg">Create an account to obtain a BerqWP license key.</p>
28 19 <div class="cta-btns">
29 - <a href="http://berqwp.com/pricing/" class="btn" target="_blank">
30 - <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
20 + <a href="https://berqwp.com/pricing/?source=plugin-intro-page" class="btn" target="_blank">
21 + <svg width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
31 22 <path
32 23 d="M12 8L15 13.2L18 10.5L17.3 14H6.7L6 10.5L9 13.2L12 8ZM12 4L8.5 10L3 5L5 16H19L21 5L15.5 10L12 4ZM19 18H5V19C5 19.6 5.4 20 6 20H18C18.6 20 19 19.6 19 19V18Z"
33 24 fill="white" />
34 25 </svg>
26 + Get Premium
27 + </a>
28 + <a href="<?php echo esc_attr(admin_url('admin.php?page=berqwp&activate-free')); ?>" class="btn secondary">
29 + <svg width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
30 + <path
31 + d="M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM20 16H5.17L4 17.17V4H20V16Z"
32 + fill="#222" />
33 + <path d="M12 15L13.57 11.57L17 10L13.57 8.43L12 5L10.43 8.43L7 10L10.43 11.57L12 15Z"
34 + fill="#222" />
35 + </svg>
36 +
37 + Continue Free
38 + </a>
39 + </div>
40 +
41 + <?php if (berqwp_is_license_managed_by_network()): ?>
42 + <div style="text-align: center; padding: 20px;">
43 + <p style="font-size: 16px;">The license key for this plugin is managed at the <strong>Network Admin</strong> level.</p>
44 + <?php if (current_user_can('manage_network_options')): ?>
45 + <p><a href="<?php echo esc_url(network_admin_url('admin.php?page=berqwp-network')); ?>" class="button button-primary" style="font-size: 14px; padding: 8px 20px;">Go to Network Settings</a></p>
46 + <?php else: ?>
47 + <p>Please contact your network administrator to activate the license.</p>
48 + <?php endif; ?>
49 + </div>
50 + <?php else: ?>
51 +
52 + <form class="berqwp-onboard-form" action="" method="post" autocomplete="off">
53 + <?php wp_nonce_field('berqwp_save_settings', 'berqwp_save_nonce'); ?>
54 + <input type="hidden" name="berqwp_intro_page" value="1">
55 + <div class="optimization-method-block">
56 + <!-- <h3>Choose Optimization Method:</h3> -->
57 + <!-- <p>Continue with free optimization or activate license key for premium performance and full feature access.</p> -->
58 + <div class="optimization-method-options" style="display:none">
59 + <input type="radio" id="berqwp-om-local" name="berqwp_optimization_method" value="local">
60 + <label for="berqwp-om-local" class="optimization-method">
61 + <div class="icon">
62 + <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">
63 + <rect width="20" height="8" x="2" y="2" rx="2" ry="2" />
64 + <rect width="20" height="8" x="2" y="14" rx="2" ry="2" />
65 + <line x1="6" x2="6.01" y1="6" y2="6" />
66 + <line x1="6" x2="6.01" y1="18" y2="18" />
67 + </svg>
68 + </div>
69 + Optimize locally (free)
70 + </label>
71 + <input type="radio" id="berqwp-om-cloud" name="berqwp_optimization_method" value="cloud" checked>
72 + <label for="berqwp-om-cloud" class="optimization-method">
73 + <div class="icon">
74 + <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-cloudy-icon lucide-cloudy">
75 + <path d="M17.5 12a1 1 0 1 1 0 9H9.006a7 7 0 1 1 6.702-9z" />
76 + <path d="M21.832 9A3 3 0 0 0 19 7h-2.207a5.5 5.5 0 0 0-10.72.61" />
77 + </svg>
78 + </div>
79 + BerqWP Cloud
80 + </label>
81 + </div>
82 + </div>
83 +
84 + <div class="continue-local" style="display: none;">
85 + <div class="inner">
86 + <input type="email" name="berqwp_local_user_email" placeholder="Enter your email (optional)">
87 + <button type="submit" disabled>Continue</button>
88 + </div>
89 + </div>
90 + <div class="continue-cloud">
91 + <div class="inner">
92 + <input type="password" name="berqwp_license_key" placeholder="Enter your license key" autocomplete="off">
93 + <button type="submit" disabled>Activate</button>
94 +
95 + </div>
96 + <?php
97 + if (!empty($error)) {
98 + echo wp_kses_post('<p style="color:red">' . $error . '</p>');
99 + }
100 + ?>
101 + <p class="license-msg" style="text-align: center;">Create an account to obtain a <a href="https://berqwp.com/pricing/?source=plugin-intro-page" target="_blank">BerqWP license key</a>.</p>
102 + </div>
103 + </form>
104 +
105 + <?php endif; ?>
106 + <!-- <div class="cta-btns">
107 + <a href="https://berqwp.com/pricing/?source=plugin-intro-page" class="btn" target="_blank">
108 + <svg width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
109 + <path
110 + d="M12 8L15 13.2L18 10.5L17.3 14H6.7L6 10.5L9 13.2L12 8ZM12 4L8.5 10L3 5L5 16H19L21 5L15.5 10L12 4ZM19 18H5V19C5 19.6 5.4 20 6 20H18C18.6 20 19 19.6 19 19V18Z"
111 + fill="white" />
112 + </svg>
35 113 Purchase Premium
36 114 </a>
37 - <a href="https://berqwp.com/free-account/" class="btn" target="_blank">
38 - <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
115 + <a href="https://berqwp.com/free-account/?source=plugin-intro-page" class="btn" target="_blank">
116 + <svg width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
39 117 <path
40 118 d="M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM20 16H5.17L4 17.17V4H20V16Z"
41 119 fill="white" />
42 120 <path d="M12 15L13.57 11.57L17 10L13.57 8.43L12 5L10.43 8.43L7 10L10.43 11.57L12 15Z"
@@ -42,26 +120,58 @@
42 120 <path d="M12 15L13.57 11.57L17 10L13.57 8.43L12 5L10.43 8.43L7 10L10.43 11.57L12 15Z"
43 121 fill="white" />
44 122 </svg>
45 123
46 - Get Free Account
124 + Get Free License
47 125 </a>
48 - </div>
126 + </div> -->
127 +
128 + <!-- <div class="berqwp-continue-free">
129 + <a href="<?php echo esc_attr(admin_url('admin.php?page=berqwp&activate-free')); ?>">Continue self-hosted</a>
130 + </div> -->
49 131 </div>
50 132 </div>
51 -<script src="<?php echo esc_attr(optifer_URL . '/admin/js/bootstrap-slider.js?v=' . BERQWP_VERSION); ?>"></script>
133 +<!--<script src="<?php echo esc_attr(optifer_URL . '/admin/js/bootstrap-slider.js?v=' . BERQWP_VERSION); ?>"></script>-->
52 134 <script>
53 - (function($){
135 + (function($) {
54 136 $(document).ready(function() {
55 137
56 - $('input[name="berqwp_license_key"]').on('change, input', function () {
138 + function update_optimization_method() {
139 + let val = $('.optimization-method-options input[type="radio"]:checked').val();
140 +
141 + if (val == 'local') {
142 + $('#berqwp-intro .continue-local').show();
143 + $('#berqwp-intro .continue-cloud').hide();
144 +
145 + $('input[name="berqwp_local_user_email"]').prop('required', false);
146 + $('input[name="berqwp_local_user_email"]').prop('disabled', false);
147 + $('input[name="berqwp_license_key"]').prop('required', false);
148 + $('.continue-local button[type="submit"]').prop('disabled', false);
149 + }
150 +
151 + if (val == 'cloud') {
152 + $('#berqwp-intro .continue-local').hide();
153 + $('#berqwp-intro .continue-cloud').show();
154 +
155 + $('input[name="berqwp_local_user_email"]').prop('required', false);
156 + $('input[name="berqwp_local_user_email"]').prop('disabled', true);
157 + $('input[name="berqwp_license_key"]').prop('required', true);
158 + }
159 + }
160 +
161 + update_optimization_method();
162 +
163 + $('.optimization-method-options input[type="radio"]').on('change', update_optimization_method)
164 +
165 + $('input[name="berqwp_license_key"]').on('change, input', function() {
57 166 if ($(this).val().length > 5) {
58 - $('input[value="Activate"]').prop('disabled', false);
167 + $('.continue-cloud button[type="submit"]').prop('disabled', false);
59 168 } else {
60 - $('input[value="Activate"]').prop('disabled', true);
169 + $('.continue-cloud button[type="submit"]').prop('disabled', true);
61 170 }
62 171 })
172 +
63 173
64 174
65 175 })
66 176 })(jQuery)
67 177 </script>