Plugin Directory

Changeset 1221189


Ignore:
Timestamp:
08/14/2015 07:31:17 PM (11 years ago)
Author:
edgewebware
Message:

Fixed image settings so it will pull in the shop_image image (will also reduce load because it will be exact and cropped).

Location:
lazyload-woocommerce
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • lazyload-woocommerce/trunk/lazyload-woocommerce.php

    r1221148 r1221189  
    55  Plugin URI: https://wordpress.org/plugins/lazyload-woocommerce/
    66  Description: Lazy Load for WooCommerce includes the functionality to properly append Lazy Load into the image loop for WooCommerce in product listings (i.e. category). This does not apply to the individual product image, but anywhere they are used in the loop (by default, the unordered list). Includes a fallback if JavaScript is not active. Does not call in jQuery (you must have this already in use).
    7   Version: 1.1
     7  Version: 1.1.1
    88  Author: Edge Webware
    99  Author URI: http://edgewebware.com
     
    4747        $settings_slider = array();
    4848        // Add Title to the Settings
    49         $settings_slider[] = array('name' => __('Lazy Load Image Settings', 'lazyload-woo'), 'type' => 'title', 'desc' => __('The following options are used to configure LazyLoad for WooCommerce. It is recommended that these match your set catalog image dimensions under Display.', 'lazyload-woo'), 'id' => 'lazywoo');
     49        $settings_slider[] = array(
     50            'name' => __('Lazy Load Image Settings', 'lazyload-woo'),
     51            'type' => 'title',
     52            'desc' => __('The following options are used to configure LazyLoad for WooCommerce. It is recommended that these match your set catalog image dimensions under Display since that is the image we pull in.', 'lazyload-woo'),
     53            'id' => 'lazywoo');
    5054        // Add first checkbox option
    5155        $settings_slider[] = array(
     
    5458            'id' => 'lazyload-woo_width',
    5559            'type' => 'text',
    56             'desc' => __('This will set the width for your catalog images', 'lazyload-woo'),
     60            'desc' => __('Use the value from the shop catalog image width', 'lazyload-woo'),
    5761        );
    5862        // Add second text field option
     
    6266            'id' => 'lazyload-woo_height',
    6367            'type' => 'text',
    64             'desc' => __('This will set the height for your catalog images', 'lazyload-woo'),
     68            'desc' => __('Use the value from the shop catalog image height', 'lazyload-woo'),
    6569        );
    6670        $settings_slider[] = array(
     
    101105
    102106    function woocommerce_template_loop_product_thumbnail() {
    103         $llwoo_image_src = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full');
     107        $llwoo_image_src = wp_get_attachment_image_src(get_post_thumbnail_id(), 'shop_catalog');
    104108        $llwoo_placeholder = get_option('lazyload-woo_placeholder');
    105109        $llwoo_placeholder_fallback = woocommerce_placeholder_img_src();
  • lazyload-woocommerce/trunk/readme.txt

    r1221148 r1221189  
    44Requires at least: 4.0.0
    55Tested up to: 4.3
    6 Stable tag: 1.1
     6Stable tag: 1.1.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    16161. Download the plugin
    17172. Install the plugin
    18 3. Go to WooCommerce > Settings > Products and click the "Lazy Load" option. Set your Product width/height for the loop and optionally a custom placeholder image (full src).
     183. Go to WooCommerce > Settings > Products and click the "Lazy Load" option.
     194. Set your Product width/height for the loop and optionally a custom placeholder image (full src). Your width/height should match your shop_catalog (so they have the right crops).
    1920
    2021To note, you will need to have jQuery running for this to work. To reduce conflicts, we have chosen not to include jQuery. To include jQuery, just use the following in your template functions file: `wp_enqueue_script('jquery');`
     
    2324
    2425== Screenshots ==
    25 1. Setting up the variable width/height for the products that will be used for LazyLoad.
     261. Setting up the variable width/height for the products that will be used for LazyLoad (match shop catalog image dimensions).
    2627
    2728== Changelog ==
     29= 1.1.1 =
     30* Fixed: `$llwoo_image_src` so it would match the shop catalog dimensions.
     31
    2832= 1.1 =
    2933* Tested against WP 4.3 RC1
Note: See TracChangeset for help on using the changeset viewer.