PluginProbe
Lasso Lite – Affiliate Link Manager & Product Displays / 157
Lasso Lite – Affiliate Link Manager & Product Displays v157
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 116 All 56 releases
simple-urls / plugin.php

plugin.php in Lasso Lite – Affiliate Link Manager & Product Displays 157, at plugin.php

56 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Lasso Lite
4 * Plugin URI: https://getlasso.co/?utm_source=lasso-lite&utm_medium=wp&utm_campaign=plugin-header
5 * Description: Stop pasting long affiliate URLs into every post. Cloak your links, add product displays, and track clicks in WordPress.
6 * Author: Lasso
7 * Author URI: https://getlasso.co/?utm_source=lasso-lite&utm_medium=wp&utm_campaign=plugin-header
8 * Version: 157
9
10 * Text Domain: simple-urls
11 * Domain Path: /languages
12
13 * License: GNU General Public License v2.0 (or later)
14 * License URI: http://www.opensource.org/licenses/gpl-license.php
15 *
16 * @package simple-urls
17 */
18
19 use LassoLite\Admin\Constant;
20 use LassoLite\Classes\Enum;
21 use LassoLite\Classes\Helper;
22 use LassoLite\Classes\License;
23 use LassoLite\Pages\Hook;
24
25 // ? ==============================================================================================
26 // ? WE SHOULD UPDATE THE VERSION NUMBER HERE AS WELL WHEN RELEASING A NEW VERSION
27 define( 'LASSO_LITE_VERSION', '157' );
28 // ? ==============================================================================================
29
30 function activate_lasso_lite() {
31 update_option( Enum::LASSO_LITE_ACTIVE, 1 );
32 $license_active = License::get_license_status();
33 if ( $license_active === false ) {
34 // Fresh installs show the promo banner; preserve a prior permanent dismiss on re-activation.
35 if ( false === Helper::get_option( Constant::LASSO_OPTION_DISMISS_PROMOTIONS, false ) ) {
36 Helper::update_option( Constant::LASSO_OPTION_DISMISS_PROMOTIONS, '0' );
37 }
38 // Footer affiliate promo bar uses affiliate_promotions=1 (show); preserve user dismiss (=0).
39 if ( false === Helper::get_option( Constant::LASSO_OPTION_AFFILIATE_PROMOTIONS, false ) ) {
40 Helper::update_option( Constant::LASSO_OPTION_AFFILIATE_PROMOTIONS, '1' );
41 }
42 }
43 Hook::lasso_register_connect_snippet_rewrite();
44 flush_rewrite_rules();
45 }
46
47 function deactivate_lasso_lite() {
48 Helper::update_option( Enum::IS_PRE_POPULATED_AMAZON_API, 0 );
49 flush_rewrite_rules();
50 }
51
52 register_activation_hook( __FILE__, 'activate_lasso_lite' );
53 register_deactivation_hook( __FILE__, 'deactivate_lasso_lite' );
54
55 require_once plugin_dir_path( __FILE__ ) . '/simple-urls.php';
56