Version Description
Download this release
Release Info
| Developer | cbaldelomar |
| Plugin | |
| Version | 1.63 |
| Comparing to | |
| See all releases | |
Code changes from version 1.62 to 1.63
- README.md +4 -0
- includes/css/style.css +88 -0
- includes/functions.php +69 -4
- readme.txt +4 -0
- wc-gallery.php +2 -2
README.md
CHANGED
|
@@ -67,6 +67,10 @@ For more tutorials on our gallery plugin, go to our knowledge base.
|
|
| 67 |
|
| 68 |
## Changelog ##
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
### Version 1.62 ###
|
| 71 |
|
| 72 |
* disabled jetpack gallery message when plugin is activated
|
| 67 |
|
| 68 |
## Changelog ##
|
| 69 |
|
| 70 |
+
### Version 1.63 ###
|
| 71 |
+
|
| 72 |
+
* added grid display
|
| 73 |
+
|
| 74 |
### Version 1.62 ###
|
| 75 |
|
| 76 |
* disabled jetpack gallery message when plugin is activated
|
includes/css/style.css
CHANGED
|
@@ -10,6 +10,9 @@
|
|
| 10 |
* [gallery]
|
| 11 |
* ----------------------------------------------------------------------------
|
| 12 |
*/
|
|
|
|
|
|
|
|
|
|
| 13 |
.wc-gallery .gallery {
|
| 14 |
margin-bottom: 0px;
|
| 15 |
margin-left: 0px;
|
|
@@ -151,6 +154,88 @@
|
|
| 151 |
.wc-gallery-captions-onhover .gallery-item:hover .gallery-caption {
|
| 152 |
display: block;
|
| 153 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
@media screen and (max-width: 568px) {
|
| 156 |
body .wc-gallery-captions-onpopup .gallery-caption,
|
|
@@ -169,6 +254,9 @@
|
|
| 169 |
body .wc-gallery .wc-image-links-bottomlinks {
|
| 170 |
margin: 0;
|
| 171 |
}
|
|
|
|
|
|
|
|
|
|
| 172 |
}
|
| 173 |
/**
|
| 174 |
* Image Links
|
| 10 |
* [gallery]
|
| 11 |
* ----------------------------------------------------------------------------
|
| 12 |
*/
|
| 13 |
+
.wc-gallery {
|
| 14 |
+
overflow: hidden;
|
| 15 |
+
}
|
| 16 |
.wc-gallery .gallery {
|
| 17 |
margin-bottom: 0px;
|
| 18 |
margin-left: 0px;
|
| 154 |
.wc-gallery-captions-onhover .gallery-item:hover .gallery-caption {
|
| 155 |
display: block;
|
| 156 |
}
|
| 157 |
+
.gallery-grid .gallery-item-wrapper {
|
| 158 |
+
float: left;
|
| 159 |
+
text-align: center;
|
| 160 |
+
}
|
| 161 |
+
.gallery-grid .gallery-item-wrapper .gallery-item {
|
| 162 |
+
width: auto;
|
| 163 |
+
}
|
| 164 |
+
.gallery-grid.gallery-columns-1 .gallery-item-wrapper { width: 100%; }
|
| 165 |
+
.gallery-grid.gallery-columns-2 .gallery-item-wrapper { width: 50%; }
|
| 166 |
+
.gallery-grid.gallery-columns-3 .gallery-item-wrapper { width: 33.33333%; }
|
| 167 |
+
.gallery-grid.gallery-columns-4 .gallery-item-wrapper { width: 25%; }
|
| 168 |
+
.gallery-grid.gallery-columns-5 .gallery-item-wrapper { width: 20%; }
|
| 169 |
+
.gallery-grid.gallery-columns-6 .gallery-item-wrapper { width: 16.66666%; }
|
| 170 |
+
.gallery-grid.gallery-columns-7 .gallery-item-wrapper { width: 14.28571%; }
|
| 171 |
+
.gallery-grid.gallery-columns-8 .gallery-item-wrapper { width: 12.5%; }
|
| 172 |
+
.gallery-grid.gallery-columns-9 .gallery-item-wrapper { width: 11.11111%; }
|
| 173 |
+
|
| 174 |
+
.gallery-grid .gallery-item-column-1 { clear: both; }
|
| 175 |
+
|
| 176 |
+
.gallery-grid.wc-gallery-gutter-1 .gallery-item { margin-right: 1px; margin-bottom: 1px; }
|
| 177 |
+
.gallery-grid.wc-gallery-gutter-1 { margin-right: -1px; }
|
| 178 |
+
.gallery-grid.wc-gallery-gutter-2 .gallery-item { margin-right: 2px; margin-bottom: 2px; }
|
| 179 |
+
.gallery-grid.wc-gallery-gutter-2 { margin-right: -2px; }
|
| 180 |
+
.gallery-grid.wc-gallery-gutter-3 .gallery-item { margin-right: 3px; margin-bottom: 3px; }
|
| 181 |
+
.gallery-grid.wc-gallery-gutter-3 { margin-right: -3px; }
|
| 182 |
+
.gallery-grid.wc-gallery-gutter-4 .gallery-item { margin-right: 4px; margin-bottom: 4px; }
|
| 183 |
+
.gallery-grid.wc-gallery-gutter-4 { margin-right: -4px; }
|
| 184 |
+
.gallery-grid.wc-gallery-gutter-5 .gallery-item { margin-right: 5px; margin-bottom: 5px; }
|
| 185 |
+
.gallery-grid.wc-gallery-gutter-5 { margin-right: -5px; }
|
| 186 |
+
.gallery-grid.wc-gallery-gutter-6 .gallery-item { margin-right: 6px; margin-bottom: 6px; }
|
| 187 |
+
.gallery-grid.wc-gallery-gutter-6 { margin-right: -6px; }
|
| 188 |
+
.gallery-grid.wc-gallery-gutter-7 .gallery-item { margin-right: 7px; margin-bottom: 7px; }
|
| 189 |
+
.gallery-grid.wc-gallery-gutter-7 { margin-right: -7px; }
|
| 190 |
+
.gallery-grid.wc-gallery-gutter-8 .gallery-item { margin-right: 8px; margin-bottom: 8px; }
|
| 191 |
+
.gallery-grid.wc-gallery-gutter-8 { margin-right: -8px; }
|
| 192 |
+
.gallery-grid.wc-gallery-gutter-9 .gallery-item { margin-right: 9px; margin-bottom: 9px; }
|
| 193 |
+
.gallery-grid.wc-gallery-gutter-9 { margin-right: -9px; }
|
| 194 |
+
.gallery-grid.wc-gallery-gutter-10 .gallery-item { margin-right: 10px; margin-bottom: 10px; }
|
| 195 |
+
.gallery-grid.wc-gallery-gutter-10 { margin-right: -10px; }
|
| 196 |
+
.gallery-grid.wc-gallery-gutter-11 .gallery-item { margin-right: 11px; margin-bottom: 11px; }
|
| 197 |
+
.gallery-grid.wc-gallery-gutter-11 { margin-right: -11px; }
|
| 198 |
+
.gallery-grid.wc-gallery-gutter-12 .gallery-item { margin-right: 12px; margin-bottom: 12px; }
|
| 199 |
+
.gallery-grid.wc-gallery-gutter-12 { margin-right: -12px; }
|
| 200 |
+
.gallery-grid.wc-gallery-gutter-13 .gallery-item { margin-right: 13px; margin-bottom: 13px; }
|
| 201 |
+
.gallery-grid.wc-gallery-gutter-13 { margin-right: -13px; }
|
| 202 |
+
.gallery-grid.wc-gallery-gutter-14 .gallery-item { margin-right: 14px; margin-bottom: 14px; }
|
| 203 |
+
.gallery-grid.wc-gallery-gutter-14 { margin-right: -14px; }
|
| 204 |
+
.gallery-grid.wc-gallery-gutter-15 .gallery-item { margin-right: 15px; margin-bottom: 15px; }
|
| 205 |
+
.gallery-grid.wc-gallery-gutter-15 { margin-right: -15px; }
|
| 206 |
+
.gallery-grid.wc-gallery-gutter-16 .gallery-item { margin-right: 16px; margin-bottom: 16px; }
|
| 207 |
+
.gallery-grid.wc-gallery-gutter-16 { margin-right: -16px; }
|
| 208 |
+
.gallery-grid.wc-gallery-gutter-17 .gallery-item { margin-right: 17px; margin-bottom: 17px; }
|
| 209 |
+
.gallery-grid.wc-gallery-gutter-17 { margin-right: -17px; }
|
| 210 |
+
.gallery-grid.wc-gallery-gutter-18 .gallery-item { margin-right: 18px; margin-bottom: 18px; }
|
| 211 |
+
.gallery-grid.wc-gallery-gutter-18 { margin-right: -18px; }
|
| 212 |
+
.gallery-grid.wc-gallery-gutter-19 .gallery-item { margin-right: 19px; margin-bottom: 19px; }
|
| 213 |
+
.gallery-grid.wc-gallery-gutter-19 { margin-right: -19px; }
|
| 214 |
+
.gallery-grid.wc-gallery-gutter-20 .gallery-item { margin-right: 20px; margin-bottom: 20px; }
|
| 215 |
+
.gallery-grid.wc-gallery-gutter-20 { margin-right: -20px; }
|
| 216 |
+
.gallery-grid.wc-gallery-gutter-21 .gallery-item { margin-right: 21px; margin-bottom: 21px; }
|
| 217 |
+
.gallery-grid.wc-gallery-gutter-21 { margin-right: -21px; }
|
| 218 |
+
.gallery-grid.wc-gallery-gutter-22 .gallery-item { margin-right: 22px; margin-bottom: 22px; }
|
| 219 |
+
.gallery-grid.wc-gallery-gutter-22 { margin-right: -22px; }
|
| 220 |
+
.gallery-grid.wc-gallery-gutter-23 .gallery-item { margin-right: 23px; margin-bottom: 23px; }
|
| 221 |
+
.gallery-grid.wc-gallery-gutter-23 { margin-right: -23px; }
|
| 222 |
+
.gallery-grid.wc-gallery-gutter-24 .gallery-item { margin-right: 24px; margin-bottom: 24px; }
|
| 223 |
+
.gallery-grid.wc-gallery-gutter-24 { margin-right: -24px; }
|
| 224 |
+
.gallery-grid.wc-gallery-gutter-25 .gallery-item { margin-right: 25px; margin-bottom: 25px; }
|
| 225 |
+
.gallery-grid.wc-gallery-gutter-25 { margin-right: -25px; }
|
| 226 |
+
.gallery-grid.wc-gallery-gutter-26 .gallery-item { margin-right: 26px; margin-bottom: 26px; }
|
| 227 |
+
.gallery-grid.wc-gallery-gutter-26 { margin-right: -26px; }
|
| 228 |
+
.gallery-grid.wc-gallery-gutter-27 .gallery-item { margin-right: 27px; margin-bottom: 27px; }
|
| 229 |
+
.gallery-grid.wc-gallery-gutter-27 { margin-right: -27px; }
|
| 230 |
+
.gallery-grid.wc-gallery-gutter-28 .gallery-item { margin-right: 28px; margin-bottom: 28px; }
|
| 231 |
+
.gallery-grid.wc-gallery-gutter-28 { margin-right: -28px; }
|
| 232 |
+
.gallery-grid.wc-gallery-gutter-29 .gallery-item { margin-right: 29px; margin-bottom: 29px; }
|
| 233 |
+
.gallery-grid.wc-gallery-gutter-29 { margin-right: -29px; }
|
| 234 |
+
.gallery-grid.wc-gallery-gutter-30 .gallery-item { margin-right: 30px; margin-bottom: 30px; }
|
| 235 |
+
.gallery-grid.wc-gallery-gutter-30 { margin-right: -30px; }
|
| 236 |
+
|
| 237 |
+
.wc-gallery .gallery-grid.gallery-columns-1 .gallery-itemn { margin-right: 0; margin-bottom: 0; }
|
| 238 |
+
.wc-gallery .gallery-grid.gallery-columns-1 { margin-right: 0px; }
|
| 239 |
|
| 240 |
@media screen and (max-width: 568px) {
|
| 241 |
body .wc-gallery-captions-onpopup .gallery-caption,
|
| 254 |
body .wc-gallery .wc-image-links-bottomlinks {
|
| 255 |
margin: 0;
|
| 256 |
}
|
| 257 |
+
body .wc-gallery .gallery-grid .gallery-item-wrapper { width: 100%; }
|
| 258 |
+
body .wc-gallery .gallery-grid .gallery-item { margin-right: 0; }
|
| 259 |
+
body .wc-gallery .gallery-grid { margin-right: 0px; }
|
| 260 |
}
|
| 261 |
/**
|
| 262 |
* Image Links
|
includes/functions.php
CHANGED
|
@@ -347,12 +347,9 @@ function wc_gallery_shortcode($blank, $attr) {
|
|
| 347 |
|
| 348 |
$output .= "</div></div>\n";
|
| 349 |
}
|
| 350 |
-
else {
|
| 351 |
wp_enqueue_script( 'wc-gallery-masonry' );
|
| 352 |
|
| 353 |
-
// getting rid of float
|
| 354 |
-
$display = 'float' == $display ? 'masonry' : $display;
|
| 355 |
-
|
| 356 |
$class[] = "gallery-{$display}";
|
| 357 |
$class[] = "galleryid-{$id}";
|
| 358 |
$class[] = "gallery-columns-{$columns}";
|
|
@@ -406,6 +403,73 @@ function wc_gallery_shortcode($blank, $attr) {
|
|
| 406 |
|
| 407 |
$output .= "</div>\n";
|
| 408 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
|
| 410 |
return '<div class="wc-gallery">' . $output . '</div>';
|
| 411 |
}
|
|
@@ -493,6 +557,7 @@ function wc_gallery_get_attachment_link( $id = 0, $size = 'thumbnail', $permalin
|
|
| 493 |
function wc_gallery_print_media_templates() {
|
| 494 |
$display_types = array(
|
| 495 |
'masonry' => __( 'Masonry', 'wc_gallery' ),
|
|
|
|
| 496 |
'slider' => __( 'Slider (Fade)', 'wc_gallery' ),
|
| 497 |
'slider2' => __( 'Slider (Slide)', 'wc_gallery' ),
|
| 498 |
'sliderauto' => __( 'Slider (Auto Start)', 'wc_gallery' ),
|
| 347 |
|
| 348 |
$output .= "</div></div>\n";
|
| 349 |
}
|
| 350 |
+
else if ( 'masonry' == $display ) {
|
| 351 |
wp_enqueue_script( 'wc-gallery-masonry' );
|
| 352 |
|
|
|
|
|
|
|
|
|
|
| 353 |
$class[] = "gallery-{$display}";
|
| 354 |
$class[] = "galleryid-{$id}";
|
| 355 |
$class[] = "gallery-columns-{$columns}";
|
| 403 |
|
| 404 |
$output .= "</div>\n";
|
| 405 |
}
|
| 406 |
+
else {
|
| 407 |
+
// getting rid of float
|
| 408 |
+
$display = 'float' == $display ? 'grid' : $display;
|
| 409 |
+
|
| 410 |
+
$class[] = "gallery-{$display}";
|
| 411 |
+
$class[] = "galleryid-{$id}";
|
| 412 |
+
$class[] = "gallery-columns-{$columns}";
|
| 413 |
+
$class[] = "gallery-size-{$size_class}";
|
| 414 |
+
$class[] = 'wc-gallery-bottomspace-' . $bottomspace;
|
| 415 |
+
$class[] = 'wc-gallery-gutter-' . $gutterwidth;
|
| 416 |
+
$class[] = 'wc-gallery-clear';
|
| 417 |
+
|
| 418 |
+
$class = implode( ' ', $class );
|
| 419 |
+
|
| 420 |
+
$output = "<div id='$selector' data-gutter-width='".$gutterwidth."' data-columns='".$columns."' class='{$class}'>";
|
| 421 |
+
|
| 422 |
+
$i = 0;
|
| 423 |
+
$pos = 1;
|
| 424 |
+
foreach ( $attachments as $id => $attachment ) {
|
| 425 |
+
$column = $i % $columns;
|
| 426 |
+
$column++;
|
| 427 |
+
if ( $customlink ) {
|
| 428 |
+
$image_output = wc_gallery_get_attachment_link( $id, $size, false, false, false, $targetsize, $customlink, $link_target );
|
| 429 |
+
}
|
| 430 |
+
else if ( ! empty( $link ) && 'file' === $link ) {
|
| 431 |
+
$image_output = wc_gallery_get_attachment_link( $id, $size, false, false, false, $targetsize, $customlink, $link_target );
|
| 432 |
+
}
|
| 433 |
+
else if ( ! empty( $link ) && 'none' === $link ) {
|
| 434 |
+
$image_output = wp_get_attachment_image( $id, $size, false );
|
| 435 |
+
}
|
| 436 |
+
else {
|
| 437 |
+
$image_output = wc_gallery_get_attachment_link( $id, $size, true, false, false, 'large', false, $link_target );
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
$image_meta = wp_get_attachment_metadata( $id );
|
| 441 |
+
|
| 442 |
+
$orientation = '';
|
| 443 |
+
if ( isset( $image_meta['height'], $image_meta['width'] ) )
|
| 444 |
+
$orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
|
| 445 |
+
|
| 446 |
+
$last_column_class = '';
|
| 447 |
+
if ( $column == $columns ) {
|
| 448 |
+
$last_column_class = ' gallery-item-last-column';
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
$output .= "<div class='gallery-item-wrapper gallery-item-position-".$pos." gallery-item-attachment-".$id." gallery-item-column-".$column.$last_column_class."'><div class='gallery-item'>";
|
| 452 |
+
$output .= "
|
| 453 |
+
<div class='gallery-item-inner'>
|
| 454 |
+
<div class='gallery-icon {$orientation}'>
|
| 455 |
+
$image_output
|
| 456 |
+
</div>";
|
| 457 |
+
if ( $showcaptions && trim($attachment->post_excerpt) ) {
|
| 458 |
+
$output .= "
|
| 459 |
+
<div class='wp-caption-text gallery-caption'>
|
| 460 |
+
<{$captiontype}>
|
| 461 |
+
" . wptexturize($attachment->post_excerpt) . "
|
| 462 |
+
</{$captiontype}>
|
| 463 |
+
</div>";
|
| 464 |
+
}
|
| 465 |
+
$output .= "</div></div></div>";
|
| 466 |
+
|
| 467 |
+
$pos++;
|
| 468 |
+
$i++;
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
$output .= "</div>\n";
|
| 472 |
+
}
|
| 473 |
|
| 474 |
return '<div class="wc-gallery">' . $output . '</div>';
|
| 475 |
}
|
| 557 |
function wc_gallery_print_media_templates() {
|
| 558 |
$display_types = array(
|
| 559 |
'masonry' => __( 'Masonry', 'wc_gallery' ),
|
| 560 |
+
'grid' => __( 'Grid', 'wc_gallery' ),
|
| 561 |
'slider' => __( 'Slider (Fade)', 'wc_gallery' ),
|
| 562 |
'slider2' => __( 'Slider (Slide)', 'wc_gallery' ),
|
| 563 |
'sliderauto' => __( 'Slider (Auto Start)', 'wc_gallery' ),
|
readme.txt
CHANGED
|
@@ -67,6 +67,10 @@ For more tutorials on our gallery plugin, go to our knowledge base.
|
|
| 67 |
|
| 68 |
== Changelog ==
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
= Version 1.62 =
|
| 71 |
|
| 72 |
* disabled jetpack gallery message when plugin is activated
|
| 67 |
|
| 68 |
== Changelog ==
|
| 69 |
|
| 70 |
+
= Version 1.63 =
|
| 71 |
+
|
| 72 |
+
* added grid display
|
| 73 |
+
|
| 74 |
= Version 1.62 =
|
| 75 |
|
| 76 |
* disabled jetpack gallery message when plugin is activated
|
wc-gallery.php
CHANGED
|
@@ -5,11 +5,11 @@ Plugin URI: http://angiemakes.com/feminine-wordpress-blog-themes-women/
|
|
| 5 |
Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 6 |
Author: Chris Baldelomar
|
| 7 |
Author URI: http://angiemakes.com/
|
| 8 |
-
Version: 1.
|
| 9 |
License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
| 12 |
-
define( 'WC_GALLERY_VERSION', '1.
|
| 13 |
define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
|
| 14 |
define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
|
| 15 |
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://angiemakes.com/
|
| 8 |
+
Version: 1.63
|
| 9 |
License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
| 12 |
+
define( 'WC_GALLERY_VERSION', '1.63' );
|
| 13 |
define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
|
| 14 |
define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
|
| 15 |
define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
