Plugin Directory

Changeset 3418407


Ignore:
Timestamp:
12/12/2025 04:22:23 PM (4 months ago)
Author:
nitramix
Message:

2.2

  • Added: Added basic support for Blocksy theme

Release date: December 12, 2025

Location:
video-wc-gallery
Files:
97 added
4 edited

Legend:

Unmodified
Added
Removed
  • video-wc-gallery/trunk/functions/theme-supports.php

    r3254550 r3418407  
    1313 * Active theme checker for different logic
    1414 *
    15  * @since 1.18
     15 * @since 2.2
    1616 */
    1717function vwg_active_theme_checker()
     
    2020    if (function_exists('flatsome_setup') || stripos(wp_get_theme()->get('Name'), 'Flatsome') !== false) {
    2121        $use_different_logic = 'Flatsome';
     22    } elseif (function_exists('blocksy') || defined('BLOCKSY_VERSION') || class_exists('Blocksy_Manager')) {
     23        $use_different_logic = 'Blocksy';
    2224    } else {
    2325        $use_different_logic = 'default';
     
    3133 * Overwrite woocommerce templates for different themes
    3234 *
    33  * @since 1.18
     35 * @since 2.2
    3436 */
    3537function vwg_custom_wc_template_overwrite_for_themes($located, $template_name, $args, $template_path, $default_path)
     
    4850                $located = VWG_VIDEO_WOO_GALLERY_DIR . 'woocommerce-overwrite/templates/single-product/flatsome/product-gallery-thumbnails-flatsome-theme.php';
    4951            }
     52        } elseif (vwg_active_theme_checker() === 'Blocksy') {
     53            if ($template_name === 'single-product/product-image.php') {
     54                // Use our default Woo template (contains the video-first hook)
     55                $located = VWG_VIDEO_WOO_GALLERY_DIR . 'woocommerce-overwrite/templates/single-product/product-image.php';
     56            }
    5057        }
    5158    } else {
     
    6269
    6370/**
    64  * Modify part template for theme
     71 * Flatsome Modify part template for theme
    6572 *
    6673 * @since 1.18
     
    8289add_filter('wc_get_template_part', 'vwg_wc_template_part_modify', 10, 3);
    8390
     91
     92
     93/**
     94 * Blocksy compatibility: force default Woo gallery when product has videos
     95 *
     96 * @since 2.2
     97 */
     98function vwg_blocksy_force_default_gallery( $use_default ) {
     99    $is_blocksy = function_exists( 'blocksy' ) || defined( 'BLOCKSY_VERSION' ) || class_exists( 'Blocksy_Manager' );
     100    if ( ! $is_blocksy ) {
     101        return $use_default;
     102    }
     103
     104    $opt = get_option('vwg_settings_group');
     105    if ( isset($opt['vwg_settings_show_first']) && $opt['vwg_settings_show_first'] == 1 ) {
     106        return true;
     107    }
     108
     109    global $product;
     110    if ( ! is_object( $product ) ) {
     111        $product = wc_get_product( get_the_ID() );
     112    }
     113
     114    if ( ! is_object( $product ) || ! method_exists( $product, 'get_id' ) ) {
     115        return $use_default;
     116    }
     117
     118    $videos = get_post_meta( $product->get_id(), 'vwg_video_url', true );
     119    if ( ! empty( $videos ) ) {
     120        return true;
     121    }
     122
     123    return $use_default;
     124}
     125add_filter( 'blocksy:woocommerce:product-view:use-default', 'vwg_blocksy_force_default_gallery', 5, 1 );
     126
     127/**
     128 * Blocksy: override gallery content with our template when show_first or videos exist
     129 *
     130 * @since 2.2
     131 */
     132function vwg_blocksy_gallery_override_content( $content, $product, $gallery_images, $is_single ) {
     133    if ( vwg_active_theme_checker() !== 'Blocksy' ) {
     134        return $content;
     135    }
     136
     137    $opt = get_option('vwg_settings_group');
     138    $show_first = isset($opt['vwg_settings_show_first']) && $opt['vwg_settings_show_first'] == 1;
     139
     140    $has_videos = ( is_object( $product ) && method_exists( $product, 'get_id' ) )
     141        ? get_post_meta( $product->get_id(), 'vwg_video_url', true )
     142        : '';
     143
     144    if ( ! $show_first && empty( $has_videos ) ) {
     145        return $content;
     146    }
     147
     148    ob_start();
     149    wc_get_template(
     150        'single-product/product-image.php',
     151        array(),
     152        '',
     153        VWG_VIDEO_WOO_GALLERY_DIR
     154    );
     155    return ob_get_clean();
     156}
     157add_filter( 'blocksy:woocommerce:product-view:content', 'vwg_blocksy_gallery_override_content', 5, 4 );
     158
  • video-wc-gallery/trunk/includes/js/vwg-pricing.js

    r3415839 r3418407  
    22
    33    /**
    4      * @since 2.1 Function show modal pricing info
     4     * @since 2.2 Function show modal pricing info
    55     */
    66    const selectorTrigger = [
     
    122122                           <i class="fas fa-undo-alt"></i>
    123123                       </div>
    124                        <h3>14-Day Money Back Guarantee</h3>
    125                        <p>If you're not satisfied, we offer a full refund within 14 days. No questions asked.</p>
     124                       <h3>7-Days Money Back Guarantee</h3>
     125                       <p>If you're not satisfied, we offer a full refund within 7 days. No questions asked.</p>
    126126                   </div>
    127127               </div>
  • video-wc-gallery/trunk/readme.txt

    r3415839 r3418407  
    66Tested up to: 6.9
    77Requires PHP: 7.4
    8 Stable tag: 2.1
     8Stable tag: 2.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3232
    3333**FREE Version Limitations:**
     34*   Limited to 20 products with video
    3435*   Limited to 2 videos per product
    3536*   WordPress Media Library videos only (no YouTube support)
    3637*   Basic video icons only
    3738*   Basic thumbnail generation
     39*   Basic SEO video
    3840
    3941**🚀 Upgrade to PRO Version:**
     
    4143
    4244**PRO Version Features:**
     45*   **Unlimited products with video
    4346*   **Up to 6 videos per product** - Showcase products from multiple angles
    4447*   **YouTube video integration** - Embed videos directly from YouTube
     
    9497Video Gallery for WooCommerce is compatible with most WordPress themes and plugins, although some may require additional customization. It is designed to seamlessly integrate with Woocommerce, ensuring a smooth user experience.
    9598= Is there a PRO version with more features? =
    96 Yes! The PRO version unlocks advanced features including up to 6 videos per product, YouTube integration, custom SVG icons, optimized thumbnails, SEO settings, and priority support. Visit [Video Gallery for WooCommerce PRO](https://nitramix.com/projects/video-gallery-for-woocommerce/) to learn more and purchase.
     99Yes! The PRO version unlocks advanced features including Unlimited products with video, up to 6 videos per product, YouTube integration, custom SVG icons, optimized thumbnails, SEO settings, and priority support. Visit [Video Gallery for WooCommerce PRO](https://nitramix.com/projects/video-gallery-for-woocommerce/) to learn more and purchase.
    97100= What's the difference between FREE and PRO versions? =
    98 The FREE version supports basic video functionality with up to 2 videos per product. The PRO version includes unlimited videos, YouTube support, custom icons, advanced SEO, and premium support.
     101The FREE version supports basic video functionality with limit 20 products with vide and up to 2 videos per product. The PRO version includes unlimited videos, YouTube support, custom icons, advanced SEO, and premium support.
    99102
    100103== Screenshots ==
     
    109112
    110113== Changelog ==
     114
     115= 2.2 =
     116* **Added:** Added basic support for Blocksy theme
     117**Release date: December 12, 2025**
    111118
    112119= 2.1 =
  • video-wc-gallery/trunk/video-wc-gallery.php

    r3415839 r3418407  
    77 * Author URI: https://nitramix.com/
    88 * Requires Plugins: woocommerce
    9  * Version: 2.1
     9 * Version: 2.2
    1010 * Text Domain: video-wc-gallery
    1111 * Domain Path: /languages
     
    2020 * Define constants
    2121 *
    22  * @since 2.1
     22 * @since 2.2
    2323 */
    24 if ( ! defined( 'VWG_VERSION_NUM' ) )           define( 'VWG_VERSION_NUM'           , '2.1' ); // Plugin version constant
     24if ( ! defined( 'VWG_VERSION_NUM' ) )           define( 'VWG_VERSION_NUM'           , '2.2' ); // Plugin version constant
    2525if ( ! defined( 'VWG_VIDEO_WOO_GALLERY' ) )     define( 'VWG_VIDEO_WOO_GALLERY'     , trim( dirname( plugin_basename( __FILE__ ) ), '/' ) ); // Name of the plugin folder eg - 'video-wc-gallery'
    2626if ( ! defined( 'VWG_VIDEO_WOO_GALLERY_DIR' ) ) define( 'VWG_VIDEO_WOO_GALLERY_DIR' , plugin_dir_path( __FILE__ ) ); // Plugin directory absolute path with the trailing slash. Useful for using with includes eg - /var/www/html/wp-content/plugins/video-wc-gallery/
Note: See TracChangeset for help on using the changeset viewer.