PluginProbe
GutSlider – All in One Slider and Carousel Blocks for Gutenberg / 3.0.0
GutSlider – All in One Slider and Carousel Blocks for Gutenberg v3.0.0
3.1.0 3.0.0 2.13.2 2.13.1 2.13.0 trunk 1.0.0 2.1.0 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.1 2.5.3 2.5.4 2.5.5 2.6.1 All 56 releases
slider-blocks / admin / views / header.php

header.php in GutSlider – All in One Slider and Carousel Blocks for Gutenberg 3.0.0, at admin/views/header.php

105 lines 5.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Shared dashboard shell header.
4 *
5 * @package GutSliderBlocks
6 *
7 * @var string $current Current page slug.
8 * @var bool $has_pro Whether the Pro plugin is active.
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 $gs_current = isset( $current ) ? $current : '';
16 $gs_has_pro = isset( $has_pro ) ? (bool) $has_pro : defined( 'GUTSLIDER_PRO_VERSION' );
17
18 $gs_nav = array(
19 array(
20 'slug' => 'gutslider-blocks',
21 'label' => __( 'Dashboard', 'slider-blocks' ),
22 'url' => admin_url( 'admin.php?page=gutslider-blocks' ),
23 ),
24 array(
25 'slug' => 'gutslider-blocks-settings',
26 'label' => __( 'Blocks', 'slider-blocks' ),
27 'url' => admin_url( 'admin.php?page=gutslider-blocks-settings' ),
28 ),
29 array(
30 'slug' => 'gutslider-settings',
31 'label' => __( 'Settings', 'slider-blocks' ),
32 'url' => admin_url( 'admin.php?page=gutslider-settings' ),
33 ),
34 array(
35 'slug' => 'gutslider-license',
36 'label' => $gs_has_pro ? __( 'License', 'slider-blocks' ) : __( 'Pricing', 'slider-blocks' ),
37 'url' => $gs_has_pro ? admin_url( 'admin.php?page=gutslider-license' ) : 'https://gutslider.com/pricing',
38 'external' => ! $gs_has_pro,
39 ),
40 );
41 ?>
42 <div class="gs-app" data-gs-page="<?php echo esc_attr( $gs_current ); ?>">
43 <header class="gs-bar">
44 <div class="gs-bar__inner">
45 <a class="gs-brand" href="<?php echo esc_url( admin_url( 'admin.php?page=gutslider-blocks' ) ); ?>">
46 <span class="gs-brand__mark" aria-hidden="true">
47 <svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" focusable="false">
48 <path fill="currentColor" d="M5 45C3.625 45 2.44833 44.5108 1.47 43.5325C0.491667 42.5542 0.00166667 41.3767 0 40V5C0 3.625 0.49 2.44833 1.47 1.47C2.45 0.491667 3.62667 0.00166667 5 0H40C41.375 0 42.5525 0.49 43.5325 1.47C44.5125 2.45 45.0017 3.62667 45 5V40C45 41.375 44.5108 42.5525 43.5325 43.5325C42.5542 44.5125 41.3767 45.0017 40 45H5ZM17.5 35H27.5C28.875 35 30.0525 34.5108 31.0325 33.5325C32.0125 32.5542 32.5017 31.3767 32.5 30V20H22.5V25H27.5V30H17.5V15H32.5C32.5 13.625 32.0108 12.4483 31.0325 11.47C30.0542 10.4917 28.8767 10.0017 27.5 10H17.5C16.125 10 14.9483 10.49 13.97 11.47C12.9917 12.45 12.5017 13.6267 12.5 15V30C12.5 31.375 12.99 32.5525 13.97 33.5325C14.95 34.5125 16.1267 35.0017 17.5 35Z" />
49 </svg>
50 </span>
51 <span class="gs-brand__text">
52 <span class="gs-brand__name"><?php esc_html_e( 'GutSlider', 'slider-blocks' ); ?></span>
53 <span class="gs-chip gs-chip--version">
54 <?php echo esc_html( 'v' . GUTSLIDER_VERSION ); ?>
55 </span>
56 <?php if ( $gs_has_pro ) : ?>
57 <span class="gs-chip gs-chip--pro"><?php esc_html_e( 'PRO', 'slider-blocks' ); ?></span>
58 <?php endif; ?>
59 </span>
60 </a>
61
62 <nav class="gs-nav" aria-label="<?php esc_attr_e( 'GutSlider navigation', 'slider-blocks' ); ?>">
63 <?php foreach ( $gs_nav as $gs_item ) : ?>
64 <?php $gs_active = ( $gs_item['slug'] === $gs_current ); ?>
65 <a
66 class="gs-nav__link<?php echo $gs_active ? ' is-active' : ''; ?>"
67 href="<?php echo esc_url( $gs_item['url'] ); ?>"
68 <?php echo empty( $gs_item['external'] ) ? '' : 'target="_blank" rel="noopener noreferrer"'; ?>
69 <?php echo $gs_active ? 'aria-current="page"' : ''; ?>
70 >
71 <?php echo esc_html( $gs_item['label'] ); ?>
72 </a>
73 <?php endforeach; ?>
74 </nav>
75
76 <div class="gs-bar__actions">
77 <button type="button" class="gs-icon-btn" data-gs-theme-toggle aria-label="<?php esc_attr_e( 'Toggle colour scheme', 'slider-blocks' ); ?>">
78 <svg class="gs-icon gs-icon--sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" aria-hidden="true" focusable="false">
79 <circle cx="12" cy="12" r="4" /><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" />
80 </svg>
81 <svg class="gs-icon gs-icon--moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
82 <path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z" />
83 </svg>
84 </button>
85
86 <a class="gs-icon-btn" href="https://gutslider.com/docs" target="_blank" rel="noopener noreferrer" aria-label="<?php esc_attr_e( 'Documentation', 'slider-blocks' ); ?>">
87 <svg class="gs-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
88 <path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20" /><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" />
89 </svg>
90 </a>
91
92 <?php if ( ! $gs_has_pro ) : ?>
93 <a class="gs-btn gs-btn--primary gs-btn--sm" href="https://gutslider.com/pricing" target="_blank" rel="noopener noreferrer">
94 <svg class="gs-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
95 <path d="m12 3 2.6 5.7 6.4.7-4.7 4.3 1.3 6.3L12 17l-5.6 3 1.3-6.3L3 9.4l6.4-.7z" />
96 </svg>
97 <?php esc_html_e( 'Get Pro', 'slider-blocks' ); ?>
98 </a>
99 <?php endif; ?>
100 </div>
101 </div>
102 </header>
103
104 <main class="gs-main">
105