Plugin Directory

Changeset 3250924


Ignore:
Timestamp:
03/05/2025 08:43:10 AM (13 months ago)
Author:
EmranAhmed
Message:

Release 1.3.28

Location:
woo-variation-gallery
Files:
68 added
12 edited

Legend:

Unmodified
Added
Removed
  • woo-variation-gallery/trunk/README.txt

    r3241282 r3250924  
    33Tags: woocommerce variation image gallery, additional variation image gallery, product variation image gallery, product variation image, variation images gallery, additional image, additional variation image, WooCommerce variation product thumbnail gallery
    44Requires PHP: 7.4
    5 Stable tag: 1.3.27
     5Stable tag: 1.3.28
    66Requires at least: 5.7
    77Tested up to: 6.7
    88WC requires at least: 5.8
    9 WC tested up to: 9.6
     9WC tested up to: 9.7
    1010License: GPLv3
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    378378== Changelog ==
    379379
     380= 1.3.28 - 05-03-2025 =
     381
     382* Fix: CDN Image Load Issue on admin.
     383* Update: Update Template version.
     384* Add: WC 9.7+ compatibility.
     385
    380386= 1.3.27 - 16-02-2025 =
    381387
  • woo-variation-gallery/trunk/assets/css/admin.css

    r3241282 r3250924  
    33 *
    44 * Author: Emran Ahmed ( emran.bd.08@gmail.com )
    5  * Date: 2/16/2025, 6:20:37 PM
     5 * Date: 3/5/2025, 2:39:49 PM
    66 * Released under the GPLv3 license.
    77 */
  • woo-variation-gallery/trunk/assets/css/frontend.css

    r3241282 r3250924  
    33 *
    44 * Author: Emran Ahmed ( emran.bd.08@gmail.com )
    5  * Date: 2/16/2025, 6:20:37 PM
     5 * Date: 3/5/2025, 2:39:49 PM
    66 * Released under the GPLv3 license.
    77 */
  • woo-variation-gallery/trunk/assets/css/slick.css

    r3241282 r3250924  
    33 *
    44 * Author: Emran Ahmed ( emran.bd.08@gmail.com )
    5  * Date: 2/16/2025, 6:20:37 PM
     5 * Date: 3/5/2025, 2:39:49 PM
    66 * Released under the GPLv3 license.
    77 */
  • woo-variation-gallery/trunk/assets/js/admin.js

    r3241282 r3250924  
    33 *
    44 * Author: Emran Ahmed ( emran.bd.08@gmail.com )
    5  * Date: 2/16/2025, 6:20:37 PM
     5 * Date: 3/5/2025, 2:39:49 PM
    66 * Released under the GPLv3 license.
    77 */
     
    105105            var html = images.map(function (image) {
    106106              if (image.type === 'image') {
     107                var _thumbnail$url;
     108
    107109                var id = image.id,
    108110                    _image$sizes = image.sizes;
    109111                _image$sizes = _image$sizes === void 0 ? {} : _image$sizes;
    110112                var thumbnail = _image$sizes.thumbnail,
    111                     full = _image$sizes.full;
    112                 var url = thumbnail ? thumbnail.url : full.url;
     113                    url = image.url;
     114                var imageUrl = (_thumbnail$url = thumbnail === null || thumbnail === void 0 ? void 0 : thumbnail.url) !== null && _thumbnail$url !== void 0 ? _thumbnail$url : url;
    113115                var template = wp.template('woo-variation-gallery-image');
    114116                return template({
    115117                  id: id,
    116                   url: url,
     118                  url: imageUrl,
    117119                  product_variation_id: product_variation_id,
    118120                  loop: loop
  • woo-variation-gallery/trunk/assets/js/admin.min.js

    r2759219 r3250924  
    1 !function(){var o={307:function(o,e,a){"use strict";function t(o,e){for(var a=0;a<e.length;a++){var t=e[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}a.r(e),a.d(e,{WooVariationGalleryAdmin:function(){return i}});var r,i=(r=jQuery,function(){function o(){!function(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o)}var e,a,i;return e=o,i=[{key:"GWPAdmin",value:function(){r().gwp_deactivate_popup&&r().gwp_deactivate_popup("woo-variation-gallery")}},{key:"HandleDiv",value:function(){r(document.body).on("click",".woo-variation-gallery-wrapper .handle-div",(function(){r(this).closest(".woo-variation-gallery-postbox").toggleClass("closed");var o=!r(this).closest(".woo-variation-gallery-postbox").hasClass("closed");r(this).attr("aria-expanded",o)}))}},{key:"ImageUploader",value:function(){r(document).off("click",".add-woo-variation-gallery-image"),r(document).off("click",".remove-woo-variation-gallery-image"),r(document).on("click",".add-woo-variation-gallery-image",this.AddImage),r(document).on("click",".remove-woo-variation-gallery-image",this.RemoveImage),r(".woocommerce_variation").each((function(){var o=r(this).find(".options:first");r(this).find(".woo-variation-gallery-wrapper").insertBefore(o)})),r(document).trigger("woo_variation_gallery_admin_image_uploader_attached",this)}},{key:"AddImage",value:function(e){var a,t=this;e.preventDefault(),e.stopPropagation();var i=r(this).data("product_variation_id"),n=r(this).data("product_variation_loop");if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(a)return void a.open();(a=wp.media({title:woo_variation_gallery_admin.choose_image,button:{text:woo_variation_gallery_admin.add_image},library:{type:["image"]}})).on("select",(function(){var e=a.state().get("selection").toJSON().map((function(o){if("image"===o.type){var e=o.id,a=o.sizes,t=(a=void 0===a?{}:a).thumbnail,r=a.full,l=t?t.url:r.url;return wp.template("woo-variation-gallery-image")({id:e,url:l,product_variation_id:i,loop:n})}})).join("");r(t).parent().prev().find(".woo-variation-gallery-images").append(e),o.Sortable(),o.VariationChanged(t),_.delay((function(){o.ProNotice(t)}),5)})),a.open()}}},{key:"VariationChanged",value:function(o){r(o).closest(".woocommerce_variation").addClass("variation-needs-update"),r("button.cancel-variation-changes, button.save-variation-changes").removeAttr("disabled"),r("#variable_product_options").trigger("woocommerce_variations_input_changed"),r(o).closest(".dokan-product-variation-itmes").addClass("variation-needs-update"),r(".dokan-product-variation-wrapper").trigger("dokan_variations_input_changed"),r(document).trigger("woo_variation_gallery_admin_variation_changed",this)}},{key:"ProNotice",value:function(o){r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-images > li").length,r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-images > li").each((function(e,a){e>=2?(r(a).remove(),r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-pro-button").show()):r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-pro-button").hide()}))}},{key:"RemoveImage",value:function(e){var a=this;e.preventDefault(),e.stopPropagation(),o.VariationChanged(this),_.delay((function(){o.ProNotice(a),r(a).parent().remove()}),1)}},{key:"Sortable",value:function(){r(".woo-variation-gallery-images").sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"woo-variation-gallery-sortable-placeholder",start:function(o,e){e.item.css("background-color","#F6F6F6")},stop:function(o,e){e.item.removeAttr("style")},update:function(){o.VariationChanged(this)}})}}],(a=null)&&t(e.prototype,a),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),o}())}},e={};function a(t){var r=e[t];if(void 0!==r)return r.exports;var i=e[t]={exports:{}};return o[t](i,i.exports,a),i.exports}a.d=function(o,e){for(var t in e)a.o(e,t)&&!a.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},a.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},a.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},function(){function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},o(e)}function e(o){if("function"!=typeof WeakMap)return null;var a=new WeakMap,t=new WeakMap;return(e=function(o){return o?t:a})(o)}jQuery((function(t){Promise.resolve().then((function(){return function(a,t){if(!t&&a&&a.__esModule)return a;if(null===a||"object"!==o(a)&&"function"!=typeof a)return{default:a};var r=e(t);if(r&&r.has(a))return r.get(a);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in a)if("default"!==l&&Object.prototype.hasOwnProperty.call(a,l)){var c=n?Object.getOwnPropertyDescriptor(a,l):null;c&&(c.get||c.set)?Object.defineProperty(i,l,c):i[l]=a[l]}return i.default=a,r&&r.set(a,i),i}(a(307))})).then((function(o){var e=o.WooVariationGalleryAdmin;e.HandleDiv(),e.ImageUploader(),t("#woocommerce-product-data").on("woocommerce_variations_loaded",(function(){e.ImageUploader(),e.Sortable()})),t("#variable_product_options").on("woocommerce_variations_added",(function(){e.ImageUploader(),e.Sortable()})),t(".dokan-product-variation-wrapper").on("dokan_variations_loaded dokan_variations_added",(function(){e.ImageUploader(),e.Sortable()})),t(document).trigger("woo_variation_gallery_admin_loaded")}))}))}()}();
     1!function(){var o={307:function(o,e,a){"use strict";function t(o,e){for(var a=0;a<e.length;a++){var t=e[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}a.r(e),a.d(e,{WooVariationGalleryAdmin:function(){return i}});var r,i=(r=jQuery,function(){function o(){!function(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o)}var e,a,i;return e=o,i=[{key:"GWPAdmin",value:function(){r().gwp_deactivate_popup&&r().gwp_deactivate_popup("woo-variation-gallery")}},{key:"HandleDiv",value:function(){r(document.body).on("click",".woo-variation-gallery-wrapper .handle-div",(function(){r(this).closest(".woo-variation-gallery-postbox").toggleClass("closed");var o=!r(this).closest(".woo-variation-gallery-postbox").hasClass("closed");r(this).attr("aria-expanded",o)}))}},{key:"ImageUploader",value:function(){r(document).off("click",".add-woo-variation-gallery-image"),r(document).off("click",".remove-woo-variation-gallery-image"),r(document).on("click",".add-woo-variation-gallery-image",this.AddImage),r(document).on("click",".remove-woo-variation-gallery-image",this.RemoveImage),r(".woocommerce_variation").each((function(){var o=r(this).find(".options:first");r(this).find(".woo-variation-gallery-wrapper").insertBefore(o)})),r(document).trigger("woo_variation_gallery_admin_image_uploader_attached",this)}},{key:"AddImage",value:function(e){var a,t=this;e.preventDefault(),e.stopPropagation();var i=r(this).data("product_variation_id"),n=r(this).data("product_variation_loop");if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(a)return void a.open();(a=wp.media({title:woo_variation_gallery_admin.choose_image,button:{text:woo_variation_gallery_admin.add_image},library:{type:["image"]}})).on("select",(function(){var e=a.state().get("selection").toJSON().map((function(o){if("image"===o.type){var e,a=o.id,t=o.sizes,r=(t=void 0===t?{}:t).thumbnail,l=o.url,c=null!==(e=null==r?void 0:r.url)&&void 0!==e?e:l;return wp.template("woo-variation-gallery-image")({id:a,url:c,product_variation_id:i,loop:n})}})).join("");r(t).parent().prev().find(".woo-variation-gallery-images").append(e),o.Sortable(),o.VariationChanged(t),_.delay((function(){o.ProNotice(t)}),5)})),a.open()}}},{key:"VariationChanged",value:function(o){r(o).closest(".woocommerce_variation").addClass("variation-needs-update"),r("button.cancel-variation-changes, button.save-variation-changes").removeAttr("disabled"),r("#variable_product_options").trigger("woocommerce_variations_input_changed"),r(o).closest(".dokan-product-variation-itmes").addClass("variation-needs-update"),r(".dokan-product-variation-wrapper").trigger("dokan_variations_input_changed"),r(document).trigger("woo_variation_gallery_admin_variation_changed",this)}},{key:"ProNotice",value:function(o){r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-images > li").length,r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-images > li").each((function(e,a){e>=2?(r(a).remove(),r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-pro-button").show()):r(o).closest(".woo-variation-gallery-wrapper").find(".woo-variation-gallery-pro-button").hide()}))}},{key:"RemoveImage",value:function(e){var a=this;e.preventDefault(),e.stopPropagation(),o.VariationChanged(this),_.delay((function(){o.ProNotice(a),r(a).parent().remove()}),1)}},{key:"Sortable",value:function(){r(".woo-variation-gallery-images").sortable({items:"li.image",cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,helper:"clone",opacity:.65,placeholder:"woo-variation-gallery-sortable-placeholder",start:function(o,e){e.item.css("background-color","#F6F6F6")},stop:function(o,e){e.item.removeAttr("style")},update:function(){o.VariationChanged(this)}})}}],(a=null)&&t(e.prototype,a),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),o}())}},e={};function a(t){var r=e[t];if(void 0!==r)return r.exports;var i=e[t]={exports:{}};return o[t](i,i.exports,a),i.exports}a.d=function(o,e){for(var t in e)a.o(e,t)&&!a.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},a.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},a.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},function(){function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},o(e)}function e(o){if("function"!=typeof WeakMap)return null;var a=new WeakMap,t=new WeakMap;return(e=function(o){return o?t:a})(o)}jQuery((function(t){Promise.resolve().then((function(){return function(a,t){if(!t&&a&&a.__esModule)return a;if(null===a||"object"!==o(a)&&"function"!=typeof a)return{default:a};var r=e(t);if(r&&r.has(a))return r.get(a);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in a)if("default"!==l&&Object.prototype.hasOwnProperty.call(a,l)){var c=n?Object.getOwnPropertyDescriptor(a,l):null;c&&(c.get||c.set)?Object.defineProperty(i,l,c):i[l]=a[l]}return i.default=a,r&&r.set(a,i),i}(a(307))})).then((function(o){var e=o.WooVariationGalleryAdmin;e.HandleDiv(),e.ImageUploader(),t("#woocommerce-product-data").on("woocommerce_variations_loaded",(function(){e.ImageUploader(),e.Sortable()})),t("#variable_product_options").on("woocommerce_variations_added",(function(){e.ImageUploader(),e.Sortable()})),t(".dokan-product-variation-wrapper").on("dokan_variations_loaded dokan_variations_added",(function(){e.ImageUploader(),e.Sortable()})),t(document).trigger("woo_variation_gallery_admin_loaded")}))}))}()}();
  • woo-variation-gallery/trunk/assets/js/frontend.js

    r3241282 r3250924  
    33 *
    44 * Author: Emran Ahmed ( emran.bd.08@gmail.com )
    5  * Date: 2/16/2025, 6:20:37 PM
     5 * Date: 3/5/2025, 2:39:49 PM
    66 * Released under the GPLv3 license.
    77 */
  • woo-variation-gallery/trunk/assets/js/slick.js

    r3241282 r3250924  
    33 *
    44 * Author: Emran Ahmed ( emran.bd.08@gmail.com )
    5  * Date: 2/16/2025, 6:20:37 PM
     5 * Date: 3/5/2025, 2:39:49 PM
    66 * Released under the GPLv3 license.
    77 */
  • woo-variation-gallery/trunk/languages/woo-variation-gallery.pot

    r3241282 r3250924  
    88"Content-Transfer-Encoding: 8bit\n"
    99"Language-Team: Emran Ahmed <emran.bd.08@gmail.com>\n"
    10 "POT-Creation-Date: 2025-02-16 12:20+0000\n"
     10"POT-Creation-Date: 2025-03-05 08:39+0000\n"
    1111"X-Poedit-Basepath: ..\n"
    1212"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
  • woo-variation-gallery/trunk/templates/product-images.php

    r3129445 r3250924  
    1313 * @see     https://docs.woocommerce.com/document/template-structure/
    1414 * @package WooCommerce/Templates
    15  * @version 9.0.0
     15 * @version 9.7.0
    1616 */
    1717
     
    4343}
    4444
     45// ProductType::VARIABLE
    4546if ( 'variable' === $product_type && $default_variation_id > 0 ) {
    4647    $product_variation = woo_variation_gallery()->get_frontend()->get_available_variation( $product_id, $default_variation_id );
     
    139140$loading_gallery_class = wc_string_to_bool( woo_variation_gallery()->get_option( 'preloader_disable', 'no' ) ) ? '' : 'loading-gallery';
    140141$zoom_icon_markup      = apply_filters( 'woo_variation_gallery_zoom_icon_html', '<span class="dashicons dashicons-search"></span>', $product );
    141 ?>
    142 
    143 <?php
     142
    144143do_action( 'woo_variation_product_gallery_start', $product ); ?>
    145144    <div data-product_id="<?php
     
    221220        </div> <!-- .woo-variation-gallery-wrapper -->
    222221    </div> <!-- .woo-variation-product-gallery -->
    223 <?php
    224 do_action( 'woo_variation_product_gallery_end', $product ); ?>
     222<?php do_action( 'woo_variation_product_gallery_end', $product );
  • woo-variation-gallery/trunk/templates/product-thumbnails.php

    r2155458 r3250924  
    1313     * @see         https://docs.woocommerce.com/document/template-structure/
    1414     * @package     WooCommerce/Templates
    15      * @version     3.5.1
     15     * @version     9.5.0
    1616     */
    1717   
  • woo-variation-gallery/trunk/woo-variation-gallery.php

    r3241282 r3250924  
    55 * Description: Allows inserting multiple images for per variation to let visitors see a different images when WooCommerce product variations are switched.
    66 * Author: Emran Ahmed
    7  * Version: 1.3.27
     7 * Version: 1.3.28
    88 * Domain Path: /languages
    99 * Requires PHP: 7.4
     
    1111 * Tested up to: 6.7
    1212 * WC requires at least: 5.8
    13  * WC tested up to: 9.6
     13 * WC tested up to: 9.7
    1414 * Requires Plugins: woocommerce
    1515 * Text Domain: woo-variation-gallery
     
    2424
    2525if ( ! defined( 'WOO_VARIATION_GALLERY_PLUGIN_VERSION' ) ) {
    26     define( 'WOO_VARIATION_GALLERY_PLUGIN_VERSION', '1.3.27' );
     26    define( 'WOO_VARIATION_GALLERY_PLUGIN_VERSION', '1.3.28' );
    2727}
    2828
Note: See TracChangeset for help on using the changeset viewer.