| @@ -30,15 +30,26 @@ | ||
| 30 | 30 | 'slug' => 'gutslider-settings', |
| 31 | 31 | 'label' => __( 'Settings', 'slider-blocks' ), |
| 32 | 32 | 'url' => admin_url( 'admin.php?page=gutslider-settings' ), |
| 33 | 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 | 34 | ); |
| 35 | + | |
| 36 | +if ( $gs_has_pro ) { | |
| 37 | + $gs_nav[] = array( | |
| 38 | + 'slug' => 'gutslider-license', | |
| 39 | + 'label' => __( 'License', 'slider-blocks' ), | |
| 40 | + 'url' => admin_url( 'admin.php?page=gutslider-license' ), | |
| 41 | + ); | |
| 42 | +} | |
| 43 | + | |
| 44 | +if ( GutSlider_Admin::show_compare() ) { | |
| 45 | + $gs_nav[] = array( | |
| 46 | + 'slug' => GutSlider_Admin::COMPARE_SLUG, | |
| 47 | + 'label' => __( 'Free vs Pro', 'slider-blocks' ), | |
| 48 | + 'url' => admin_url( 'admin.php?page=' . GutSlider_Admin::COMPARE_SLUG ), | |
| 49 | + 'upgrade' => true, | |
| 50 | + ); | |
| 51 | +} | |
| 41 | 52 | ?> |
| 42 | 53 | <div class="gs-app" data-gs-page="<?php echo esc_attr( $gs_current ); ?>"> |
| 43 | 54 | <header class="gs-bar"> |
| 44 | 55 | <div class="gs-bar__inner"> |
| @@ -47,17 +58,13 @@ | ||
| 47 | 58 | <svg viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" focusable="false"> |
| 48 | 59 | <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 | 60 | </svg> |
| 50 | 61 | </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> | |
| 62 | + <span class="gs-brand__name"><?php esc_html_e( 'GutSlider', 'slider-blocks' ); ?></span> | |
| 63 | + <span class="gs-chip gs-chip--version"><?php echo esc_html( GUTSLIDER_VERSION ); ?></span> | |
| 64 | + <?php if ( $gs_has_pro ) : ?> | |
| 65 | + <span class="gs-chip gs-chip--pro"><?php esc_html_e( 'PRO', 'slider-blocks' ); ?></span> | |
| 66 | + <?php endif; ?> | |
| 60 | 67 | </a> |
| 61 | 68 | |
| 62 | 69 | <nav class="gs-nav" aria-label="<?php esc_attr_e( 'GutSlider navigation', 'slider-blocks' ); ?>"> |
| 63 | 70 | <?php foreach ( $gs_nav as $gs_item ) : ?> |
| @@ -62,13 +69,16 @@ | ||
| 62 | 69 | <nav class="gs-nav" aria-label="<?php esc_attr_e( 'GutSlider navigation', 'slider-blocks' ); ?>"> |
| 63 | 70 | <?php foreach ( $gs_nav as $gs_item ) : ?> |
| 64 | 71 | <?php $gs_active = ( $gs_item['slug'] === $gs_current ); ?> |
| 65 | 72 | <a |
| 66 | - class="gs-nav__link<?php echo $gs_active ? ' is-active' : ''; ?>" | |
| 73 | + class="gs-nav__link<?php echo $gs_active ? ' is-active' : ''; ?><?php echo empty( $gs_item['upgrade'] ) ? '' : ' gs-nav__link--upgrade'; ?>" | |
| 67 | 74 | href="<?php echo esc_url( $gs_item['url'] ); ?>" |
| 68 | 75 | <?php echo empty( $gs_item['external'] ) ? '' : 'target="_blank" rel="noopener noreferrer"'; ?> |
| 69 | 76 | <?php echo $gs_active ? 'aria-current="page"' : ''; ?> |
| 70 | 77 | > |
| 78 | + <?php if ( ! empty( $gs_item['upgrade'] ) ) : ?> | |
| 79 | + <?php GutSlider_Admin::icon( 'sparkles' ); ?> | |
| 80 | + <?php endif; ?> | |
| 71 | 81 | <?php echo esc_html( $gs_item['label'] ); ?> |
| 72 | 82 | </a> |
| 73 | 83 | <?php endforeach; ?> |
| 74 | 84 | </nav> |
| @@ -74,30 +84,26 @@ | ||
| 74 | 84 | </nav> |
| 75 | 85 | |
| 76 | 86 | <div class="gs-bar__actions"> |
| 77 | 87 | <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> | |
| 88 | + <?php GutSlider_Admin::icon( 'sun', 'gs-icon--sun' ); ?> | |
| 89 | + <?php GutSlider_Admin::icon( 'moon', 'gs-icon--moon' ); ?> | |
| 84 | 90 | </button> |
| 85 | 91 | |
| 86 | 92 | <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> | |
| 93 | + <?php GutSlider_Admin::icon( 'book-open' ); ?> | |
| 90 | 94 | </a> |
| 91 | 95 | |
| 92 | 96 | <?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 | + <a class="gs-btn gs-btn--quiet gs-btn--sm" href="https://gutslider.com/pricing" target="_blank" rel="noopener noreferrer"> | |
| 97 | 98 | <?php esc_html_e( 'Get Pro', 'slider-blocks' ); ?> |
| 98 | 99 | </a> |
| 99 | 100 | <?php endif; ?> |
| 101 | + | |
| 102 | + <a class="gs-btn gs-btn--primary gs-btn--sm" href="<?php echo esc_url( admin_url( 'post-new.php?post_type=page' ) ); ?>"> | |
| 103 | + <?php GutSlider_Admin::icon( 'plus' ); ?> | |
| 104 | + <?php esc_html_e( 'New slider', 'slider-blocks' ); ?> | |
| 105 | + </a> | |
| 100 | 106 | </div> |
| 101 | 107 | </div> |
| 102 | 108 | </header> |
| 103 | 109 | |