Header.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | namespace cybot\cookiebot\settings\templates; |
| 4 | |
| 5 | use cybot\cookiebot\lib\Cookiebot_WP; |
| 6 | use InvalidArgumentException; |
| 7 | use function cybot\cookiebot\lib\asset_url; |
| 8 | use function cybot\cookiebot\lib\include_view; |
| 9 | use function cybot\cookiebot\lib\logo_url; |
| 10 | |
| 11 | class Header { |
| 12 | |
| 13 | |
| 14 | /** |
| 15 | * @throws InvalidArgumentException |
| 16 | */ |
| 17 | public function display() { |
| 18 | $args = array( |
| 19 | 'cookiebot_logo' => logo_url(), |
| 20 | ); |
| 21 | |
| 22 | $style_sheets = array( |
| 23 | array( 'cookiebot-main-css', 'css/backend/cookiebot_admin_main.css' ), |
| 24 | ); |
| 25 | |
| 26 | foreach ( $style_sheets as $style ) { |
| 27 | wp_enqueue_style( |
| 28 | $style[0], |
| 29 | asset_url( $style[1] ), |
| 30 | null, |
| 31 | Cookiebot_WP::COOKIEBOT_PLUGIN_VERSION |
| 32 | ); |
| 33 | } |
| 34 | |
| 35 | $args['days_left'] = Cookiebot_WP::get_trial_days_left(); |
| 36 | |
| 37 | include_view( 'admin/common/templates/header.php', $args ); |
| 38 | } |
| 39 | } |
| 40 |