Changeset 2130888
- Timestamp:
- 07/30/2019 03:03:38 PM (5 years ago)
- Location:
- instashop/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
instashop/trunk/includes/class-instashop-admin-api.php
r1922297 r2130888 3 3 4 4 class 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 7 8 /** 8 9 * Constructor function -
instashop/trunk/includes/class-instashop-settings.php
r1922297 r2130888 104 104 'type' => 'text', 105 105 'default' => '', 106 'placeholder' => '',107 106 ), 108 107 array( … … 130 129 .'</div>'."\n" 131 130 .'</section>', 132 'placeholder' => '',133 131 ), 134 132 ) -
instashop/trunk/includes/class-instashop.php
r2120599 r2130888 3 3 4 4 class 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'; 7 7 8 8 /** … … 200 200 */ 201 201 public function gallery_shortcode ( $attr ) { 202 global $product;203 204 202 $domain = wp_parse_url( get_home_url(), PHP_URL_HOST); 205 203 … … 236 234 if ( $attr['pin-type'] !== false ) $data['pin-type'] = $attr['pin-type']; 237 235 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 246 236 $source = apply_filters( 'instashop_gallery_source', '' ); 247 237 … … 309 299 wp_register_script( $this->_token . '-gallery', self::get_js_gallery_url(), self::get_js_gallery_version() ); 310 300 wp_enqueue_script( $this->_token . '-gallery' ); 311 301 312 302 $output = str_replace( '{data}', $data_string, $template ); 313 echo apply_filters( 'instashop_product_gallery', $output, $ data);303 echo apply_filters( 'instashop_product_gallery', $output, $ ); 314 304 } 315 305 } … … 419 409 * Log the plugin version number. 420 410 * 421 * @access p rivate411 * @access p 422 412 * @since 1.0.0 423 413 */ … … 425 415 update_option( $this->_token . '_version', $this->_version ); 426 416 } 427 428 /**429 * Check WooCommerce version.430 *431 * @since 1.3.0432 *433 * @param string $version434 * @return bool435 */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 }447 417 } -
instashop/trunk/instashop.php
r2120599 r2130888 2 2 /* 3 3 * Plugin Name: InstaShop 4 * Version: 1. 3.04 * Version: 1. 5 5 * Plugin URI: https://instashopapp.com/wordpress/ 6 6 * Description: Easily embed and manage your InstaShop galleries. … … 8 8 * Author URI: https://wearezipline.com/ 9 9 * Requires at least: 4.0 10 * Tested up to: 5.2.210 * Tested up to: 11 11 * 12 12 * Text Domain: instashop … … 35 35 */ 36 36 function InstaShop () { 37 $instance = InstaShop::instance( __FILE__, '1. 2.0' );37 $instance = InstaShop::instance( __FILE__, '1.' ); 38 38 39 39 if ( is_null( $instance->settings ) ) { -
instashop/trunk/readme.txt
r2120599 r2130888 3 3 Tags: instashop, instagram, gallery, shopping, woocommerce, social media, embed instagram, hashtag, product gallery 4 4 Requires at least: 4.0 5 Tested up to: 5.2.25 Tested up to: 6 6 Requires PHP: 5.2.4 7 7 Stable tag: trunk … … 92 92 == Changelog == 93 93 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 WooCommerce99 * Adds widget100 * Adds more developer filters101 102 = 1.1.2 =103 * 2018-04-21104 * Update JS gallery reference to v1.5.5 (better support for non-latin characters)105 106 = 1.1.1 =107 * 2018-04-20108 * Update JS gallery reference to v1.5.4 (additional style options, analytics)109 110 94 = 1.1 = 111 95 * 2017-11-14 … … 127 111 == Upgrade Notice == 128 112 129 = 1.1.2 =130 * 2018-04-21131 * Update JS gallery reference to v1.5.5 (better support for non-latin characters)132 133 = 1.1.1 =134 * 2018-04-20135 * Update JS gallery reference to v1.5.4 (additional style options, analytics)136 137 113 = 1.1 = 138 114 * 2017-11-14
Note: See TracChangeset
for help on using the changeset viewer.