Dashboard_Page.php
3 years ago
Debug_Page.php
2 years ago
Gcm_Page.php
3 years ago
Gtm_Page.php
3 years ago
Iab_Page.php
2 years ago
Legislations_Page.php
4 years ago
Multiple_Page.php
3 years ago
Settings_Page.php
3 years ago
Settings_Page_Interface.php
3 years ago
Support_Page.php
3 years ago
Gcm_Page.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | namespace cybot\cookiebot\settings\pages; |
| 4 | |
| 5 | use cybot\cookiebot\lib\Cookiebot_WP; |
| 6 | use InvalidArgumentException; |
| 7 | use function cybot\cookiebot\lib\include_view; |
| 8 | |
| 9 | class Gcm_Page implements Settings_Page_Interface { |
| 10 | const OPTION_NAME = 'cookiebot-gcm-cookies'; |
| 11 | |
| 12 | /** |
| 13 | * @throws InvalidArgumentException |
| 14 | */ |
| 15 | public function display() { |
| 16 | $args = array( |
| 17 | 'cookie_categories_disabled' => Cookiebot_WP::get_cookie_categories_status(), |
| 18 | 'gcm_enabled_option' => get_option( 'cookiebot-gcm' ), |
| 19 | 'gcm_url_passthrough_option' => get_option( 'cookiebot-gcm-url-passthrough', 1 ), |
| 20 | 'auto_disabled' => Cookiebot_WP::get_cookie_blocking_mode() === 'auto' ? ' disabled__item' : '', |
| 21 | 'is_preferences' => Cookiebot_WP::is_cookie_category_selected( self::OPTION_NAME, 'preferences' ), |
| 22 | 'is_statistics' => Cookiebot_WP::is_cookie_category_selected( self::OPTION_NAME, 'statistics' ), |
| 23 | 'is_marketing' => Cookiebot_WP::is_cookie_category_selected( self::OPTION_NAME, 'marketing' ), |
| 24 | ); |
| 25 | |
| 26 | include_view( 'admin/settings/gcm-page.php', $args ); |
| 27 | } |
| 28 | } |
| 29 |