Plugin Directory

Changeset 2616450

Timestamp:
10/19/2021 11:38:52 AM (3 years ago)
Author:
sjregan
Message:

feat: additional shortcode attribute for specifying number of columns

Location:
instashop/trunk
Files:
3 edited

Legend:

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

    r2325653 r2616450  
    33
    44class SocialShop {
    5     const JS_GALLERY_URL = 'https://instashop.s3.amazonaws.com/js-gz/embed/embed-1.6.7.js';
    6     const JS_GALLERY_VERSION = '1.6.7';
     5    const JS_GALLERY_URL = 'https://.js';
     6    const JS_GALLERY_VERSION = '1.6.';
    77
    88    /**
     
    139139    /**
    140140     * Load admin Javascript.
    141      * 
     141     *
    142142     * @access  public
    143143     * @since   1.0.0
     
    154154    /**
    155155     * Load plugin localisation
    156      * 
     156     *
    157157     * @access  public
    158158     * @since   1.0.0
     
    164164    /**
    165165     * Load plugin textdomain
    166      * 
     166     *
    167167     * @access  public
    168168     * @since   1.0.0
     
    179179    /**
    180180     * Do gallery shortcode, render gallery placeholder and enqueue javascript
    181      * 
     181     *
    182182     * @param   array $attr {
    183183     *      An array of attributes for the generated div placeholder. All are optional except must have either valid domain or gallery.
    184      * 
     184     *
    185185     *      @type string $class               Additional CSS classes to add to div
    186186     *      @type string $source              Fully qualified URL (including trailing slash) indicating location of remote JS (for testing purposes only)
     
    220220            'pin-type'            => false,
    221221            'product-source-lang' => null,
     222
    222223        ), $attr, 'socialshop' );
    223224
     
    238239        if ( $attr['overlay-label'] !== false ) $data['overlay-label'] = $attr['overlay-label'];
    239240        if ( $attr['pin-type'] !== false ) $data['pin-type'] = $attr['pin-type'];
     241
    240242
    241243        if ( $attr['gallery'] !== 'default' && $product ) {
     
    339341
    340342            $data_string = '';
    341            
     343
    342344            foreach ( $data as $name => $value ) {
    343345                $data_string .= sprintf(' data-%s="%s"', $name, esc_attr( $value ) );
    344346            }
    345            
     347
    346348            wp_register_script( $this->_token . '-gallery', self::get_js_gallery_url(), self::get_js_gallery_version() );
    347349            wp_enqueue_script( $this->_token . '-gallery' );
    348            
     350
    349351            $output = str_replace( '{data}', $data_string, $template );
    350352            $output = apply_filters( 'instashop_product_gallery', $output, $data );
     
    452454    /**
    453455     * Installation. Runs on activation.
    454      * 
     456     *
    455457     * @access  public
    456458     * @since   1.0.0
     
    462464    /**
    463465     * Log the plugin version number.
    464      * 
     466     *
    465467     * @access  private
    466468     * @since   1.0.0
  • instashop/trunk/readme.txt

    r2325653 r2616450  
    9292== Changelog ==
    9393
    94 = 2.0.5 =
    95 * Feat: use v1.6.7 of embed script (broken image detection).
     94= 2.1.0 =
     95* Feature: use v1.6.8 of embed script (additional setting for specifying number of columns).
     96* Feature: additional shortcode attribute for specifying number of columns.
    9697
    9798= 2.0.4 =
  • instashop/trunk/socialshop.php

    r2325657 r2616450  
    22/*
    33 * Plugin Name: SocialShop
    4  * Version: 2.0.5
     4 * Version: 2.
    55 * Plugin URI: https://instashopapp.com/wordpress/
    66 * Description: Easily embed and manage your SocialShop galleries.
     
    3636 */
    3737function SocialShop () {
    38     $instance = SocialShop::instance( __FILE__, '2.0.5' );
     38    $instance = SocialShop::instance( __FILE__, '2.' );
    3939
    4040    if ( is_null( $instance->settings ) ) {
Note: See TracChangeset for help on using the changeset viewer.