Plugin Directory

Changeset 2130888

Timestamp:
07/30/2019 03:03:38 PM (5 years ago)
Author:
sjregan
Message:

feat: 'instashop_gallery_product_source_lang' filter and 'product-source-lang' shortcode attribute

Location:
instashop/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • instashop/trunk/includes/class-instashop-admin-api.php

    r1922297 r2130888  
    33
    44class InstaShop_Admin_API {
    5     const EMBED_URL = 'https://my.instashopapp.com/wordpress';
    6 
     5    // const EMBED_URL = 'https://my.instashopapp.com/wordpress';
     6    const EMBED_URL = 'http://instashopapp.test/wordpress';
     7   
    78    /**
    89     * Constructor function
  • instashop/trunk/includes/class-instashop-settings.php

    r1922297 r2130888  
    104104                    'type'          => 'text',
    105105                    'default'       => '',
    106                     'placeholder'   => '',
    107106                ),
    108107                array(
     
    130129                                        .'</div>'."\n"
    131130                                        .'</section>',
    132                     'placeholder'   => '',
    133131                ),
    134132            )
  • instashop/trunk/includes/class-instashop.php

    r2120599 r2130888  
    33
    44class InstaShop {
    5     const JS_GALLERY_URL = 'https://s3.amazonaws.com/instashop/js/dist/embed-1.6.1.js';
    6     const JS_GALLERY_VERSION = '1.6.1';
     5    const JS_GALLERY_URL = 'https://s3.amazonaws.com/instashop/js/.1.js';
     6    const JS_GALLERY_VERSION = '1..1';
    77
    88    /**
     
    200200     */
    201201    public function gallery_shortcode ( $attr ) {
    202         global $product;
    203 
    204202        $domain = wp_parse_url( get_home_url(), PHP_URL_HOST);
    205203
     
    236234        if ( $attr['pin-type'] !== false ) $data['pin-type'] = $attr['pin-type'];
    237235
    238         if ( $attr['gallery'] !== 'default' && $product ) {
    239             if ( self::woocommerce_version_check() ) {
    240                 $data['product-id'] = $product->get_id();
    241             } else {
    242                 $data['product-id'] = $product->id;
    243             }
    244         }
    245 
    246236        $source = apply_filters( 'instashop_gallery_source', '' );
    247237       
     
    309299            wp_register_script( $this->_token . '-gallery', self::get_js_gallery_url(), self::get_js_gallery_version() );
    310300            wp_enqueue_script( $this->_token . '-gallery' );
    311            
     301   
    312302            $output = str_replace( '{data}', $data_string, $template );
    313             echo apply_filters( 'instashop_product_gallery', $output, $data );
     303            echo apply_filters( 'instashop_product_gallery', $output, $ );
    314304        }
    315305    }
     
    419409     * Log the plugin version number.
    420410     *
    421      * @access  private
     411     * @access  p
    422412     * @since   1.0.0
    423413     */
     
    425415        update_option( $this->_token . '_version', $this->_version );
    426416    }
    427 
    428     /**
    429      * Check WooCommerce version.
    430      *
    431      * @since 1.3.0
    432      *
    433      * @param string $version
    434      * @return bool
    435      */
    436     public static function woocommerce_version_check( $version = '3.0' ) {
    437         if ( class_exists( 'WooCommerce' ) ) {
    438             global $woocommerce;
    439 
    440             if ( version_compare( $woocommerce->version, $version, '>=' ) ) {
    441                 return true;
    442             }
    443         }
    444 
    445         return false;
    446     }
    447417}
  • instashop/trunk/instashop.php

    r2120599 r2130888  
    22/*
    33 * Plugin Name: InstaShop
    4  * Version: 1.3.0
     4 * Version: 1.
    55 * Plugin URI: https://instashopapp.com/wordpress/
    66 * Description: Easily embed and manage your InstaShop galleries.
     
    88 * Author URI: https://wearezipline.com/
    99 * Requires at least: 4.0
    10  * Tested up to: 5.2.2
     10 * Tested up to:
    1111 *
    1212 * Text Domain: instashop
     
    3535 */
    3636function InstaShop () {
    37     $instance = InstaShop::instance( __FILE__, '1.2.0' );
     37    $instance = InstaShop::instance( __FILE__, '1.' );
    3838
    3939    if ( is_null( $instance->settings ) ) {
  • instashop/trunk/readme.txt

    r2120599 r2130888  
    33Tags: instashop, instagram, gallery, shopping, woocommerce, social media, embed instagram, hashtag, product gallery
    44Requires at least: 4.0
    5 Tested up to: 5.2.2
     5Tested up to:
    66Requires PHP: 5.2.4
    77Stable tag: trunk
     
    9292== Changelog ==
    9393
    94 = 1.3.0 =
    95 * Galleries created with shortcode on a product page will display product gallery.
    96 
    97 = 1.2.0 =
    98 * Adds ability to auto-embed product galleries in WooCommerce
    99 * Adds widget
    100 * Adds more developer filters
    101 
    102 = 1.1.2 =
    103 * 2018-04-21
    104 * Update JS gallery reference to v1.5.5 (better support for non-latin characters)
    105 
    106 = 1.1.1 =
    107 * 2018-04-20
    108 * Update JS gallery reference to v1.5.4 (additional style options, analytics)
    109 
    11094= 1.1 =
    11195* 2017-11-14
     
    127111== Upgrade Notice ==
    128112
    129 = 1.1.2 =
    130 * 2018-04-21
    131 * Update JS gallery reference to v1.5.5 (better support for non-latin characters)
    132 
    133 = 1.1.1 =
    134 * 2018-04-20
    135 * Update JS gallery reference to v1.5.4 (additional style options, analytics)
    136 
    137113= 1.1 =
    138114* 2017-11-14
Note: See TracChangeset for help on using the changeset viewer.