Changeset 1221189
- Timestamp:
- 08/14/2015 07:31:17 PM (11 years ago)
- Location:
- lazyload-woocommerce
- Files:
-
- 8 added
- 2 edited
-
tags/1.1.1 (added)
-
tags/1.1.1/css (added)
-
tags/1.1.1/css/lazy.css (added)
-
tags/1.1.1/js (added)
-
tags/1.1.1/js/call-ll.js (added)
-
tags/1.1.1/js/jquery.lazyload.min.js (added)
-
tags/1.1.1/lazyload-woocommerce.php (added)
-
tags/1.1.1/readme.txt (added)
-
trunk/lazyload-woocommerce.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lazyload-woocommerce/trunk/lazyload-woocommerce.php
r1221148 r1221189 5 5 Plugin URI: https://wordpress.org/plugins/lazyload-woocommerce/ 6 6 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 8 8 Author: Edge Webware 9 9 Author URI: http://edgewebware.com … … 47 47 $settings_slider = array(); 48 48 // 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'); 50 54 // Add first checkbox option 51 55 $settings_slider[] = array( … … 54 58 'id' => 'lazyload-woo_width', 55 59 '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'), 57 61 ); 58 62 // Add second text field option … … 62 66 'id' => 'lazyload-woo_height', 63 67 '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'), 65 69 ); 66 70 $settings_slider[] = array( … … 101 105 102 106 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'); 104 108 $llwoo_placeholder = get_option('lazyload-woo_placeholder'); 105 109 $llwoo_placeholder_fallback = woocommerce_placeholder_img_src(); -
lazyload-woocommerce/trunk/readme.txt
r1221148 r1221189 4 4 Requires at least: 4.0.0 5 5 Tested up to: 4.3 6 Stable tag: 1.1 6 Stable tag: 1.1.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 16 16 1. Download the plugin 17 17 2. 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). 18 3. Go to WooCommerce > Settings > Products and click the "Lazy Load" option. 19 4. 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). 19 20 20 21 To 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');` … … 23 24 24 25 == Screenshots == 25 1. Setting up the variable width/height for the products that will be used for LazyLoad .26 1. Setting up the variable width/height for the products that will be used for LazyLoad (match shop catalog image dimensions). 26 27 27 28 == Changelog == 29 = 1.1.1 = 30 * Fixed: `$llwoo_image_src` so it would match the shop catalog dimensions. 31 28 32 = 1.1 = 29 33 * Tested against WP 4.3 RC1
Note: See TracChangeset
for help on using the changeset viewer.