Skip to content

Commit

Permalink
0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Nov 26, 2018
1 parent 87a99c2 commit ae59b8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
17 changes: 8 additions & 9 deletions image-flipper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: WooCommerce Product Image Flipper
Plugin URI: http://jameskoster.co.uk/tag/product-image-flipper/
Version: 0.4.1
Version: 0.4.2
Description: Adds a secondary image on product archives that is revealed on hover. Perfect for displaying front/back shots of clothing and other products.
Author: jameskoster
Author URI: http://jameskoster.co.uk
Expand All @@ -18,14 +18,6 @@
*/
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {

/**
* Localisation (with WPML support)
*/
add_action( 'init', 'plugin_init' );
function plugin_init() {
load_plugin_textdomain( 'woocommerce-product-image-flipper', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}


/**
* Image Flipper class
Expand All @@ -35,11 +27,18 @@ function plugin_init() {
class WC_pif {

public function __construct() {
add_action( 'init', array( $this, 'pif_init' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'pif_scripts' ) );
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'woocommerce_template_loop_second_product_thumbnail' ), 11 );
add_filter( 'post_class', array( $this, 'product_has_gallery' ) );
}

/**
* Plugin initilisation
*/
public function pif_init() {
load_plugin_textdomain( 'woocommerce-product-image-flipper', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}

/**
* Class functions
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: jameskoster, gabriel-kaam
Tags: woocommerce, ecommerce, product, images, photos, product photos, front and back
Requires at least: 3.8
Tested up to: 4.9.1
Stable tag: 0.4.1
Tested up to: 5.0.0
Stable tag: 0.4.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -44,6 +44,9 @@ First of all check that the product you're checking has a gallery attached to it

== Changelog ==

= 0.4.2 - 26.11.2018 =
* Fix - Moved initilisation function to pif class. Fixes compatibility with other plugins.

= 0.4.1 - 12.12.2017 =
* Fix - Flipper effect is now applied to shortcodes and product loops on single product pages.

Expand Down

0 comments on commit ae59b8b

Please sign in to comment.