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
← All changes | plugin.php +38 -16 104157 View file →
@@ -1,12 +1,12 @@
1 1 <?php
2 2 /**
3 - * Plugin Name: Simple URLs
4 - * Plugin URI: https://getlasso.co/?utm_source=SimpleURLs&utm_campaign=WP
5 - * Description: Simple URLs is a complete URL management system that allows you create, manage, and track outbound links from your site by using custom post types and 301 redirects.
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 6 * Author: Lasso
7 - * Author URI: https://getlasso.co/?utm_source=SimpleURLs&utm_campaign=WP
8 - * Version: 104
7 + * Author URI: https://getlasso.co/?utm_source=lasso-lite&utm_medium=wp&utm_campaign=plugin-header
8 + * Version: 157
9 9
10 10 * Text Domain: simple-urls
11 11 * Domain Path: /languages
12 12
@@ -15,19 +15,41 @@
15 15 *
16 16 * @package simple-urls
17 17 */
18 18
19 -if ( ! defined( 'ABSPATH' ) ) {
20 - exit;
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();
21 45 }
22 46
23 -define( 'SIMPLE_URLS_DIR', plugin_dir_path( __FILE__ ) );
24 -define( 'SIMPLE_URLS_URL', plugins_url( '', __FILE__ ) );
47 +function deactivate_lasso_lite() {
48 + Helper::update_option( Enum::IS_PRE_POPULATED_AMAZON_API, 0 );
49 + flush_rewrite_rules();
50 +}
25 51
26 -require_once SIMPLE_URLS_DIR . '/includes/class-simple-urls.php';
52 +register_activation_hook( __FILE__, 'activate_lasso_lite' );
53 +register_deactivation_hook( __FILE__, 'deactivate_lasso_lite' );
27 54
28 -new Simple_Urls();
29 -
30 -if ( is_admin() ) {
31 - require_once SIMPLE_URLS_DIR . '/includes/class-simple-urls-admin.php';
32 - new Simple_Urls_Admin();
33 -}
55 +require_once plugin_dir_path( __FILE__ ) . '/simple-urls.php';