Plugin Directory

Changeset 1198520


Ignore:
Timestamp:
07/14/2015 06:07:49 AM (11 years ago)
Author:
jprummer
Message:

Version 1.2

Location:
woocommerce-improved-external-products
Files:
14 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-improved-external-products/trunk/improved_external_prod.php

    r1073627 r1198520  
    44Plugin URI: https://wpovernight.com/
    55Description: Opens External/Affiliate products in a new tab.
    6 Version: 1.1.2
     6Version: 1.2
    77Author: Jeremiah Prummer
    88Author URI: https://wpovernight.com/
     
    2626     */
    2727    public function __construct() {
    28         add_filter( 'woocommerce_loop_add_to_cart_link', array(&$this,'shop_loop_link'), 10, 2 );
    29         add_filter( 'woocommerce_locate_template', array(&$this,'myplugin_woocommerce_locate_template'), 10, 3 );
    30         add_action('wp_footer', array(&$this,'javascript_backup'));
     28        if(!class_exists('ImprovedExternalProductsPro')){
     29            add_filter( 'woocommerce_loop_add_to_cart_link', array($this,'shop_loop_link'), 10, 2 );
     30            add_filter( 'woocommerce_locate_template', array($this,'myplugin_woocommerce_locate_template'), 10, 3 );
     31            add_action('wp_footer', array($this,'javascript_backup'));
     32        }
     33        $this->includes();
     34        $this->settings = new ImprovedExternalProducts_Settings();
     35
     36        // Redirect to the Settings Page
     37        // Settings Page URL
     38        define("IEPP_SETTINGS_URL", "admin.php?page=iepp_options_page");
     39        // Redirect to settings page on activation
     40        register_activation_hook(__FILE__, array(&$this,'iepp_activate'));
     41        add_action('admin_init', array(&$this,'iepp_redirect'));
     42    }
     43
     44    /**
     45     * Redirect: Make It So
     46     *
     47     */
     48    function iepp_activate() {
     49        add_option('iepp_do_activation_redirect', true);
     50    }
     51   
     52    function iepp_redirect() {
     53        if (get_option('iepp_do_activation_redirect', false)) {
     54            delete_option('iepp_do_activation_redirect');
     55            if(!isset($_GET['activate-multi'])){
     56                wp_redirect(IEPP_SETTINGS_URL);
     57            }
     58        }
     59    }
     60
     61    function includes(){
     62        require_once( 'includes/settings.php' );
    3163    }
    3264
  • woocommerce-improved-external-products/trunk/readme.txt

    r1073627 r1198520  
    44Tags: woocommerce, affiliate, external product, link, new tab, external/affiliate
    55Requires at least: 3.0.1
    6 Tested up to: 4.1
    7 Stable tag: 1.1.2
     6Tested up to: 4.2.2
     7Stable tag: 1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2828== Changelog ==
    2929
     30= 1.2 =
     31
     32* Added support for Improved External Products Pro
     33
    3034= 1.1.2 =
    3135
     
    4751== Upgrade Notice ==
    4852
     53= 1.2 =
     54
     55* Added support for Improved External Products Pro
     56
    4957= 1.1.2 =
    5058
Note: See TracChangeset for help on using the changeset viewer.