available-addon-callback.php
4 years ago
jetpack-addon-callback.php
4 years ago
setting-page.php
4 years ago
setting-page.php
83 lines
| 1 | <!-- Create a header in the default WordPress 'wrap' container --> |
| 2 | <div class="wrap"> |
| 3 | |
| 4 | <div id="icon-themes" class="icon32"></div> |
| 5 | <h2><?php esc_html_e( 'Prior consent', 'cookiebot' ); ?></h2> |
| 6 | <div class="notice inline notice-warning notice-alt cookiebot-notice"> |
| 7 | <p> |
| 8 | <?php esc_html_e( 'These add-ons are produced by an open-source community of developers. This is done to help make it easier for Wordpress users to implement ‘prior consent’ for cookies and trackers set by plugins that do not offer this as a built-in functionality.' ); ?> |
| 9 | </p> |
| 10 | <p> |
| 11 | <?php esc_html_e( 'The add-ons are currently the best alternative to a Wordpress Core framework that can signal the user’s consent state to other plugins (if and when this will be implemented is unknown) and to those plugins who do not yet offer native support for Cookiebot built into the plugin itself.' ); ?> |
| 12 | </p> |
| 13 | <p> |
| 14 | <?php esc_html_e( 'We do not assume any responsibility for the use of these add-ons. If one of the plugins that the add-ons hook into makes a ‘breaking change’, there may be a period of time where the add-on will not work properly until it has been updated to accommodate the changes in the plugin.' ); ?> |
| 15 | </p> |
| 16 | <p> |
| 17 | <strong> |
| 18 | <?php echo sprintf( esc_html__( 'If your favourite plugin isn\'t supported you\'re welcome to contribute or request on our <a href="%s" target="_blank">Github development page.</a>' ), 'https://github.com/CybotAS/CookiebotAddons' ); ?> |
| 19 | </strong> |
| 20 | </p> |
| 21 | |
| 22 | </div> |
| 23 | <?php |
| 24 | if ( defined( 'COOKIEBOT_ADDONS_UNSUPPORTED_PHPVERSION' ) ) { |
| 25 | ?> |
| 26 | <p><strong> |
| 27 | <?php |
| 28 | esc_html_e('This feature is only available in PHP 5.4 and above.'); |
| 29 | ?> |
| 30 | </strong></p> |
| 31 | <?php |
| 32 | } |
| 33 | else { |
| 34 | ?> |
| 35 | <?php if ( isset( $_GET['tab'] ) ) { |
| 36 | $active_tab = esc_attr( $_GET['tab'] ); |
| 37 | } else if ( $active_tab == 'unavailable_addons' ) { |
| 38 | $active_tab = 'unavailable_addons'; |
| 39 | } else { |
| 40 | $active_tab = 'available_addons'; |
| 41 | } ?> |
| 42 | |
| 43 | <h2 class="nav-tab-wrapper"> |
| 44 | <a href="?page=cookiebot-addons&tab=available_addons" |
| 45 | class="nav-tab <?php echo $active_tab == 'available_addons' ? 'nav-tab-active' : ''; ?>">Available |
| 46 | Plugins</a> |
| 47 | <a href="?page=cookiebot-addons&tab=unavailable_addons" |
| 48 | class="nav-tab <?php echo $active_tab == 'unavailable_addons' ? 'nav-tab-active' : ''; ?>">Unavailable |
| 49 | Plugins</a> |
| 50 | <?php |
| 51 | if ( is_plugin_active( 'jetpack/jetpack.php' ) ) { |
| 52 | ?> |
| 53 | <a href="?page=cookiebot-addons&tab=jetpack" |
| 54 | class="nav-tab <?php echo $active_tab == 'jetpack' ? 'nav-tab-active' : ''; ?>">Jetpack</a> |
| 55 | <?php |
| 56 | } |
| 57 | ?> |
| 58 | |
| 59 | </h2> |
| 60 | |
| 61 | <form method="post" action="options.php" class="<?php echo esc_attr( $active_tab ); ?>"> |
| 62 | <?php |
| 63 | |
| 64 | if ( $active_tab == 'available_addons' ) { |
| 65 | settings_fields( 'cookiebot_available_addons' ); |
| 66 | do_settings_sections( 'cookiebot-addons' ); |
| 67 | } elseif ( $active_tab == 'jetpack' ) { |
| 68 | settings_fields( 'cookiebot_jetpack_addon' ); |
| 69 | do_settings_sections( 'cookiebot-addons' ); |
| 70 | } else { |
| 71 | settings_fields( 'cookiebot_not_installed_options' ); |
| 72 | do_settings_sections( 'cookiebot-addons' ); |
| 73 | } // end if/else |
| 74 | |
| 75 | submit_button(); |
| 76 | |
| 77 | ?> |
| 78 | </form> |
| 79 | <?php |
| 80 | } |
| 81 | ?> |
| 82 | </div><!-- /.wrap --> |
| 83 |