PluginProbe
Lasso Lite – Affiliate Link Manager & Product Displays / 116
Lasso Lite – Affiliate Link Manager & Product Displays v116
158 157 155 156 154 153 152 151 150 149 148 trunk 0.9.9 104 105 106 107 108 109 110 111 112 113 114 115 All 57 releases
← All changes | admin/views/header.php +10 -50 158116 View file →
@@ -4,27 +4,15 @@
4 4 *
5 5 * @package Header
6 6 */
7 7
8 -use LassoLite\Admin\Constant;
9 -
10 8 use LassoLite\Classes\Enum;
11 9 use LassoLite\Classes\Helper;
12 10 use LassoLite\Classes\Page;
13 11 use LassoLite\Classes\Setting;
14 12
15 -$lasso_account_email = Helper::get_option( Constant::LASSO_ACCOUNT_EMAIL, '' );
16 -$lasso_account_user_id = intval( Helper::get_option( Constant::LASSO_ACCOUNT_USER_ID, 0 ) );
17 -// App account only (synced email/user from hub/signup). Excludes is_connected_aff from license API; that flag is not a Lasso app login.
18 -$is_lasso_app_account_connected = ! empty( $lasso_account_email ) || $lasso_account_user_id > 0;
19 -
20 -$lasso_options_prefill = Setting::get_settings();
21 -$email_support_prefill = $lasso_options_prefill[ Enum::EMAIL_SUPPORT ] ?? '';
22 -$admin_email_prefill = get_option( 'admin_email' );
23 -$prefill_email_header = ! empty( $email_support_prefill ) ? $email_support_prefill : $admin_email_prefill;
24 -
25 -$available_pages = Helper::available_pages();
26 -$header_menu = array( Enum::PAGE_DASHBOARD );
13 +$available_pages = Helper::available_pages();
14 +$header_menu = array( Enum::PAGE_DASHBOARD );
27 15 $should_show_import_step = Helper::should_show_import_page();
28 16 if ( $should_show_import_step ) {
29 17 $header_menu[] = Enum::PAGE_IMPORT;
30 18 }
@@ -29,9 +17,9 @@
29 17 $header_menu[] = Enum::PAGE_IMPORT;
30 18 }
31 19 $header_menu = array_merge( $header_menu, array( Enum::PAGE_OPPORTUNITIES, Enum::PAGE_GROUPS, Enum::PAGE_TABLES ) );
32 20
33 -if ( Setting::get_setting( 'general_disable_tooltip' ) ) {
21 +if ( Setting::get_setting( 'general_disable_tooltip' ) ) {
34 22 echo '
35 23 <style>
36 24 [data-tooltip]:hover:before, [data-tooltip]:hover:after {visibility: hidden;}
37 25 i.far.fa-info-circle {display: none;}
@@ -40,14 +28,12 @@
40 28 }
41 29
42 30 ?>
43 31
44 -<script src="https://kit.fontawesome.com/21b80bd767.js" crossorigin="anonymous"></script>
45 -
46 32 <!-- REQUEST REVIEW -->
47 -<?php
33 +<?php
48 34 if ( Helper::show_request_review() ) {
49 - echo Helper::include_with_variables( SIMPLE_URLS_DIR . '/admin/views/notifications/request-review.php' );
35 + echo Helper::include_with_variables( SIMPLE_URLS_DIR . '/admin/views/notifications/request-review.php' );
50 36 }
51 37 ?>
52 38
53 39 <!-- HEADER -->
@@ -55,9 +41,9 @@
55 41 <header class="row align-items-center purple-bg p-3 shadow">
56 42
57 43 <!-- LASSO LOGO -->
58 44 <div class="col-lg-2">
59 - <a href="<?php echo Page::get_page_url( $available_pages[ Enum::PAGE_DASHBOARD ]->slug ); ?>" class="logo mx-auto mx-lg-0">
45 + <a href="<?php echo Page::get_page_url( $available_pages[Enum::PAGE_DASHBOARD]->slug ) ?>" class="logo mx-auto mx-lg-0">
60 46 <img src="<?php echo SIMPLE_URLS_URL; ?>/admin/assets/images/lasso-logo.svg">
61 47 </a>
62 48 </div>
63 49
@@ -63,10 +49,10 @@
63 49
64 50 <!-- NAVIGATION -->
65 51 <div class="col-lg py-lg-0 py-3 ml-5">
66 52 <ul class="nav justify-content-center font-weight-bold">
67 - <?php foreach ( $header_menu as $menu ) : ?>
68 - <?php $page = $available_pages[ $menu ]; ?>
53 + <?php foreach( $header_menu as $menu ): ?>
54 + <?php $page = $available_pages[$menu]; ?>
69 55 <li class="nav-item mx-3">
70 56 <a class="nav-link px-0 white <?php echo $page->active_class; ?>"
71 57 href="<?php echo Page::get_page_url( $page->slug ); ?>">
72 58 <?php echo $page->title; ?>
@@ -72,31 +58,15 @@
72 58 <?php echo $page->title; ?>
73 59 </a>
74 60 </li>
75 61 <?php endforeach; ?>
76 - <li class="nav-item mx-3">
77 - <a class="nav-link px-0 white" href="<?php echo Constant::LASSO_ANALYTICS_URL; ?>" target="_blank">
78 - Analytics
79 - </a>
80 - </li>
81 - <li class="nav-item mx-3">
82 - <a class="nav-link px-0 white" href="<?php echo Constant::LASSO_AFFILIATE_PLUS_URL; ?>" target="_blank">
83 - Marketplace
84 - </a>
85 - </li>
86 62 </ul>
87 63 </div>
88 64 <div class="col-lg-1 text-lg-right text-center pb-lg-0 pb-3 pl-1">
89 65 <div id="wrapper-circle"></div>
90 66 </div>
91 - <div class="col-lg-3 d-flex flex-column flex-lg-row align-items-center justify-content-lg-end justify-content-center pb-lg-0 pb-3 pl-1 lasso-header-actions">
92 - <?php if ( ! $is_lasso_app_account_connected ) : ?>
93 - <button type="button" class="lasso-header-account-status lasso-header-account-status--inactive mb-2 mb-lg-0 mr-lg-3 order-lg-1 order-2" data-toggle="modal" data-target="#lasso-lite-analytics-modal" title="<?php echo esc_attr( __( 'Create your free Lasso account', 'simple-urls' ) ); ?>" aria-label="<?php echo esc_attr( __( 'Account status: inactive. Create your free Lasso account.', 'simple-urls' ) ); ?>">
94 - <span class="lasso-header-account-status__label"><?php echo esc_html( __( 'Account status', 'simple-urls' ) ); ?></span>
95 - <span class="lasso-header-account-status__badge"><?php echo esc_html( __( 'Inactive', 'simple-urls' ) ); ?></span>
96 - </button>
97 - <?php endif; ?>
98 - <button class="btn order-lg-2 order-1 mb-2 mb-lg-0" data-toggle="modal" data-target="#url-add">
67 + <div class="col-lg-2 text-lg-right text-center pb-lg-0 pb-3 pl-1">
68 + <button class="btn" data-toggle="modal" data-target="#url-add">
99 69 <i class="far fa-plus-circle large-screen-only"></i> Add New Link
100 70 </button>
101 71 </div>
102 72
@@ -109,15 +79,5 @@
109 79 <!-- URL ADD MODAL -->
110 80 <?php require SIMPLE_URLS_DIR . '/admin/views/modals/url-add.php'; ?>
111 81 <!-- Enable support modal -->
112 82 <?php require SIMPLE_URLS_DIR . '/admin/views/modals/enable-support.php'; ?>
113 - <?php
114 - if ( ! $is_lasso_app_account_connected ) {
115 - echo Helper::include_with_variables(
116 - SIMPLE_URLS_DIR . '/admin/views/modals/lasso-lite-analytics-modal.php',
117 - array(
118 - 'prefill_email_header' => $prefill_email_header,
119 - )
120 - );
121 - }
122 - ?>
123 83 </div>