Version Description
Download this release
Release Info
| Developer | cbaldelomar |
| Plugin | |
| Version | 1.46 |
| Comparing to | |
| See all releases | |
Code changes from version 1.45 to 1.46
- README.md +1 -1
- includes/js/gallery.js +22 -5
- readme.txt +1 -1
- wc-gallery.php +2 -2
README.md
CHANGED
|
@@ -46,7 +46,7 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
|
|
| 46 |
|
| 47 |
## Changelog ##
|
| 48 |
|
| 49 |
-
### Version 1.
|
| 50 |
|
| 51 |
* Fixed bug with masonry being randomely sorted
|
| 52 |
|
| 46 |
|
| 47 |
## Changelog ##
|
| 48 |
|
| 49 |
+
### Version 1.46
|
| 50 |
|
| 51 |
* Fixed bug with masonry being randomely sorted
|
| 52 |
|
includes/js/gallery.js
CHANGED
|
@@ -7,6 +7,24 @@
|
|
| 7 |
( function( $ ) {
|
| 8 |
"use strict";
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
var body = $( 'body' ),
|
| 11 |
_window = $( window );
|
| 12 |
|
|
@@ -67,14 +85,13 @@
|
|
| 67 |
var $container = $(this);
|
| 68 |
var $posts = $container.children('.gallery-item');
|
| 69 |
|
|
|
|
|
|
|
| 70 |
// keeps the media elements from calculating for the full width of the post
|
| 71 |
runMasonry(0, $container, $posts);
|
| 72 |
|
| 73 |
-
//
|
| 74 |
-
$
|
| 75 |
-
// masonry does its thing
|
| 76 |
-
$container.masonry('layout');
|
| 77 |
-
});
|
| 78 |
|
| 79 |
$(window).resize(function() {
|
| 80 |
runMasonry(0, $container, $posts);
|
| 7 |
( function( $ ) {
|
| 8 |
"use strict";
|
| 9 |
|
| 10 |
+
$.fn.wcGalleryMasonryImagesReveal = function( $items ) {
|
| 11 |
+
var msnry = this.data('masonry');
|
| 12 |
+
|
| 13 |
+
$.each( $items, function( key, item ) {
|
| 14 |
+
var $item = $(this);
|
| 15 |
+
|
| 16 |
+
$item.imagesLoaded().always( function( instance ) {
|
| 17 |
+
// un-hide item
|
| 18 |
+
$item.show();
|
| 19 |
+
|
| 20 |
+
// masonry does its thing
|
| 21 |
+
msnry.layout();
|
| 22 |
+
});
|
| 23 |
+
});
|
| 24 |
+
|
| 25 |
+
return this;
|
| 26 |
+
};
|
| 27 |
+
|
| 28 |
var body = $( 'body' ),
|
| 29 |
_window = $( window );
|
| 30 |
|
| 85 |
var $container = $(this);
|
| 86 |
var $posts = $container.children('.gallery-item');
|
| 87 |
|
| 88 |
+
$posts.hide();
|
| 89 |
+
|
| 90 |
// keeps the media elements from calculating for the full width of the post
|
| 91 |
runMasonry(0, $container, $posts);
|
| 92 |
|
| 93 |
+
// we are going to append masonry items as the images load
|
| 94 |
+
$container.wcGalleryMasonryImagesReveal( $posts );
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
$(window).resize(function() {
|
| 97 |
runMasonry(0, $container, $posts);
|
readme.txt
CHANGED
|
@@ -46,7 +46,7 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
|
|
| 46 |
|
| 47 |
== Changelog ==
|
| 48 |
|
| 49 |
-
= Version 1.
|
| 50 |
|
| 51 |
* Fixed bug with masonry being randomely sorted
|
| 52 |
|
| 46 |
|
| 47 |
== Changelog ==
|
| 48 |
|
| 49 |
+
= Version 1.46 =
|
| 50 |
|
| 51 |
* Fixed bug with masonry being randomely sorted
|
| 52 |
|
wc-gallery.php
CHANGED
|
@@ -5,7 +5,7 @@ Plugin URI: http://wordpresscanvas.com/features/gallery/
|
|
| 5 |
Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 6 |
Author: Chris Baldelomar
|
| 7 |
Author URI: http://webplantmedia.com/
|
| 8 |
-
Version: 1.
|
| 9 |
License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
|
@@ -13,7 +13,7 @@ function wc_gallery_using_woocommerce() {
|
|
| 13 |
return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
|
| 14 |
}
|
| 15 |
|
| 16 |
-
define( 'WC_GALLERY_VERSION', '1.
|
| 17 |
define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
|
| 18 |
define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
|
| 19 |
define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
| 5 |
Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 6 |
Author: Chris Baldelomar
|
| 7 |
Author URI: http://webplantmedia.com/
|
| 8 |
+
Version: 1.46
|
| 9 |
License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
| 13 |
return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
|
| 14 |
}
|
| 15 |
|
| 16 |
+
define( 'WC_GALLERY_VERSION', '1.46' );
|
| 17 |
define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
|
| 18 |
define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
|
| 19 |
define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
