Plugin Directory

Changeset 2557190

Timestamp:
07/01/2021 06:20:06 PM (3 years ago)
Author:
DrewAPicture
Message:

Release and tag v1.1.1

Location:
affiliatewp-external-referral-links
Files:
2 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • affiliatewp-external-referral-links/tags/1.1.1/affiliatewp-external-referral-links.php

    r2556971 r2557190  
    66 * Author: Sandhills Development, LLC
    77 * Author URI: https://sandhillsdev.com
    8  * Version: 1.1
     8 * Version: 1.1
    99 * Text Domain: affiliatewp-external-referral-links
    1010 *
     
    2323 * @package AffiliateWP External Referral Links
    2424 * @category Core
    25  * @version 1.1
     25 * @version 1.1
    2626 */
    2727
     
    5353
    5454    /**
    55      * Add-on requirements.
    56      *
    57      * @since 1.1
    58      * @var   array[]
    59      */
    60     protected $addon_requirements = array(
    61         // AffiliateWP.
    62         'affwp' => array(
    63             'minimum' => '2.6',
    64             'name'    => 'AffiliateWP',
    65             'exists'  => true,
    66             'current' => false,
    67             'checked' => false,
    68             'met'     => false
    69         ),
    70     );
    71 
    72     /**
    7355     * Bootstrap everything.
    7456     *
     
    7658     */
    7759    public function bootstrap() {
    78         if ( ! class_exists( 'Affiliate_WP' ) ) {
    79 
    80             if ( ! class_exists( 'AffiliateWP_Activation' ) ) {
    81                 require_once 'includes/lib/affwp/class-affiliatewp-activation.php';
    82             }
    83 
    84             // AffiliateWP activation
    85             if ( ! class_exists( 'Affiliate_WP' ) ) {
    86                 $activation = new AffiliateWP_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) );
    87                 $activation = $activation->run();
    88             }
    89         } else {
    90             \AffiliateWP_External_Referral_Links::instance( __FILE__ );
    91         }
     60        \AffiliateWP_External_Referral_Links::instance( __FILE__ );
    9261    }
    9362
     
    10675        if ( class_exists( 'AffiliateWP_External_Referral_Links' ) ) {
    10776
    108             $affwp_version = get_option( 'affwp_version' );
    109 
    110             if ( version_compare( $affwp_version, '2.7', '<' ) ) {
    111                 add_action( 'plugins_loaded', array( $this, 'bootstrap' ), 100 );
    112             } else {
    113                 add_action( 'affwp_plugins_loaded', array( $this, 'bootstrap' ), 100 );
    114             }
     77            add_action( 'plugins_loaded', array( $this, 'bootstrap' ), 100 );
    11578
    11679            // Register the activation hook.
  • affiliatewp-external-referral-links/tags/1.1.1/includes/class-affiliatewp-external-referral-links.php

    r2556971 r2557190  
    4242     * @var   string
    4343     */
    44     private $version = '1.1';
     44    private $version = '1.1.1';
     45
     46    /**
     47     * Is on Pantheon platform?
     48     *
     49     * @since 1.1.1
     50     * @var bool
     51     */
     52    public $is_pantheon = false;
    4553
    4654    /**
     
    6674            self::$instance->hooks();
    6775
     76
     77
     78
     79
    6880        }
    6981
     
    156168        add_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );
    157169
    158         // filter the custom cookie name.
    159         add_filter( 'affwp_get_cookie_name', array( $this, 'set_cookie_name' ), 10, 2 );
    160 
    161170    }
    162171
     
    199208        wp_enqueue_script( 'affwp-erl', AFFWP_ERL_PLUGIN_URL . 'assets/js/affwp-external-referral-links.min.js', array( 'jquery' ), $this->version );
    200209
    201         // get cookie name.
    202         $affwp_version = defined( 'AFFILIATEWP_VERSION' ) ? AFFILIATEWP_VERSION : 'undefined';
    203         if ( version_compare( $affwp_version, '2.7.1', '>=' ) ) {
    204             $cookie = affiliate_wp()->tracking->get_cookie_name( 'erl-affiliate' );
    205         } else {
    206             $cookie = 'affwp_erl_id';
     210        $cookie = 'affwp_erl_id';
     211
     212        if ( true === $this->is_pantheon ) {
     213            $cookie = "wp_{$cookie}";
    207214        }
    208215
     
    217224
    218225    /**
    219      * Sets the custom cookie name
    220      *
    221      * @param string $cookie_name The cookie name.
    222      * @param string $cookie_type The cookie type.
    223      * @return string The final cookie name.
    224      */
    225     public function set_cookie_name( $cookie_name, $cookie_type ) {
    226         if ( 'erl-affiliate' === $cookie_type ) {
    227             $cookie_name = 'affwp_erl_id';
    228         }
    229 
    230         return $cookie_name;
    231     }
    232 
    233     /**
    234226     * Modify plugin metalinks
    235227     *
  • affiliatewp-external-referral-links/tags/1.1.1/readme.txt

    r2556971 r2557190  
    55Tested up to: 5.7
    66Requires PHP: 5.6
    7 Stable tag: 1.1
     7Stable tag: 1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 > This plugin was built to be used in conjunction with [AffiliateWP](https://affiliatewp.com/ "AffiliateWP") 2.6+.
     15> This plugin was built to be used in conjunction with [AffiliateWP](https://affiliatewp.com/ "AffiliateWP").
    1616
    1717Like other affiliate plugins, AffiliateWP must be installed on the same domain as your e-commerce system (Easy Digital Downloads, WooCommerce etc) to properly track visits and referrals.
     
    4040== Changelog ==
    4141
     42
     43
     44
     45
    4246= 1.1 =
    4347* New: Enforce minimum dependency requirements checking
  • affiliatewp-external-referral-links/trunk/affiliatewp-external-referral-links.php

    r2556971 r2557190  
    66 * Author: Sandhills Development, LLC
    77 * Author URI: https://sandhillsdev.com
    8  * Version: 1.1
     8 * Version: 1.1
    99 * Text Domain: affiliatewp-external-referral-links
    1010 *
     
    2323 * @package AffiliateWP External Referral Links
    2424 * @category Core
    25  * @version 1.1
     25 * @version 1.1
    2626 */
    2727
     
    5353
    5454    /**
    55      * Add-on requirements.
    56      *
    57      * @since 1.1
    58      * @var   array[]
    59      */
    60     protected $addon_requirements = array(
    61         // AffiliateWP.
    62         'affwp' => array(
    63             'minimum' => '2.6',
    64             'name'    => 'AffiliateWP',
    65             'exists'  => true,
    66             'current' => false,
    67             'checked' => false,
    68             'met'     => false
    69         ),
    70     );
    71 
    72     /**
    7355     * Bootstrap everything.
    7456     *
     
    7658     */
    7759    public function bootstrap() {
    78         if ( ! class_exists( 'Affiliate_WP' ) ) {
    79 
    80             if ( ! class_exists( 'AffiliateWP_Activation' ) ) {
    81                 require_once 'includes/lib/affwp/class-affiliatewp-activation.php';
    82             }
    83 
    84             // AffiliateWP activation
    85             if ( ! class_exists( 'Affiliate_WP' ) ) {
    86                 $activation = new AffiliateWP_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) );
    87                 $activation = $activation->run();
    88             }
    89         } else {
    90             \AffiliateWP_External_Referral_Links::instance( __FILE__ );
    91         }
     60        \AffiliateWP_External_Referral_Links::instance( __FILE__ );
    9261    }
    9362
     
    10675        if ( class_exists( 'AffiliateWP_External_Referral_Links' ) ) {
    10776
    108             $affwp_version = get_option( 'affwp_version' );
    109 
    110             if ( version_compare( $affwp_version, '2.7', '<' ) ) {
    111                 add_action( 'plugins_loaded', array( $this, 'bootstrap' ), 100 );
    112             } else {
    113                 add_action( 'affwp_plugins_loaded', array( $this, 'bootstrap' ), 100 );
    114             }
     77            add_action( 'plugins_loaded', array( $this, 'bootstrap' ), 100 );
    11578
    11679            // Register the activation hook.
  • affiliatewp-external-referral-links/trunk/includes/class-affiliatewp-external-referral-links.php

    r2556971 r2557190  
    4242     * @var   string
    4343     */
    44     private $version = '1.1';
     44    private $version = '1.1.1';
     45
     46    /**
     47     * Is on Pantheon platform?
     48     *
     49     * @since 1.1.1
     50     * @var bool
     51     */
     52    public $is_pantheon = false;
    4553
    4654    /**
     
    6674            self::$instance->hooks();
    6775
     76
     77
     78
     79
    6880        }
    6981
     
    156168        add_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );
    157169
    158         // filter the custom cookie name.
    159         add_filter( 'affwp_get_cookie_name', array( $this, 'set_cookie_name' ), 10, 2 );
    160 
    161170    }
    162171
     
    199208        wp_enqueue_script( 'affwp-erl', AFFWP_ERL_PLUGIN_URL . 'assets/js/affwp-external-referral-links.min.js', array( 'jquery' ), $this->version );
    200209
    201         // get cookie name.
    202         $affwp_version = defined( 'AFFILIATEWP_VERSION' ) ? AFFILIATEWP_VERSION : 'undefined';
    203         if ( version_compare( $affwp_version, '2.7.1', '>=' ) ) {
    204             $cookie = affiliate_wp()->tracking->get_cookie_name( 'erl-affiliate' );
    205         } else {
    206             $cookie = 'affwp_erl_id';
     210        $cookie = 'affwp_erl_id';
     211
     212        if ( true === $this->is_pantheon ) {
     213            $cookie = "wp_{$cookie}";
    207214        }
    208215
     
    217224
    218225    /**
    219      * Sets the custom cookie name
    220      *
    221      * @param string $cookie_name The cookie name.
    222      * @param string $cookie_type The cookie type.
    223      * @return string The final cookie name.
    224      */
    225     public function set_cookie_name( $cookie_name, $cookie_type ) {
    226         if ( 'erl-affiliate' === $cookie_type ) {
    227             $cookie_name = 'affwp_erl_id';
    228         }
    229 
    230         return $cookie_name;
    231     }
    232 
    233     /**
    234226     * Modify plugin metalinks
    235227     *
  • affiliatewp-external-referral-links/trunk/readme.txt

    r2556971 r2557190  
    55Tested up to: 5.7
    66Requires PHP: 5.6
    7 Stable tag: 1.1
     7Stable tag: 1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 > This plugin was built to be used in conjunction with [AffiliateWP](https://affiliatewp.com/ "AffiliateWP") 2.6+.
     15> This plugin was built to be used in conjunction with [AffiliateWP](https://affiliatewp.com/ "AffiliateWP").
    1616
    1717Like other affiliate plugins, AffiliateWP must be installed on the same domain as your e-commerce system (Easy Digital Downloads, WooCommerce etc) to properly track visits and referrals.
     
    4040== Changelog ==
    4141
     42
     43
     44
     45
    4246= 1.1 =
    4347* New: Enforce minimum dependency requirements checking
Note: See TracChangeset for help on using the changeset viewer.