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.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 1.9.7 All 169 releases
searchpro / admin / intro-page.php

intro-page.php in BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript trunk, at admin/intro-page.php

177 lines 9.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH'))
3 exit;
4
5 do_action('berqwp_notices');
6 ?>
7 <!--<link rel="preconnect" href="https://fonts.googleapis.com">
8 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9 <link href="https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500&display=swap" rel="stylesheet">
10 <link rel="stylesheet" href="<?php echo esc_attr(optifer_URL . '/admin/css/style.css?v=' . BERQWP_VERSION); ?>">-->
11
12 <div class="wrap">
13 <h1 style="display:none">BerqWP</h1>
14 <div></div>
15 <div id="berqwp-intro">
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>
18
19 <div class="cta-btns">
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">
22 <path
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"
24 fill="white" />
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>
113 Purchase Premium
114 </a>
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">
117 <path
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"
119 fill="white" />
120 <path d="M12 15L13.57 11.57L17 10L13.57 8.43L12 5L10.43 8.43L7 10L10.43 11.57L12 15Z"
121 fill="white" />
122 </svg>
123
124 Get Free License
125 </a>
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> -->
131 </div>
132 </div>
133 <!--<script src="<?php echo esc_attr(optifer_URL . '/admin/js/bootstrap-slider.js?v=' . BERQWP_VERSION); ?>"></script>-->
134 <script>
135 (function($) {
136 $(document).ready(function() {
137
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() {
166 if ($(this).val().length > 5) {
167 $('.continue-cloud button[type="submit"]').prop('disabled', false);
168 } else {
169 $('.continue-cloud button[type="submit"]').prop('disabled', true);
170 }
171 })
172
173
174
175 })
176 })(jQuery)
177 </script>