cookie-law-info-admin_settings.php
2 weeks ago
cookie-law-info-privacy_overview.php
2 weeks ago
wt-cli-update-banner.php
2 weeks ago
wt-cli-update-modals.php
2 weeks ago
wt-cli-update-modals.php
164 lines
| 1 | <?php |
| 2 | // If this file is called directly, abort. |
| 3 | if ( ! defined( 'WPINC' ) ) { |
| 4 | die; |
| 5 | } |
| 6 | $cli_uf_img = CLI_PLUGIN_URL . 'admin/images/upgrade-flow/'; |
| 7 | $cli_feature_cards = array( |
| 8 | array( 'icon' => 'icon-accessibility.svg', 'title' => __( 'Improved accessibility', 'cookie-law-info' ), 'desc' => __( 'Deliver a more inclusive experience with WCAG-compliant banner design.', 'cookie-law-info' ) ), |
| 9 | array( 'icon' => 'icon-performance.svg', 'title' => __( 'Faster performance', 'cookie-law-info' ), 'desc' => __( 'Load your banner faster and reduce impact on page speed.', 'cookie-law-info' ) ), |
| 10 | array( 'icon' => 'icon-blocking.svg', 'title' => __( 'Automatic cookie blocking', 'cookie-law-info' ), 'desc' => __( 'Handle cookie blocking automatically without manual setup.', 'cookie-law-info' ) ), |
| 11 | array( 'icon' => 'icon-compliance.svg', 'title' => __( 'Built-in compliance standards', 'cookie-law-info' ), 'desc' => __( 'Supports Google Consent Mode, IAB TCF v2.3, and Google Additional Consent Mode.', 'cookie-law-info' ) ), |
| 12 | array( 'icon' => 'icon-customisation.svg', 'title' => __( 'More flexible customisation', 'cookie-law-info' ), 'desc' => __( 'Customise styles and layout easily with custom CSS to adjust fonts, button style, and revisit button.', 'cookie-law-info' ) ), |
| 13 | ); |
| 14 | $cli_accordion_items = array( |
| 15 | array( |
| 16 | 'icon' => 'icon-changes.svg', 'title' => __( 'Changes in customisation', 'cookie-law-info' ), |
| 17 | 'desc' => __( 'Updates to banner behavior, animation, and consent interactions', 'cookie-law-info' ), |
| 18 | 'item_class' => 'wt-cli-accordion-item--changes', 'list_class' => '', |
| 19 | 'note' => __( 'These features are being removed to align with evolving privacy standards.', 'cookie-law-info' ), |
| 20 | 'items' => array( __( 'Turning buttons into links or redirect actions', 'cookie-law-info' ), __( 'Banner animations (on load or hide)', 'cookie-law-info' ), __( 'Scroll-based banner movement', 'cookie-law-info' ), __( 'Consent triggered by scroll or timed delay', 'cookie-law-info' ) ), |
| 21 | ), |
| 22 | array( |
| 23 | 'icon' => 'icon-alternatives.svg', 'title' => __( 'What you can do instead', 'cookie-law-info' ), |
| 24 | 'desc' => __( 'More flexible styling, layout, and compliance-ready controls', 'cookie-law-info' ), |
| 25 | 'item_class' => 'wt-cli-accordion-item--alternatives', 'list_class' => 'wt-cli-bullet-list-green', 'note' => '', |
| 26 | 'items' => array( __( 'Modern customisation using built-in controls and custom CSS', 'cookie-law-info' ), __( 'Better control over layout, styling, and consent behavior', 'cookie-law-info' ), __( 'Automatic cookie blocking and improved compliance handling', 'cookie-law-info' ) ), |
| 27 | ), |
| 28 | array( |
| 29 | 'icon' => 'icon-capabilities.svg', 'title' => __( 'Additional capabilities you get', 'cookie-law-info' ), |
| 30 | 'desc' => __( 'Advanced compliance, cookie blocking, and geo-targeting features', 'cookie-law-info' ), |
| 31 | 'item_class' => 'wt-cli-accordion-item--capabilities', 'list_class' => 'wt-cli-bullet-list-blue', 'note' => '', |
| 32 | 'items' => array( __( 'Premium layouts and combined GDPR + US consent templates with geo-targeting', 'cookie-law-info' ), __( 'Manual cookie blocking via script URL patterns (Cookie manager → Add cookie → Advanced settings)', 'cookie-law-info' ), __( 'Optional connection to CookieYes web app for automated cookie discovery and blocking', 'cookie-law-info' ) ), |
| 33 | ), |
| 34 | ); |
| 35 | $cli_modal_close_btn = '<button type="button" class="wt-cli-modal-close-btn" aria-label="' |
| 36 | . esc_attr__( 'Close', 'cookie-law-info' ) |
| 37 | . '"><img src="' . esc_url( $cli_uf_img . 'close.svg' ) . '" width="20" height="20" alt=""></button>'; |
| 38 | $cli_get_help_link = '<a href="https://www.cookieyes.com/support/" target="_blank" rel="noopener noreferrer" class="wt-cli-btn-outline">' |
| 39 | . esc_html__( 'Get help', 'cookie-law-info' ) |
| 40 | . '<img src="' . esc_url( $cli_uf_img . 'icon-external-link.svg' ) . '" width="16" height="16" alt=""></a>'; |
| 41 | ?> |
| 42 | |
| 43 | <!-- Overlay --> |
| 44 | <div id="cli-modal-overlay" class="wt-cli-modal-overlay" aria-hidden="true"></div> |
| 45 | |
| 46 | <!-- Modal 1: Features overview --> |
| 47 | <div id="cli-modal-1" class="wt-cli-upgrade-modal" role="dialog" aria-modal="true" aria-labelledby="cli-modal-1-title"> |
| 48 | <div class="wt-cli-upgrade-modal-inner"> |
| 49 | <div class="wt-cli-modal-header"> |
| 50 | <div class="wt-cli-modal-header-text"> |
| 51 | <h2 id="cli-modal-1-title" class="wt-cli-modal-title"><?php echo esc_html__( 'Update to a faster, more flexible cookie banner', 'cookie-law-info' ); ?></h2> |
| 52 | <p class="wt-cli-modal-subtitle"><?php echo esc_html__( 'Get the latest improvements with a faster, more flexible cookie banner.', 'cookie-law-info' ); ?></p> |
| 53 | </div> |
| 54 | <?php echo $cli_modal_close_btn; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 55 | </div> |
| 56 | <div class="wt-cli-modal-body wt-cli-modal-1-body"> |
| 57 | <div class="wt-cli-modal-1-left"> |
| 58 | <div class="wt-cli-modal-1-features-head"> |
| 59 | <h3 class="wt-cli-features-title"><?php echo esc_html__( 'What you get', 'cookie-law-info' ); ?></h3> |
| 60 | <p class="wt-cli-features-subtitle"><?php echo esc_html__( 'Powerful new features to enhance your compliance', 'cookie-law-info' ); ?></p> |
| 61 | </div> |
| 62 | <div class="wt-cli-feature-cards"> |
| 63 | <?php foreach ( $cli_feature_cards as $card ) : ?> |
| 64 | <div class="wt-cli-feature-card"> |
| 65 | <div class="wt-cli-feature-card-icon"> |
| 66 | <img src="<?php echo esc_url( $cli_uf_img . $card['icon'] ); ?>" width="20" height="20" alt=""> |
| 67 | </div> |
| 68 | <div class="wt-cli-feature-card-text"> |
| 69 | <p class="wt-cli-feature-card-title"><?php echo esc_html( $card['title'] ); ?></p> |
| 70 | <p class="wt-cli-feature-card-desc"><?php echo esc_html( $card['desc'] ); ?></p> |
| 71 | </div> |
| 72 | </div> |
| 73 | <?php endforeach; ?> |
| 74 | </div> |
| 75 | <div class="wt-cli-modal-note"> |
| 76 | <img src="<?php echo esc_url( $cli_uf_img . 'icon-note.svg' ); ?>" width="16" height="16" alt=""> |
| 77 | <p><strong><?php echo esc_html__( 'Note:', 'cookie-law-info' ); ?></strong> <?php echo esc_html__( "Older banner versions won't receive new features or compliance updates.", 'cookie-law-info' ); ?></p> |
| 78 | </div> |
| 79 | </div> |
| 80 | <div class="wt-cli-modal-1-right"> |
| 81 | <h3 class="wt-cli-video-heading"><?php echo esc_html__( "See what's new", 'cookie-law-info' ); ?></h3> |
| 82 | <div class="wt-cli-video-preview"> |
| 83 | <video |
| 84 | class="wt-cli-video-player" |
| 85 | src="<?php echo esc_url( CLI_PLUGIN_URL . 'admin/videos/banner-update-overview.webm' ); ?>" |
| 86 | controls |
| 87 | preload="metadata" |
| 88 | ></video> |
| 89 | </div> |
| 90 | <p class="wt-cli-video-caption"><?php echo esc_html__( 'Watch a quick overview of the new features and improvements in the latest banner version.', 'cookie-law-info' ); ?></p> |
| 91 | </div> |
| 92 | </div> |
| 93 | <div class="wt-cli-modal-footer"> |
| 94 | <p class="wt-cli-modal-meta"><?php echo esc_html__( 'Quick update • No pricing impact • Safe rollback within 14 days', 'cookie-law-info' ); ?></p> |
| 95 | <div class="wt-cli-modal-footer-actions"> |
| 96 | <?php echo $cli_get_help_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 97 | <button type="button" id="cli-btn-review-changes" class="wt-cli-btn-primary"> |
| 98 | <?php echo esc_html__( 'Review changes', 'cookie-law-info' ); ?> |
| 99 | </button> |
| 100 | </div> |
| 101 | </div> |
| 102 | </div> |
| 103 | </div> |
| 104 | |
| 105 | <!-- Modal 2: What changes accordion --> |
| 106 | <div id="cli-modal-2" class="wt-cli-upgrade-modal" role="dialog" aria-modal="true" aria-labelledby="cli-modal-2-title"> |
| 107 | <div class="wt-cli-upgrade-modal-inner"> |
| 108 | <div class="wt-cli-modal-header"> |
| 109 | <div class="wt-cli-modal-header-text"> |
| 110 | <h2 id="cli-modal-2-title" class="wt-cli-modal-title"><?php echo esc_html__( 'What changes with the new banner', 'cookie-law-info' ); ?></h2> |
| 111 | <p class="wt-cli-modal-subtitle"><?php echo esc_html__( 'Some legacy customisation options will be replaced with updated, more compliant approaches.', 'cookie-law-info' ); ?></p> |
| 112 | </div> |
| 113 | <?php echo $cli_modal_close_btn; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 114 | </div> |
| 115 | <div class="wt-cli-modal-body wt-cli-modal-2-body"> |
| 116 | <div class="wt-cli-accordion-list"> |
| 117 | |
| 118 | <?php foreach ( $cli_accordion_items as $accordion ) : ?> |
| 119 | <div class="wt-cli-accordion-item <?php echo esc_attr( $accordion['item_class'] ); ?>"> |
| 120 | <button type="button" class="wt-cli-accordion-header" aria-expanded="false"> |
| 121 | <div class="wt-cli-accordion-header-left"> |
| 122 | <span class="wt-cli-accordion-icon"> |
| 123 | <img src="<?php echo esc_url( $cli_uf_img . $accordion['icon'] ); ?>" width="20" height="20" alt=""> |
| 124 | </span> |
| 125 | <div class="wt-cli-accordion-header-text"> |
| 126 | <span class="wt-cli-accordion-title"><?php echo esc_html( $accordion['title'] ); ?></span> |
| 127 | <span class="wt-cli-accordion-desc"><?php echo esc_html( $accordion['desc'] ); ?></span> |
| 128 | </div> |
| 129 | </div> |
| 130 | <img class="wt-cli-accordion-chevron" src="<?php echo esc_url( $cli_uf_img . 'chevron-down.svg' ); ?>" width="20" height="20" alt=""> |
| 131 | </button> |
| 132 | <div class="wt-cli-accordion-body"> |
| 133 | <ul class="wt-cli-bullet-list <?php echo esc_attr( $accordion['list_class'] ); ?>"> |
| 134 | <?php foreach ( $accordion['items'] as $item ) : ?> |
| 135 | <li><?php echo esc_html( $item ); ?></li> |
| 136 | <?php endforeach; ?> |
| 137 | </ul> |
| 138 | <?php if ( ! empty( $accordion['note'] ) ) : ?> |
| 139 | <div class="wt-cli-modal-note wt-cli-modal-note-sm"> |
| 140 | <img src="<?php echo esc_url( $cli_uf_img . 'icon-note.svg' ); ?>" width="16" height="16" alt=""> |
| 141 | <p><?php echo esc_html( $accordion['note'] ); ?></p> |
| 142 | </div> |
| 143 | <?php endif; ?> |
| 144 | </div> |
| 145 | </div> |
| 146 | <?php endforeach; ?> |
| 147 | |
| 148 | </div> |
| 149 | </div> |
| 150 | <div class="wt-cli-modal-footer"> |
| 151 | <button type="button" id="cli-btn-view-features" class="wt-cli-btn-back"> |
| 152 | <img src="<?php echo esc_url( $cli_uf_img . 'arrow-left.svg' ); ?>" width="16" height="16" alt=""> |
| 153 | <?php echo esc_html__( 'View new features', 'cookie-law-info' ); ?> |
| 154 | </button> |
| 155 | <div class="wt-cli-modal-footer-actions"> |
| 156 | <?php echo $cli_get_help_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 157 | <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'migrate', 'start', admin_url( 'edit.php?post_type=cookielawinfo&page=cookie-law-info' ) ), 'migrate', '_wpnonce' ) ); ?>" class="wt-cli-btn-primary"> |
| 158 | <?php echo esc_html__( 'Update to new version', 'cookie-law-info' ); ?> |
| 159 | </a> |
| 160 | </div> |
| 161 | </div> |
| 162 | </div> |
| 163 | </div> |
| 164 |