Header.php
36 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 | |
| 10 | class Header |
| 11 | { |
| 12 | /** |
| 13 | * @throws InvalidArgumentException |
| 14 | */ |
| 15 | public function display() |
| 16 | { |
| 17 | $args = [ |
| 18 | 'cookiebot_logo' => CYBOT_COOKIEBOT_PLUGIN_URL . 'logo.svg', |
| 19 | ]; |
| 20 | |
| 21 | $style_sheets = [ |
| 22 | [ 'cookiebot-main-css' , 'css/backend/cookiebot_admin_main.css' ] |
| 23 | ]; |
| 24 | |
| 25 | foreach ($style_sheets as $style ){ |
| 26 | wp_enqueue_style( |
| 27 | $style[0], |
| 28 | asset_url($style[1]), |
| 29 | null, |
| 30 | Cookiebot_WP::COOKIEBOT_PLUGIN_VERSION |
| 31 | ); |
| 32 | } |
| 33 | |
| 34 | include_view('admin/templates/header.php', $args); |
| 35 | } |
| 36 | } |