← All changes
|
includes/extensions/Custom_Code_Manager/templates/admin-editor.php
+47
-27
51.1.44
→
51.1.83
View file →
| @@ -41,8 +41,23 @@ | ||
| 41 | 41 | <?php echo $is_new ? esc_html__('New Snippet', 'king-addons') : esc_html__('Edit Snippet', 'king-addons'); ?> |
| 42 | 42 | </h1> |
| 43 | 43 | </div> |
| 44 | 44 | <div class="kng-cc-header-right"> |
| 45 | + <div class="ka-v3-segmented" id="ka-v3-theme-segment" role="radiogroup" aria-label="<?php echo esc_attr(esc_html__('Theme', 'king-addons')); ?>" data-active="<?php echo esc_attr($theme_mode); ?>"> | |
| 46 | + <span class="ka-v3-segmented-indicator" aria-hidden="true"></span> | |
| 47 | + <button type="button" class="ka-v3-segmented-btn" data-theme="light" aria-pressed="<?php echo $theme_mode === 'light' ? 'true' : 'false'; ?>"> | |
| 48 | + <span class="ka-v3-segmented-icon" aria-hidden="true">☀︎</span> | |
| 49 | + <?php esc_html_e('Light', 'king-addons'); ?> | |
| 50 | + </button> | |
| 51 | + <button type="button" class="ka-v3-segmented-btn" data-theme="dark" aria-pressed="<?php echo $theme_mode === 'dark' ? 'true' : 'false'; ?>"> | |
| 52 | + <span class="ka-v3-segmented-icon" aria-hidden="true">☾</span> | |
| 53 | + <?php esc_html_e('Dark', 'king-addons'); ?> | |
| 54 | + </button> | |
| 55 | + <button type="button" class="ka-v3-segmented-btn" data-theme="auto" aria-pressed="<?php echo $theme_mode === 'auto' ? 'true' : 'false'; ?>"> | |
| 56 | + <span class="ka-v3-segmented-icon" aria-hidden="true">◐</span> | |
| 57 | + <?php esc_html_e('Auto', 'king-addons'); ?> | |
| 58 | + </button> | |
| 59 | + </div> | |
| 45 | 60 | <div class="kng-cc-status-wrap"> |
| 46 | 61 | <label class="kng-v3-toggle-wrap"> |
| 47 | 62 | <input type="checkbox" name="status" id="kng-cc-status" <?php checked($config['status'], 'enabled'); ?> /> |
| 48 | 63 | <span class="kng-v3-toggle-slider"></span> |
| @@ -51,18 +66,23 @@ | ||
| 51 | 66 | <?php echo $config['status'] === 'enabled' ? esc_html__('Enabled', 'king-addons') : esc_html__('Disabled', 'king-addons'); ?> |
| 52 | 67 | </span> |
| 53 | 68 | </div> |
| 54 | 69 | <button type="submit" class="kng-v3-btn kng-v3-btn--primary" id="kng-cc-save-btn"> |
| 55 | - <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18" class="kng-cc-save-icon"> | |
| 56 | - <path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/> | |
| 57 | - <polyline points="17 21 17 13 7 13 7 21"/> | |
| 58 | - <polyline points="7 3 7 8 15 8"/> | |
| 59 | - </svg> | |
| 60 | - <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18" class="kng-cc-spinner" style="display: none;"> | |
| 61 | - <circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="32"> | |
| 62 | - <animate attributeName="stroke-dashoffset" values="32;0;32" dur="1s" repeatCount="indefinite"/> | |
| 63 | - </circle> | |
| 64 | - </svg> | |
| 70 | + <span class="kng-cc-btn-icons"> | |
| 71 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18" class="kng-cc-save-icon kng-cc-btn-icon"> | |
| 72 | + <path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/> | |
| 73 | + <polyline points="17 21 17 13 7 13 7 21"/> | |
| 74 | + <polyline points="7 3 7 8 15 8"/> | |
| 75 | + </svg> | |
| 76 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18" class="kng-cc-spinner kng-cc-btn-icon"> | |
| 77 | + <circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="32"> | |
| 78 | + <animate attributeName="stroke-dashoffset" values="32;0;32" dur="1s" repeatCount="indefinite"/> | |
| 79 | + </circle> | |
| 80 | + </svg> | |
| 81 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" width="18" height="18" class="kng-cc-check-icon kng-cc-btn-icon"> | |
| 82 | + <polyline points="20 6 9 17 4 12"/> | |
| 83 | + </svg> | |
| 84 | + </span> | |
| 65 | 85 | <span class="kng-cc-save-text"><?php esc_html_e('Save Snippet', 'king-addons'); ?></span> |
| 66 | 86 | </button> |
| 67 | 87 | </div> |
| 68 | 88 | </header> |
| @@ -195,11 +215,11 @@ | ||
| 195 | 215 | |
| 196 | 216 | <!-- JS Options (only for JS type) --> |
| 197 | 217 | <div class="kng-cc-sidebar-section kng-cc-js-options" id="kng-cc-js-options" style="<?php echo $config['type'] !== 'js' ? 'display: none;' : ''; ?>"> |
| 198 | 218 | <h3 class="kng-cc-sidebar-title"> |
| 199 | - <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18"> | |
| 200 | - <rect x="2" y="7" width="20" height="15" rx="2" ry="2"/> | |
| 201 | - <polyline points="17 2 12 7 7 2"/> | |
| 219 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18"> | |
| 220 | + <circle cx="12" cy="12" r="3"/> | |
| 221 | + <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/> | |
| 202 | 222 | </svg> |
| 203 | 223 | <?php esc_html_e('JavaScript Options', 'king-addons'); ?> |
| 204 | 224 | </h3> |
| 205 | 225 | <div class="kng-cc-sidebar-content"> |
| @@ -270,10 +290,10 @@ | ||
| 270 | 290 | </span> |
| 271 | 291 | <span class="kng-cc-radio-text"><?php esc_html_e('Global', 'king-addons'); ?></span> |
| 272 | 292 | </span> |
| 273 | 293 | </label> |
| 274 | - <label class="kng-cc-radio-card <?php echo $config['scope_mode'] === 'include' ? 'is-selected' : ''; ?>"> | |
| 275 | - <input type="radio" name="scope_mode" value="include" <?php checked($config['scope_mode'], 'include'); ?> /> | |
| 294 | + <label class="kng-cc-radio-card <?php echo $config['scope_mode'] === 'include' ? 'is-selected' : ''; ?> <?php echo !$has_pro ? 'is-pro-field' : ''; ?>"> | |
| 295 | + <input type="radio" name="scope_mode" value="include" <?php checked($config['scope_mode'], 'include'); ?> <?php echo !$has_pro ? 'disabled' : ''; ?> /> | |
| 276 | 296 | <span class="kng-cc-radio-card-content"> |
| 277 | 297 | <span class="kng-cc-radio-icon"> |
| 278 | 298 | <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="20" height="20"> |
| 279 | 299 | <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/> |
| @@ -279,13 +299,13 @@ | ||
| 279 | 299 | <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/> |
| 280 | 300 | <polyline points="22 4 12 14.01 9 11.01"/> |
| 281 | 301 | </svg> |
| 282 | 302 | </span> |
| 283 | - <span class="kng-cc-radio-text"><?php esc_html_e('Include', 'king-addons'); ?></span> | |
| 303 | + <span class="kng-cc-radio-text"><?php esc_html_e('Include', 'king-addons'); ?><?php if (!$has_pro): ?> <span class="kng-cc-pro-badge-sm">PRO</span><?php endif; ?></span> | |
| 284 | 304 | </span> |
| 285 | 305 | </label> |
| 286 | - <label class="kng-cc-radio-card <?php echo $config['scope_mode'] === 'exclude' ? 'is-selected' : ''; ?>"> | |
| 287 | - <input type="radio" name="scope_mode" value="exclude" <?php checked($config['scope_mode'], 'exclude'); ?> /> | |
| 306 | + <label class="kng-cc-radio-card <?php echo $config['scope_mode'] === 'exclude' ? 'is-selected' : ''; ?> <?php echo !$has_pro ? 'is-pro-field' : ''; ?>"> | |
| 307 | + <input type="radio" name="scope_mode" value="exclude" <?php checked($config['scope_mode'], 'exclude'); ?> <?php echo !$has_pro ? 'disabled' : ''; ?> /> | |
| 288 | 308 | <span class="kng-cc-radio-card-content"> |
| 289 | 309 | <span class="kng-cc-radio-icon"> |
| 290 | 310 | <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="20" height="20"> |
| 291 | 311 | <circle cx="12" cy="12" r="10"/> |
| @@ -291,9 +311,9 @@ | ||
| 291 | 311 | <circle cx="12" cy="12" r="10"/> |
| 292 | 312 | <line x1="4.93" y1="4.93" x2="19.07" y2="19.07"/> |
| 293 | 313 | </svg> |
| 294 | 314 | </span> |
| 295 | - <span class="kng-cc-radio-text"><?php esc_html_e('Exclude', 'king-addons'); ?></span> | |
| 315 | + <span class="kng-cc-radio-text"><?php esc_html_e('Exclude', 'king-addons'); ?><?php if (!$has_pro): ?> <span class="kng-cc-pro-badge-sm">PRO</span><?php endif; ?></span> | |
| 296 | 316 | </span> |
| 297 | 317 | </label> |
| 298 | 318 | </div> |
| 299 | 319 | </div> |
| @@ -329,23 +349,23 @@ | ||
| 329 | 349 | <!-- Pro Features Upsell --> |
| 330 | 350 | <div class="kng-cc-sidebar-section kng-cc-pro-section"> |
| 331 | 351 | <div class="kng-cc-pro-box"> |
| 332 | 352 | <div class="kng-cc-pro-box-icon"> |
| 333 | - <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="24" height="24"> | |
| 353 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" width="22" height="22"> | |
| 334 | 354 | <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/> |
| 335 | 355 | </svg> |
| 336 | 356 | </div> |
| 337 | - <h4><?php esc_html_e('Pro Features', 'king-addons'); ?></h4> | |
| 357 | + <h4><?php esc_html_e('Unlock All Features', 'king-addons'); ?></h4> | |
| 358 | + <p class="kng-cc-pro-box-subtitle"><?php esc_html_e('Get the most out of Custom Code Manager', 'king-addons'); ?></p> | |
| 338 | 359 | <ul class="kng-cc-pro-features-list"> |
| 339 | - <li><?php esc_html_e('HTML snippets', 'king-addons'); ?></li> | |
| 340 | 360 | <li><?php esc_html_e('Unlimited snippets', 'king-addons'); ?></li> |
| 361 | + <li><?php esc_html_e('Include & Exclude targeting', 'king-addons'); ?></li> | |
| 362 | + <li><?php esc_html_e('HTML snippet support', 'king-addons'); ?></li> | |
| 341 | 363 | <li><?php esc_html_e('Body Open & Custom Hooks', 'king-addons'); ?></li> |
| 342 | - <li><?php esc_html_e('Advanced JS attributes', 'king-addons'); ?></li> | |
| 343 | - <li><?php esc_html_e('User role rules', 'king-addons'); ?></li> | |
| 344 | - <li><?php esc_html_e('Device targeting', 'king-addons'); ?></li> | |
| 345 | - <li><?php esc_html_e('URL regex matching', 'king-addons'); ?></li> | |
| 364 | + <li><?php esc_html_e('Defer, Async & ES Module', 'king-addons'); ?></li> | |
| 365 | + <li><?php esc_html_e('User role & device rules', 'king-addons'); ?></li> | |
| 346 | 366 | </ul> |
| 347 | - <a href="<?php echo esc_url(admin_url('admin.php?page=king-addons-upgrade')); ?>" class="kng-v3-btn kng-v3-btn--accent kng-v3-btn--sm"> | |
| 367 | + <a href="https://kingaddons.com/pricing/?utm_source=kng-custom-code&utm_medium=wp-admin&utm_campaign=kng" target="_blank" rel="noopener" class="kng-v3-btn kng-v3-btn--accent kng-v3-btn--sm" style="width:100%;justify-content:center;"> | |
| 348 | 368 | <?php esc_html_e('Upgrade to Pro', 'king-addons'); ?> |
| 349 | 369 | </a> |
| 350 | 370 | </div> |
| 351 | 371 | </div> |