Plugin Directory

Changeset 3333160


Ignore:
Timestamp:
07/23/2025 08:38:35 PM (8 months ago)
Author:
wijnbergdevelopments
Message:
  • Added option to enable/disable hover functionality when slider is disabled above breakpoint
  • Updated breakpoint functionality to work properly with mobile-first approach
Location:
product-gallery-swiper-for-woocommerce
Files:
41 added
11 edited

Legend:

Unmodified
Added
Removed
  • product-gallery-swiper-for-woocommerce/trunk/README.txt

    r3332885 r3333160  
    44Requires at least: 6.0
    55Tested up to: 6.8
    6 Stable tag: 1.5.6
     6Stable tag: 1.5.7
    77Requires PHP: 7.2
    88License: GPL-2.0+
     
    4848* WooCommerce HPOS
    4949* Product Filter by WBW (Swiper initializes for AJAX loaded products)
     50* GeneratePress Premium
    5051
    5152== Installation ==
     
    6465
    6566== Changelog ==
     67= 1.5.7 =
     68* Added option to enable/disable hover functionality when slider is disabled above breakpoint
     69* Updated breakpoint functionality to work properly with mobile-first approach
     70
    6671= 1.5.6 =
    6772* Added compatibility for GeneratePress Premium
  • product-gallery-swiper-for-woocommerce/trunk/admin/class-wdevs-gallery-swiper-admin.php

    r3313906 r3333160  
    5656
    5757    /**
     58     * Register the JavaScript for the admin area.
     59     *
     60     * @since    1.5.7
     61     */
     62    public function enqueue_scripts() {
     63        // Only load on WooCommerce settings page with our tab
     64        $page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
     65        $tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
     66       
     67        if ( $page === 'wc-settings' && $tab === 'wdevs_gallery_swiper' ) {
     68            wp_enqueue_script(
     69                $this->plugin_name . '-admin',
     70                plugin_dir_url( __FILE__ ) . 'js/wdevs-gallery-swiper-admin.js',
     71                array( 'jquery' ),
     72                $this->version,
     73                true
     74            );
     75        }
     76    }
     77
     78    /**
    5879     * @since 1.5.3
    5980     */
  • product-gallery-swiper-for-woocommerce/trunk/includes/class-wdevs-gallery-swiper-woocommerce.php

    r3313906 r3333160  
    6666        $this->current_section = isset( $_GET['section'] ) ? sanitize_text_field( $_GET['section'] ) : '';
    6767
    68         if ( is_admin() && isset( $_GET['page'] ) && $_GET['page'] === 'wc-settings' && isset( $_GET['tab'] ) && $_GET['tab'] === 'wdevs_gallery_swiper' ) {
     68        $page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
     69        $tab = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
     70       
     71        if ( is_admin() && $page === 'wc-settings' && $tab === 'wdevs_gallery_swiper' ) {
    6972            $this->handle_sections();
    7073        }
     
    141144                'name'    => __( 'Disable slider from', 'product-gallery-swiper-for-woocommerce' ),
    142145                'type'    => 'select',
    143                 'desc'    => __( 'When set, the slider will be disabled from the specified breakpoint upwards, and the second product image will be displayed on mouse hover.', 'product-gallery-swiper-for-woocommerce' ),
     146                'desc'    => __( 'When set, the slider will be disabled from the specified breakpoint upwards.', 'product-gallery-swiper-for-woocommerce' ),
    144147                'id'      => 'wdevs_gallery_swiper_breakpoint',
    145148                'options' => array(
     
    151154                ),
    152155                'default' => ''
     156            ),
     157            array(
     158                'name'    => __( 'Enable hover on disabled slider', 'product-gallery-swiper-for-woocommerce' ),
     159                'type'    => 'checkbox',
     160                'desc'    => __( 'When the slider is disabled (above breakpoint), show the second image on mouse hover.', 'product-gallery-swiper-for-woocommerce' ),
     161                'id'      => 'wdevs_gallery_swiper_hover_enabled',
     162                'default' => 'yes',
     163                'class'   => 'wdevs-gallery-swiper-hover-field'
    153164            ),
    154165            array(
  • product-gallery-swiper-for-woocommerce/trunk/includes/class-wdevs-gallery-swiper.php

    r3330676 r3333160  
    139139        $plugin_admin = new Wdevs_Gallery_Swiper_Admin( $this->get_plugin_name(), $this->get_version() );
    140140        $this->loader->add_filter( 'plugin_action_links_' . plugin_basename( dirname( __DIR__ ) . '/' . $this->plugin_name . '.php' ), $plugin_admin, 'add_action_links' );
    141         //$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
     141        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
    142142    }
    143143
  • product-gallery-swiper-for-woocommerce/trunk/languages/product-gallery-swiper-for-woocommerce-en_US.l10n.php

    r3313906 r3333160  
    11<?php
    22// generated by Poedit from product-gallery-swiper-for-woocommerce-en_US.po, do not edit directly
    3 return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=(n != 1);','language'=>'en_US','pot-creation-date'=>'2025-06-18 15:48+0200','po-revision-date'=>'2025-06-18 15:49+0200','translation-revision-date'=>'2025-06-18 15:49+0200','project-id-version'=>'Product Gallery Swiper for WooCommerce','x-generator'=>'Poedit 3.6','messages'=>['Settings'=>'Settings','This plugin requires WooCommerce. Please install and activate WooCommerce before activating this plugin.'=>'This plugin requires WooCommerce. Please install and activate WooCommerce before activating this plugin.','Gallery Swiper'=>'Gallery Swiper','Gallery Swiper settings'=>'Gallery Swiper settings','Customize the Gallery slider settings.'=>'Customize the Gallery slider  settings.','Enable scrollbar'=>'Enable scrollbar','Enable scrollbar for the slider'=>'Enable scrollbar for the slider','Enable pagination'=>'Enable pagination','Enable pagination for the slider'=>'Enable pagination for the slider','Enable navigation'=>'Enable navigation','Enable navigation for the slider'=>'Enable navigation for the slider','Enable variation images'=>'Enable variation images','Display variation images in the slider'=>'Display variation images in the slider','Disable slider from'=>'Disable slider from','When set, the slider will be disabled from the specified breakpoint upwards, and the second product image will be displayed on mouse hover.'=>'When set, the slider will be disabled from the specified breakpoint upwards, and the second product image will be displayed on mouse hover.','Always enabled'=>'Always enabled','Disabled from 480px and up'=>'Disabled from 480px and up','Disabled from 768px and up'=>'Disabled from 768px and up','Disabled from 992px and up'=>'Disabled from 992px and up','Disabled from 1200px and up'=>'Disabled from 1200px and up','Theme color'=>'Theme color','Choose the Swiper theme color'=>'Choose the Swiper theme color','Product Gallery Swiper for WooCommerce is developed by %s. Your trusted WordPress & WooCommerce plugin partner from the Netherlands.'=>'Product Gallery Swiper for WooCommerce is developed by %s. Your trusted WordPress & WooCommerce plugin partner from the Netherlands.','Documentation'=>'Documentation','Product Gallery Swiper for WooCommerce'=>'Product Gallery Swiper for WooCommerce','https://products.wijnberg.dev'=>'https://products.wijnberg.dev','Enhances WooCommerce product images display on product listing sections, providing a responsive and touch-friendly swiper.'=>'Enhances WooCommerce product images display on product listing sections, providing a responsive and touch-friendly swiper.','Wijnberg Developments'=>'Wijnberg Developments']];
     3return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=(n != 1);','language'=>'en_US','pot-creation-date'=>'2025-07-23 22:28+0200','po-revision-date'=>'2025-07-23 22:29+0200','translation-revision-date'=>'2025-07-23 22:29+0200','project-id-version'=>'Product Gallery Swiper for WooCommerce','x-generator'=>'Poedit 3.6','messages'=>['Settings'=>'Settings','This plugin requires WooCommerce. Please install and activate WooCommerce before activating this plugin.'=>'This plugin requires WooCommerce. Please install and activate WooCommerce before activating this plugin.','Gallery Swiper'=>'Gallery Swiper','Gallery Swiper settings'=>'Gallery Swiper settings','Customize the Gallery slider settings.'=>'Customize the Gallery slider  settings.','Enable scrollbar'=>'Enable scrollbar','Enable scrollbar for the slider'=>'Enable scrollbar for the slider','Enable pagination'=>'Enable pagination','Enable pagination for the slider'=>'Enable pagination for the slider','Enable navigation'=>'Enable navigation','Enable navigation for the slider'=>'Enable navigation for the slider','Enable variation images'=>'Enable variation images','Display variation images in the slider'=>'Display variation images in the slider','Disable slider from'=>'Disable slider from','When set, the slider will be disabled from the specified breakpoint upwards.'=>'When set, the slider will be disabled from the specified breakpoint upwards.','Always enabled'=>'Always enabled','Disabled from 480px and up'=>'Disabled from 480px and up','Disabled from 768px and up'=>'Disabled from 768px and up','Disabled from 992px and up'=>'Disabled from 992px and up','Disabled from 1200px and up'=>'Disabled from 1200px and up','Enable hover on disabled slider'=>'Enable hover on disabled slider','When the slider is disabled (above breakpoint), show the second image on mouse hover.'=>'When the slider is disabled (above breakpoint), show the second image on mouse hover.','Theme color'=>'Theme color','Choose the Swiper theme color'=>'Choose the Swiper theme color','Product Gallery Swiper for WooCommerce is developed by %s. Your trusted WordPress & WooCommerce plugin partner from the Netherlands.'=>'Product Gallery Swiper for WooCommerce is developed by %s. Your trusted WordPress & WooCommerce plugin partner from the Netherlands.','Documentation'=>'Documentation','Product Gallery Swiper for WooCommerce'=>'Product Gallery Swiper for WooCommerce','https://products.wijnberg.dev'=>'https://products.wijnberg.dev','Enhances WooCommerce product images display on product listing sections, providing a responsive and touch-friendly swiper.'=>'Enhances WooCommerce product images display on product listing sections, providing a responsive and touch-friendly swiper.','Wijnberg Developments'=>'Wijnberg Developments']];
  • product-gallery-swiper-for-woocommerce/trunk/languages/product-gallery-swiper-for-woocommerce-en_US.po

    r3313906 r3333160  
    33msgstr ""
    44"Project-Id-Version: Product Gallery Swiper for WooCommerce\n"
    5 "POT-Creation-Date: 2025-06-18 15:48+0200\n"
    6 "PO-Revision-Date: 2025-06-18 15:49+0200\n"
     5"POT-Creation-Date: 2025-07-23 22:28+0200\n"
     6"PO-Revision-Date: 2025-07-23 22:29+0200\n"
    77"Last-Translator: \n"
    88"Language-Team: \n"
     
    2323"X-Poedit-SearchPathExcluded-2: public/vendor\n"
    2424
    25 #: admin/class-wdevs-gallery-swiper-admin.php:62
    26 #: includes/class-wdevs-gallery-swiper-woocommerce.php:271
     25#: admin/class-wdevs-gallery-swiper-admin.php:83
     26#: includes/class-wdevs-gallery-swiper-woocommerce.php:282
    2727msgid "Settings"
    2828msgstr "Settings"
     
    3636"before activating this plugin."
    3737
    38 #: includes/class-wdevs-gallery-swiper-woocommerce.php:93
     38#: includes/class-wdevs-gallery-swiper-woocommerce.php:96
    3939msgid "Gallery Swiper"
    4040msgstr "Gallery Swiper"
    4141
    42 #: includes/class-wdevs-gallery-swiper-woocommerce.php:107
     42#: includes/class-wdevs-gallery-swiper-woocommerce.php:110
    4343msgid "Gallery Swiper settings"
    4444msgstr "Gallery Swiper settings"
    4545
    46 #: includes/class-wdevs-gallery-swiper-woocommerce.php:109
     46#: includes/class-wdevs-gallery-swiper-woocommerce.php:112
    4747msgid "Customize the Gallery slider settings."
    4848msgstr "Customize the Gallery slider  settings."
    4949
    50 #: includes/class-wdevs-gallery-swiper-woocommerce.php:113
     50#: includes/class-wdevs-gallery-swiper-woocommerce.php:116
    5151msgid "Enable scrollbar"
    5252msgstr "Enable scrollbar"
    5353
    54 #: includes/class-wdevs-gallery-swiper-woocommerce.php:115
     54#: includes/class-wdevs-gallery-swiper-woocommerce.php:118
    5555msgid "Enable scrollbar for the slider"
    5656msgstr "Enable scrollbar for the slider"
    5757
    58 #: includes/class-wdevs-gallery-swiper-woocommerce.php:120
     58#: includes/class-wdevs-gallery-swiper-woocommerce.php:123
    5959msgid "Enable pagination"
    6060msgstr "Enable pagination"
    6161
    62 #: includes/class-wdevs-gallery-swiper-woocommerce.php:122
     62#: includes/class-wdevs-gallery-swiper-woocommerce.php:125
    6363msgid "Enable pagination for the slider"
    6464msgstr "Enable pagination for the slider"
    6565
    66 #: includes/class-wdevs-gallery-swiper-woocommerce.php:127
     66#: includes/class-wdevs-gallery-swiper-woocommerce.php:130
    6767msgid "Enable navigation"
    6868msgstr "Enable navigation"
    6969
    70 #: includes/class-wdevs-gallery-swiper-woocommerce.php:129
     70#: includes/class-wdevs-gallery-swiper-woocommerce.php:132
    7171msgid "Enable navigation for the slider"
    7272msgstr "Enable navigation for the slider"
    7373
    74 #: includes/class-wdevs-gallery-swiper-woocommerce.php:134
     74#: includes/class-wdevs-gallery-swiper-woocommerce.php:137
    7575msgid "Enable variation images"
    7676msgstr "Enable variation images"
    7777
    78 #: includes/class-wdevs-gallery-swiper-woocommerce.php:136
     78#: includes/class-wdevs-gallery-swiper-woocommerce.php:139
    7979msgid "Display variation images in the slider"
    8080msgstr "Display variation images in the slider"
    8181
    82 #: includes/class-wdevs-gallery-swiper-woocommerce.php:141
     82#: includes/class-wdevs-gallery-swiper-woocommerce.php:144
    8383msgid "Disable slider from"
    8484msgstr "Disable slider from"
    8585
    86 #: includes/class-wdevs-gallery-swiper-woocommerce.php:143
     86#: includes/class-wdevs-gallery-swiper-woocommerce.php:146
    8787msgid ""
    88 "When set, the slider will be disabled from the specified breakpoint upwards, "
    89 "and the second product image will be displayed on mouse hover."
     88"When set, the slider will be disabled from the specified breakpoint upwards."
    9089msgstr ""
    91 "When set, the slider will be disabled from the specified breakpoint upwards, "
    92 "and the second product image will be displayed on mouse hover."
     90"When set, the slider will be disabled from the specified breakpoint upwards."
    9391
    94 #: includes/class-wdevs-gallery-swiper-woocommerce.php:146
     92#: includes/class-wdevs-gallery-swiper-woocommerce.php:149
    9593msgid "Always enabled"
    9694msgstr "Always enabled"
    9795
    98 #: includes/class-wdevs-gallery-swiper-woocommerce.php:147
     96#: includes/class-wdevs-gallery-swiper-woocommerce.php:150
    9997msgid "Disabled from 480px and up"
    10098msgstr "Disabled from 480px and up"
    10199
    102 #: includes/class-wdevs-gallery-swiper-woocommerce.php:148
     100#: includes/class-wdevs-gallery-swiper-woocommerce.php:151
    103101msgid "Disabled from 768px and up"
    104102msgstr "Disabled from 768px and up"
    105103
    106 #: includes/class-wdevs-gallery-swiper-woocommerce.php:149
     104#: includes/class-wdevs-gallery-swiper-woocommerce.php:152
    107105msgid "Disabled from 992px and up"
    108106msgstr "Disabled from 992px and up"
    109107
    110 #: includes/class-wdevs-gallery-swiper-woocommerce.php:150
     108#: includes/class-wdevs-gallery-swiper-woocommerce.php:153
    111109msgid "Disabled from 1200px and up"
    112110msgstr "Disabled from 1200px and up"
    113111
    114 #: includes/class-wdevs-gallery-swiper-woocommerce.php:155
     112#: includes/class-wdevs-gallery-swiper-woocommerce.php:158
     113msgid "Enable hover on disabled slider"
     114msgstr "Enable hover on disabled slider"
     115
     116#: includes/class-wdevs-gallery-swiper-woocommerce.php:160
     117msgid ""
     118"When the slider is disabled (above breakpoint), show the second image on "
     119"mouse hover."
     120msgstr ""
     121"When the slider is disabled (above breakpoint), show the second image on "
     122"mouse hover."
     123
     124#: includes/class-wdevs-gallery-swiper-woocommerce.php:166
    115125msgid "Theme color"
    116126msgstr "Theme color"
    117127
    118 #: includes/class-wdevs-gallery-swiper-woocommerce.php:157
     128#: includes/class-wdevs-gallery-swiper-woocommerce.php:168
    119129msgid "Choose the Swiper theme color"
    120130msgstr "Choose the Swiper theme color"
    121131
    122132#. translators: %s: Link to author site.
    123 #: includes/class-wdevs-gallery-swiper-woocommerce.php:196
     133#: includes/class-wdevs-gallery-swiper-woocommerce.php:207
    124134#, php-format
    125135msgid ""
     
    130140"WordPress & WooCommerce plugin partner from the Netherlands."
    131141
    132 #: includes/class-wdevs-gallery-swiper-woocommerce.php:245
     142#: includes/class-wdevs-gallery-swiper-woocommerce.php:256
    133143msgid "Documentation"
    134144msgstr "Documentation"
  • product-gallery-swiper-for-woocommerce/trunk/languages/product-gallery-swiper-for-woocommerce.pot

    r3313906 r3333160  
    33msgstr ""
    44"Project-Id-Version: Product Gallery Slider for WooCommerce\n"
    5 "POT-Creation-Date: 2025-06-18 15:48+0200\n"
     5"POT-Creation-Date: 2025-07-23 22:28+0200\n"
    66"PO-Revision-Date: 2024-08-17 16:29+0200\n"
    77"Last-Translator: \n"
     
    2323"X-Poedit-SearchPathExcluded-2: public/vendor\n"
    2424
    25 #: admin/class-wdevs-gallery-swiper-admin.php:62
    26 #: includes/class-wdevs-gallery-swiper-woocommerce.php:271
     25#: admin/class-wdevs-gallery-swiper-admin.php:83
     26#: includes/class-wdevs-gallery-swiper-woocommerce.php:282
    2727msgid "Settings"
    2828msgstr ""
     
    3434msgstr ""
    3535
    36 #: includes/class-wdevs-gallery-swiper-woocommerce.php:93
     36#: includes/class-wdevs-gallery-swiper-woocommerce.php:96
    3737msgid "Gallery Swiper"
    3838msgstr ""
    3939
    40 #: includes/class-wdevs-gallery-swiper-woocommerce.php:107
     40#: includes/class-wdevs-gallery-swiper-woocommerce.php:110
    4141msgid "Gallery Swiper settings"
    4242msgstr ""
    4343
    44 #: includes/class-wdevs-gallery-swiper-woocommerce.php:109
     44#: includes/class-wdevs-gallery-swiper-woocommerce.php:112
    4545msgid "Customize the Gallery slider settings."
    4646msgstr ""
    4747
    48 #: includes/class-wdevs-gallery-swiper-woocommerce.php:113
     48#: includes/class-wdevs-gallery-swiper-woocommerce.php:116
    4949msgid "Enable scrollbar"
    5050msgstr ""
    5151
    52 #: includes/class-wdevs-gallery-swiper-woocommerce.php:115
     52#: includes/class-wdevs-gallery-swiper-woocommerce.php:118
    5353msgid "Enable scrollbar for the slider"
    5454msgstr ""
    5555
    56 #: includes/class-wdevs-gallery-swiper-woocommerce.php:120
     56#: includes/class-wdevs-gallery-swiper-woocommerce.php:123
    5757msgid "Enable pagination"
    5858msgstr ""
    5959
    60 #: includes/class-wdevs-gallery-swiper-woocommerce.php:122
     60#: includes/class-wdevs-gallery-swiper-woocommerce.php:125
    6161msgid "Enable pagination for the slider"
    6262msgstr ""
    6363
    64 #: includes/class-wdevs-gallery-swiper-woocommerce.php:127
     64#: includes/class-wdevs-gallery-swiper-woocommerce.php:130
    6565msgid "Enable navigation"
    6666msgstr ""
    6767
    68 #: includes/class-wdevs-gallery-swiper-woocommerce.php:129
     68#: includes/class-wdevs-gallery-swiper-woocommerce.php:132
    6969msgid "Enable navigation for the slider"
    7070msgstr ""
    7171
    72 #: includes/class-wdevs-gallery-swiper-woocommerce.php:134
     72#: includes/class-wdevs-gallery-swiper-woocommerce.php:137
    7373msgid "Enable variation images"
    7474msgstr ""
    7575
    76 #: includes/class-wdevs-gallery-swiper-woocommerce.php:136
     76#: includes/class-wdevs-gallery-swiper-woocommerce.php:139
    7777msgid "Display variation images in the slider"
    7878msgstr ""
    7979
    80 #: includes/class-wdevs-gallery-swiper-woocommerce.php:141
     80#: includes/class-wdevs-gallery-swiper-woocommerce.php:144
    8181msgid "Disable slider from"
    8282msgstr ""
    8383
    84 #: includes/class-wdevs-gallery-swiper-woocommerce.php:143
     84#: includes/class-wdevs-gallery-swiper-woocommerce.php:146
    8585msgid ""
    86 "When set, the slider will be disabled from the specified breakpoint upwards, "
    87 "and the second product image will be displayed on mouse hover."
     86"When set, the slider will be disabled from the specified breakpoint upwards."
    8887msgstr ""
    8988
    90 #: includes/class-wdevs-gallery-swiper-woocommerce.php:146
     89#: includes/class-wdevs-gallery-swiper-woocommerce.php:149
    9190msgid "Always enabled"
    9291msgstr ""
    9392
    94 #: includes/class-wdevs-gallery-swiper-woocommerce.php:147
     93#: includes/class-wdevs-gallery-swiper-woocommerce.php:150
    9594msgid "Disabled from 480px and up"
    9695msgstr ""
    9796
    98 #: includes/class-wdevs-gallery-swiper-woocommerce.php:148
     97#: includes/class-wdevs-gallery-swiper-woocommerce.php:151
    9998msgid "Disabled from 768px and up"
    10099msgstr ""
    101100
    102 #: includes/class-wdevs-gallery-swiper-woocommerce.php:149
     101#: includes/class-wdevs-gallery-swiper-woocommerce.php:152
    103102msgid "Disabled from 992px and up"
    104103msgstr ""
    105104
    106 #: includes/class-wdevs-gallery-swiper-woocommerce.php:150
     105#: includes/class-wdevs-gallery-swiper-woocommerce.php:153
    107106msgid "Disabled from 1200px and up"
    108107msgstr ""
    109108
    110 #: includes/class-wdevs-gallery-swiper-woocommerce.php:155
     109#: includes/class-wdevs-gallery-swiper-woocommerce.php:158
     110msgid "Enable hover on disabled slider"
     111msgstr ""
     112
     113#: includes/class-wdevs-gallery-swiper-woocommerce.php:160
     114msgid ""
     115"When the slider is disabled (above breakpoint), show the second image on "
     116"mouse hover."
     117msgstr ""
     118
     119#: includes/class-wdevs-gallery-swiper-woocommerce.php:166
    111120msgid "Theme color"
    112121msgstr ""
    113122
    114 #: includes/class-wdevs-gallery-swiper-woocommerce.php:157
     123#: includes/class-wdevs-gallery-swiper-woocommerce.php:168
    115124msgid "Choose the Swiper theme color"
    116125msgstr ""
    117126
    118127#. translators: %s: Link to author site.
    119 #: includes/class-wdevs-gallery-swiper-woocommerce.php:196
     128#: includes/class-wdevs-gallery-swiper-woocommerce.php:207
    120129#, php-format
    121130msgid ""
     
    124133msgstr ""
    125134
    126 #: includes/class-wdevs-gallery-swiper-woocommerce.php:245
     135#: includes/class-wdevs-gallery-swiper-woocommerce.php:256
    127136msgid "Documentation"
    128137msgstr ""
  • product-gallery-swiper-for-woocommerce/trunk/public/class-wdevs-gallery-swiper-public.php

    r3332885 r3333160  
    109109                'navigation' => get_option( 'wdevs_gallery_swiper_navigation', 'no' ) === 'yes',
    110110                'breakpoint' => $this->parse_breakpoint( get_option( 'wdevs_gallery_swiper_breakpoint', '' ) ),
     111                'hoverEnabled' => get_option( 'wdevs_gallery_swiper_hover_enabled', 'yes' ) === 'yes',
    111112            ]
    112113        ];
     
    202203        // GeneratePress Premium compatibility. Adjust gallery rendering timing for image wrapper conflict
    203204        if ( function_exists( 'generatepress_wc_image_wrapper_close' ) ) {
     205            remove_action( 'woocommerce_before_shop_loop_item_title', [ $this, 'start_gallery_rendering' ], PHP_INT_MIN );
     206            add_action( 'woocommerce_before_shop_loop_item_title', [ $this, 'start_gallery_rendering' ], 9 );
    204207            remove_action( 'woocommerce_before_shop_loop_item_title', [ $this, 'finish_gallery_rendering' ], PHP_INT_MAX );
    205             add_action( 'woocommerce_shop_loop_item_title', [ $this, 'finish_gallery_rendering' ], 9 );
     208            add_action( 'woocommerce_shop_loop_item_title', [ $this, 'finish_gallery_rendering' ], 7 );
    206209        }
    207210    }
  • product-gallery-swiper-for-woocommerce/trunk/public/js/wdevs-gallery-swiper-public.js

    r3164436 r3333160  
    2727                    [ window.wgsSettings.swiper.breakpoint ]: {
    2828                        enabled: false,
     29                        scrollbar: { enabled: false },
     30                        pagination: { enabled: false },
     31                        navigation: { enabled: false },
    2932                    },
    3033                };
     
    3336            const swiper = new Swiper( swiperElement, swiperOptions );
    3437
    35             if ( window.wgsSettings.swiper.breakpoint ) {
     38            if (
     39                window.wgsSettings.swiper.breakpoint &&
     40                window.wgsSettings.swiper.hoverEnabled &&
     41                swiper.slides.length > 1
     42            ) {
    3643                swiperElement.addEventListener( 'mouseenter', function () {
    3744                    if (
    38                         swiper.activeIndex === 0 &&
    39                         swiper.slides.length > 1
     45                        window.innerWidth >=
     46                            window.wgsSettings.swiper.breakpoint &&
     47                        swiper.activeIndex === 0
    4048                    ) {
    4149                        const defaultStatus = swiper.enabled;
     
    4351                        swiper.enabled = true;
    4452                        swiper.slideTo( 1, 0 );
    45 
    4653                        swiper.enabled = defaultStatus;
    4754                    }
    4855                } );
    4956                swiperElement.addEventListener( 'mouseleave', function () {
    50                     if ( swiper.activeIndex !== 0 ) {
     57                    if (
     58                        window.innerWidth >=
     59                            window.wgsSettings.swiper.breakpoint &&
     60                        swiper.activeIndex !== 0
     61                    ) {
    5162                        const defaultStatus = swiper.enabled;
    5263
    5364                        swiper.enabled = true;
    5465                        swiper.slideTo( 0, 0 );
    55 
    5666                        swiper.enabled = defaultStatus;
    5767                    }
     
    7787                navigation: false,
    7888                breakpoint: null,
     89                hoverEnabled: true,
    7990            },
    8091        };
  • product-gallery-swiper-for-woocommerce/trunk/wdevs-gallery-swiper.php

    r3332885 r3333160  
    1717 * Plugin URI:           https://products.wijnberg.dev
    1818 * Description:          Enhances WooCommerce product images display on product listing sections, providing a responsive and touch-friendly swiper.
    19  * Version:              1.5.6
     19 * Version:              1.5.7
    2020 * Author:               Wijnberg Developments
    2121 * License:              GPL-2.0+
     
    4141 * Rename this for your plugin and update it as you release new versions.
    4242 */
    43 define( 'WDEVS_GALLERY_SWIPER_VERSION', '1.5.6' );
     43define( 'WDEVS_GALLERY_SWIPER_VERSION', '1.5.7' );
    4444
    4545/**
Note: See TracChangeset for help on using the changeset viewer.