| 1 |
<?php |
| 2 |
/** |
| 3 |
* URL links |
| 4 |
* |
| 5 |
* @package Lasso URL links |
| 6 |
*/ |
| 7 |
|
| 8 |
use LassoLite\Classes\Config; |
| 9 |
use LassoLite\Classes\Helper; |
| 10 |
use LassoLite\Classes\License; |
| 11 |
use LassoLite\Classes\Setting; |
| 12 |
|
| 13 |
$lasso_options = Setting::get_settings(); |
| 14 |
|
| 15 |
$enable_support = Setting::get_setting('support_enabled'); |
| 16 |
$enable_support_checked = $enable_support ? 'checked' : ''; |
| 17 |
$general_disable_amazon_notifications = $lasso_options['general_disable_amazon_notifications'] ? 'checked' : ''; |
| 18 |
$general_disable_tooltip_checked = $lasso_options['general_disable_tooltip'] ? 'checked' : ''; |
| 19 |
$general_disable_notification = $lasso_options['general_disable_notification'] ? 'checked' : ''; |
| 20 |
$general_enable_new_ui = Helper::is_lite_using_new_ui() ? 'checked' : ''; |
| 21 |
$performance_event_tracking = $lasso_options['performance_event_tracking'] ? 'checked="true"' : ''; |
| 22 |
|
| 23 |
$license_active = License::get_license_status(); |
| 24 |
$license_status = $license_active |
| 25 |
? '<strong id="is_license_active" class="green">active</strong>' |
| 26 |
: '<strong id="is_license_active" class="red">not active</strong>'; |
| 27 |
|
| 28 |
$license_msg = $lasso_options['license_serial'] === '' |
| 29 |
? 'Access or create your <a class="purple underline" |
| 30 |
href="https://app.getlasso.co/account" target="_blank">Lasso account</a> to get your license key.' |
| 31 |
: 'Your license key is ' . $license_status . '. Access your <a class="purple underline" |
| 32 |
href="https://app.getlasso.co/account" target="_blank">Lasso account</a> to manage installs.'; |
| 33 |
|
| 34 |
?> |
| 35 |
<?php Config::get_header(); ?> |
| 36 |
|
| 37 |
<!-- GENERAL SETTINGS --> |
| 38 |
<section class="px-3 py-5"> |
| 39 |
<div class="container lite-container"> |
| 40 |
<!-- HEADER --> |
| 41 |
<?php require_once 'header.php'; ?> |
| 42 |
<form class="lasso-admin-settings-form" autocomplete="off" onsubmit="event.preventDefault();"> |
| 43 |
<!-- SETTINGS --> |
| 44 |
<div class="row mb-5"> |
| 45 |
<div class="col-lg"> |
| 46 |
<div class="white-bg rounded shadow p-4 mb-lg-0 mb-5"> |
| 47 |
<input type="hidden" name="count_all_pages_posts" value="" /> |
| 48 |
|
| 49 |
<?php if ( isset( $_GET['support'] ) && $_GET['support'] === 'true' ): ?> |
| 50 |
<!-- LICENSE KEY --> |
| 51 |
<section class="mb-5"> |
| 52 |
<h3>License Key</h3> |
| 53 |
<p class="license-status-message"><?php echo $license_msg ?></p> |
| 54 |
<div class="form-group form-row"> |
| 55 |
<div class="col-md pr-0"> |
| 56 |
<input name="license_serial" class="form-control form-control-append mb-lg-0 mb-3 lasso-admin-input" |
| 57 |
type="text" value="<?php echo esc_html( $lasso_options['license_serial'] ); ?>" /> |
| 58 |
</div> |
| 59 |
<div class="col-md-3 p-0 mr-1"> |
| 60 |
<button id="reactivate-lite" class="btn btn-append w-100">Activate</button> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
</section> |
| 64 |
<?php endif; ?> |
| 65 |
|
| 66 |
<!-- GOOGLE ANALYTICS --> |
| 67 |
<section class="mb-5"> |
| 68 |
<h3 class="lasso-lite-disabled no-hint">Google Analytics</h3> |
| 69 |
<p><span class="lasso-lite-disabled no-hint">Send click tracking data to Google Analytics.</span> <a data-tooltip="We support a Tracking ID or Product ID (Google Analytics v4). You can find them in Google Analytics > Admin > Property Settings."><i class="far fa-info-circle light-purple"></i></a></p> |
| 70 |
<div class="form-group lasso-lite-disabled"> |
| 71 |
<div class="form-row align-items-center mb-3"> |
| 72 |
<div class="col mb-lg-0 mb-3"> |
| 73 |
<input disabled type="text" class="form-control" placeholder="Tracking ID or Property ID" value=""> |
| 74 |
</div> |
| 75 |
</div> |
| 76 |
<div class="form-group align-items-center"> |
| 77 |
<div class="" id="ga-tracking-toggle"> |
| 78 |
<label class="toggle m-0 mb-3 mr-1"> |
| 79 |
<input type="checkbox" disabled> |
| 80 |
<span class="slider"></span> |
| 81 |
</label> |
| 82 |
<label class="m-0" data-tooltip="Enable to begin tracking Lasso Link clicks in Google Analytics."> |
| 83 |
<span>Click Tracking</span> <i class="far fa-info-circle light-purple"></i></label> |
| 84 |
</div> |
| 85 |
<div class="" id="ga-tracking-toggle"> |
| 86 |
<label class="toggle m-0 mb-3 mr-1"> |
| 87 |
<input type="checkbox" disabled> |
| 88 |
<span class="slider"></span> |
| 89 |
</label> |
| 90 |
<label class="m-0" data-tooltip="If you have Google Analytics installed outside of Lasso, keep this disabled."> |
| 91 |
<span>Pageview</span> <i class="far fa-info-circle light-purple"></i></label> |
| 92 |
</div> |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
</section> |
| 96 |
|
| 97 |
<!-- LASSO URL: REWRITE SLUG --> |
| 98 |
<section class="mb-5"> |
| 99 |
<h3 class="lasso-lite-disabled no-hint">Cloaked Link Prefix</h3> |
| 100 |
<p ><span class="lasso-lite-disabled no-hint">Add subdirectory to cloaked links. Most leave this empty.</span> <a data-tooltip="For no prefix leave this field empty."><i class="far fa-info-circle light-purple"></i></a> |
| 101 |
<br/><i class="lasso-lite-disabled no-hint">Example: https://domain.com/<strong>recommends</strong>/link-name/</i></p> |
| 102 |
<div class="form-group lasso-lite-disabled"> |
| 103 |
<div class="input-group"> |
| 104 |
<input class="form-control form-control" type="text" value="" aria-label="" disabled> |
| 105 |
</div> |
| 106 |
</div> |
| 107 |
</section> |
| 108 |
|
| 109 |
<!-- PERMISSIONS --> |
| 110 |
<section class="mb-5 lasso-lite-disabled no-hint"> |
| 111 |
<h3>Permissions</h3> |
| 112 |
<p>Select the minimum user role that can access Lasso.</p> |
| 113 |
<select disabled class="form-control"> |
| 114 |
<option value="Administrator" disabled selected>Administrator</option> |
| 115 |
</select> |
| 116 |
</section> |
| 117 |
|
| 118 |
|
| 119 |
<!-- Force Performance JS always turn on client by default --> |
| 120 |
<!-- PERFORMANCE --> |
| 121 |
<section class="mb-5"> |
| 122 |
<h3>Advanced Click Tracking</h3> |
| 123 |
<p>Send click tracking data to <a href="https://app.getlasso.co/performance/" target="_blank">Performance</a> for easy-to-understand analytics.</p> |
| 124 |
|
| 125 |
<div class="form-group"> |
| 126 |
<label class="toggle m-0 mb-3 mr-1"> |
| 127 |
<!-- click and page view tracking --> |
| 128 |
<input type="checkbox" id="performance_event_tracking" name="performance_event_tracking" <?php echo esc_html( $performance_event_tracking ); ?>> |
| 129 |
<span class="slider"></span> |
| 130 |
</label> |
| 131 |
<label class="m-0" data-tooltip="When enabled, Lasso can help you understand what pages and links drive conversions on your site.">Page and Link-Level Tracking <i class="far fa-info-circle light-purple"></i></label> |
| 132 |
</div> |
| 133 |
</section> |
| 134 |
|
| 135 |
|
| 136 |
<!-- User Interface --> |
| 137 |
<section class="mb-5"> |
| 138 |
<h3>User Interface</h3> |
| 139 |
<p>Toggle which UI you want enabled.</p> |
| 140 |
|
| 141 |
<div class="form-group"> |
| 142 |
<label class="toggle m-0 mr-1"> |
| 143 |
<input id="general_enable_new_ui" |
| 144 |
type="checkbox" |
| 145 |
name="general_enable_new_ui" |
| 146 |
<?php echo esc_html( $general_enable_new_ui ); ?> |
| 147 |
> |
| 148 |
<span class="slider"></span> |
| 149 |
</label> |
| 150 |
<label class="m-0" data-tooltip="Enable new UI for Lasso Lite link management and displays. Disable to revert to Simple URLs."> |
| 151 |
<span>Enable New UI</span> <i class="far fa-info-circle light-purple"></i> |
| 152 |
</label> |
| 153 |
</div> |
| 154 |
</section> |
| 155 |
|
| 156 |
<?php if ( isset( $_GET['support'] ) ): ?> |
| 157 |
<!-- SUPPORT --> |
| 158 |
<section class="mb-5"> |
| 159 |
<h3>Support</h3> |
| 160 |
<p>Select the minimum user role that can access Lasso.</p> |
| 161 |
<div class="form-group"> |
| 162 |
<label class="toggle m-0 mr-1"> |
| 163 |
<input type="checkbox" <?php echo $enable_support_checked ?> name="enable_support"> |
| 164 |
<span class="slider"></span> |
| 165 |
</label> |
| 166 |
<label class="m-0">Enable support</label> |
| 167 |
</div> |
| 168 |
</section> |
| 169 |
<?php endif; ?> |
| 170 |
</div> |
| 171 |
</div> |
| 172 |
|
| 173 |
<div class="col-lg"> |
| 174 |
<div class="white-bg rounded shadow p-4"> |
| 175 |
<!-- LINK DATABASE --> |
| 176 |
<section class="mb-4 lasso-lite-disabled no-hint"> |
| 177 |
<h3>Link Index</h3> |
| 178 |
<p>Lasso tracks every link on your site.</p> |
| 179 |
|
| 180 |
<div class="row lasso-stats"> |
| 181 |
<div class="col-lg mb-3"> |
| 182 |
<div class="border rounded p-3"> |
| 183 |
<h4 class="h6 purple font-weight-bold">Last Updated</h4> |
| 184 |
- |
| 185 |
</div> |
| 186 |
</div> |
| 187 |
<div class="col-lg mb-3"> |
| 188 |
<div class="border rounded p-3"> |
| 189 |
<h4 class="h6 purple font-weight-bold">Links Indexed</h4> |
| 190 |
- |
| 191 |
</div> |
| 192 |
</div> |
| 193 |
</div> |
| 194 |
</section> |
| 195 |
|
| 196 |
<!-- Custom post type support --> |
| 197 |
<section class="mb-5"> |
| 198 |
<h3 class="lasso-lite-disabled no-hint">Custom Link Detection</h3> |
| 199 |
<p><span class="lasso-lite-disabled no-hint">Scan for links and shortcodes in custom locations.</span> <a data-tooltip="Additional locations where Lasso will discovering links."><i class="far fa-info-circle light-purple"></i></a></p> |
| 200 |
<div class="form-group lasso-lite-disabled no-hint"> |
| 201 |
<label>Custom Post Types:</label> |
| 202 |
<select disabled class="form-control" data-placeholder="Select post types"> |
| 203 |
<option value="post" disabled selected>Post</option> |
| 204 |
</select> |
| 205 |
</div> |
| 206 |
</section> |
| 207 |
|
| 208 |
<!-- CPU THRESHOLD --> |
| 209 |
<section class="mb-5"> |
| 210 |
<h3 class="lasso-lite-disabled no-hint">Performance</h3> |
| 211 |
<p><span class="lasso-lite-disabled no-hint">Set the maximum CPU level that Lasso will run at.</span> <a data-tooltip="Lasso will wait until your CPU drops below this level to continue with its updates."><i class="far fa-info-circle light-purple"></i></a></p> |
| 212 |
<div class="form-group lasso-lite-disabled"> |
| 213 |
<div class="input-group"> |
| 214 |
<input disabled class="form-control form-control-append" type="text" value="80" aria-label=""> |
| 215 |
<div class="input-group-append lasso-lite-disabled no-hint"> |
| 216 |
<span class="input-group-text">%</span> |
| 217 |
</div> |
| 218 |
</div> |
| 219 |
</div> |
| 220 |
</section> |
| 221 |
|
| 222 |
<!-- NEW LINK DEFAULT OPTIONS --> |
| 223 |
<section class="mb-5"> |
| 224 |
<div class="lasso-lite-disabled no-hint"> |
| 225 |
<h3>Link Defaults</h3> |
| 226 |
<p>Set the default attributes for new links.</p> |
| 227 |
</div> |
| 228 |
<div class="form-group"> |
| 229 |
<label class="toggle m-0 mr-1 lasso-lite-disabled no-hint"> |
| 230 |
<input type="checkbox" checked disabled> |
| 231 |
<span class="slider"></span> |
| 232 |
</label> |
| 233 |
<label class="m-0" data-tooltip="When enabled, users who click this link will have it loaded in a new tab."> |
| 234 |
<span class="lasso-lite-disabled no-hint">New Window / Tab</span> <i class="far fa-info-circle light-purple"></i> |
| 235 |
</label> |
| 236 |
</div> |
| 237 |
|
| 238 |
<div class="form-group"> |
| 239 |
<label class="toggle m-0 mr-1 lasso-lite-disabled no-hint"> |
| 240 |
<input type="checkbox" checked disabled> |
| 241 |
<span class="slider"></span> |
| 242 |
</label> |
| 243 |
<label class="m-0" data-tooltip="When enabled, this link will be set to nofollow. This indicates to Google that it's an affiliate link."> |
| 244 |
<span class="lasso-lite-disabled no-hint">NoFollow / NoIndex</span> <i class="far fa-info-circle light-purple"></i></label> |
| 245 |
</div> |
| 246 |
|
| 247 |
<div class="form-group"> |
| 248 |
<label class="toggle m-0 mr-1 lasso-lite-disabled no-hint"> |
| 249 |
<input type="checkbox" checked disabled> |
| 250 |
<span class="slider"></span> |
| 251 |
</label> |
| 252 |
<label class="m-0" data-tooltip="When enabled, this link will be set to sponsored."> |
| 253 |
<span class="lasso-lite-disabled no-hint">Sponsored</span> <i class="far fa-info-circle light-purple"></i></label> |
| 254 |
</div> |
| 255 |
|
| 256 |
<div class="form-group"> |
| 257 |
<label class="toggle m-0 mr-1 lasso-lite-disabled no-hint"> |
| 258 |
<input type="checkbox" checked disabled> |
| 259 |
<span class="slider"></span> |
| 260 |
</label> |
| 261 |
<label class="m-0" data-tooltip="When enabled, this link will show the disclosure."> |
| 262 |
<span class="lasso-lite-disabled no-hint">Show Disclosure</span> <i class="far fa-info-circle light-purple"></i></label> |
| 263 |
</div> |
| 264 |
</section> |
| 265 |
|
| 266 |
<!-- NOTIFICATIONS --> |
| 267 |
<section class="mb-5"> |
| 268 |
<h3>Notifications</h3> |
| 269 |
<p>Toggle which notifications you want enabled.</p> |
| 270 |
|
| 271 |
<div class="form-group"> |
| 272 |
<label class="toggle m-0 mr-1"> |
| 273 |
<input id="general_disable_amazon_notifications" |
| 274 |
type="checkbox" |
| 275 |
name="general_disable_amazon_notifications" <?php echo esc_html( $general_disable_amazon_notifications ); ?>> |
| 276 |
<span class="slider"></span> |
| 277 |
</label> |
| 278 |
<label class="m-0">Disable Configure Amazon Notification</label> |
| 279 |
</div> |
| 280 |
|
| 281 |
<div class="form-group"> |
| 282 |
<label class="toggle m-0 mr-1"> |
| 283 |
<input id="general_disable_tooltip" |
| 284 |
type="checkbox" |
| 285 |
name="general_disable_tooltip" <?php echo esc_html( $general_disable_tooltip_checked ); ?>> |
| 286 |
<span class="slider"></span> |
| 287 |
</label> |
| 288 |
<label class="m-0">Disable Help Tooltips</label> |
| 289 |
</div> |
| 290 |
|
| 291 |
<div class="form-group mb-1"> |
| 292 |
<label class="toggle m-0 mr-1"> |
| 293 |
<input id="general_disable_notification" |
| 294 |
type="checkbox" |
| 295 |
name="general_disable_notification" <?php echo esc_html( $general_disable_notification ); ?>> |
| 296 |
<span class="slider"></span> |
| 297 |
</label> |
| 298 |
<label class="m-0">Disable Import Notifications</label> |
| 299 |
</div> |
| 300 |
</section> |
| 301 |
</div> |
| 302 |
</div> |
| 303 |
|
| 304 |
</div> |
| 305 |
|
| 306 |
<!-- SAVE CHANGES --> |
| 307 |
<div class="row align-items-center"> |
| 308 |
<div class="col-lg text-lg-right text-center"> |
| 309 |
<button id="btn-save-settings-general" type="button" class="btn">Save Changes</button> |
| 310 |
</div> |
| 311 |
</div> |
| 312 |
</form> |
| 313 |
</div> |
| 314 |
</section> |
| 315 |
|
| 316 |
<?php require Helper::get_path_views_folder() . 'modals/activate-license-progress.php'; ?> |
| 317 |
|
| 318 |
<?php echo Helper::wrapper_js_render( 'default-template-notification', Helper::get_path_views_folder() . '/notifications/default-template-jsrender.html' )?> |
| 319 |
<?php Config::get_footer(); ?> |
| 320 |
|