PluginProbe
Lasso Lite – Affiliate Link Manager & Product Displays / 111
Lasso Lite – Affiliate Link Manager & Product Displays v111
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 +9 -54 157111 View file →
@@ -4,27 +4,16 @@
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;
12 +use LassoLite\Classes\Lasso_DB;
14 13
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 );
14 +$available_pages = Helper::available_pages();
15 +$header_menu = array( Enum::PAGE_DASHBOARD );
27 16 $should_show_import_step = Helper::should_show_import_page();
28 17 if ( $should_show_import_step ) {
29 18 $header_menu[] = Enum::PAGE_IMPORT;
30 19 }
@@ -29,9 +18,9 @@
29 18 $header_menu[] = Enum::PAGE_IMPORT;
30 19 }
31 20 $header_menu = array_merge( $header_menu, array( Enum::PAGE_OPPORTUNITIES, Enum::PAGE_GROUPS, Enum::PAGE_TABLES ) );
32 21
33 -if ( Setting::get_setting( 'general_disable_tooltip' ) ) {
22 +if ( Setting::get_setting( 'general_disable_tooltip' ) ) {
34 23 echo '
35 24 <style>
36 25 [data-tooltip]:hover:before, [data-tooltip]:hover:after {visibility: hidden;}
37 26 i.far.fa-info-circle {display: none;}
@@ -40,17 +29,9 @@
40 29 }
41 30
42 31 ?>
43 32
44 -<script src="https://kit.fontawesome.com/21b80bd767.js" crossorigin="anonymous"></script>
45 33
46 -<!-- REQUEST REVIEW -->
47 -<?php
48 -if ( Helper::show_request_review() ) {
49 - echo Helper::include_with_variables( SIMPLE_URLS_DIR . '/admin/views/notifications/request-review.php' );
50 -}
51 -?>
52 -
53 34 <!-- HEADER -->
54 35 <div class="container-fluid">
55 36 <header class="row align-items-center purple-bg p-3 shadow">
56 37
@@ -55,9 +36,9 @@
55 36 <header class="row align-items-center purple-bg p-3 shadow">
56 37
57 38 <!-- LASSO LOGO -->
58 39 <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">
40 + <a href="<?php echo Page::get_page_url( $available_pages[Enum::PAGE_DASHBOARD]->slug ) ?>" class="logo mx-auto mx-lg-0">
60 41 <img src="<?php echo SIMPLE_URLS_URL; ?>/admin/assets/images/lasso-logo.svg">
61 42 </a>
62 43 </div>
63 44
@@ -63,10 +44,10 @@
63 44
64 45 <!-- NAVIGATION -->
65 46 <div class="col-lg py-lg-0 py-3 ml-5">
66 47 <ul class="nav justify-content-center font-weight-bold">
67 - <?php foreach ( $header_menu as $menu ) : ?>
68 - <?php $page = $available_pages[ $menu ]; ?>
48 + <?php foreach( $header_menu as $menu ): ?>
49 + <?php $page = $available_pages[$menu]; ?>
69 50 <li class="nav-item mx-3">
70 51 <a class="nav-link px-0 white <?php echo $page->active_class; ?>"
71 52 href="<?php echo Page::get_page_url( $page->slug ); ?>">
72 53 <?php echo $page->title; ?>
@@ -72,31 +53,15 @@
72 53 <?php echo $page->title; ?>
73 54 </a>
74 55 </li>
75 56 <?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 57 </ul>
87 58 </div>
88 59 <div class="col-lg-1 text-lg-right text-center pb-lg-0 pb-3 pl-1">
89 60 <div id="wrapper-circle"></div>
90 61 </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">
62 + <div class="col-lg-2 text-lg-right text-center pb-lg-0 pb-3 pl-1">
63 + <button class="btn" data-toggle="modal" data-target="#url-add">
99 64 <i class="far fa-plus-circle large-screen-only"></i> Add New Link
100 65 </button>
101 66 </div>
102 67
@@ -109,15 +74,5 @@
109 74 <!-- URL ADD MODAL -->
110 75 <?php require SIMPLE_URLS_DIR . '/admin/views/modals/url-add.php'; ?>
111 76 <!-- Enable support modal -->
112 77 <?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 78 </div>