Galleries by Angie Makes - Version 1.3

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Galleries by Angie Makes
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

README.md CHANGED
@@ -46,6 +46,15 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  ## Changelog ##
48
 
 
 
 
 
 
 
 
 
 
49
  ### Version 1.2
50
 
51
  * Removed fancybox and added another image popup library with a friendly license.
46
 
47
  ## Changelog ##
48
 
49
+ ### Version 1.3
50
+
51
+ * Much improved masonry gallery
52
+ * Much improved slider gallery
53
+ * Added option for fade or slide in slider
54
+ * Fixed firefox bug with width percentage
55
+ * More options added in media panel
56
+ * CSS improvements
57
+
58
  ### Version 1.2
59
 
60
  * Removed fancybox and added another image popup library with a friendly license.
includes/css/style.css CHANGED
@@ -7,6 +7,20 @@
7
  margin-left: 0px;
8
  margin-right: 0px;
9
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  .wc-gallery .gallery-center {
12
  margin-left: auto;
@@ -37,33 +51,33 @@
37
  border: 1px solid #eeeeee;
38
  }
39
 
40
- /* firefox can't handle 100% and masonry calculations. overflows slightly. */
41
- .wc-gallery .gallery-columns-1 .gallery-item {
42
- width: 99.9%;
43
  }
44
- .wc-gallery .gallery-columns-2 .gallery-item {
45
- width: 49.95%;
46
  }
47
- .wc-gallery .gallery-columns-3 .gallery-item {
48
- width: 33.3%;
49
  }
50
- .wc-gallery .gallery-columns-4 .gallery-item {
51
- width: 24.975%;
52
  }
53
- .wc-gallery .gallery-columns-5 .gallery-item {
54
- width: 19.98%;
55
  }
56
- .wc-gallery .gallery-columns-6 .gallery-item {
57
- width: 16.65%;
58
  }
59
- .wc-gallery .gallery-columns-7 .gallery-item {
60
- width: 14.2714285714%;
61
  }
62
- .wc-gallery .gallery-columns-8 .gallery-item {
63
- width: 12.4875%;
64
  }
65
- .wc-gallery .gallery-columns-9 .gallery-item {
66
- width: 11.1%;
67
  }
68
 
69
  .wc-gallery .gallery-caption {
@@ -152,9 +166,9 @@
152
  background-color: #cccccc;
153
  }
154
 
155
- .wc-gallery .gallery.wcflexslider .wcflex-direction-nav a {
156
  color: rgba(0,0,0,0.8);
157
- }
158
 
159
  .wc-gallery .gallery.wcflexslider .wcflex-slide-item {
160
  position: relative;
@@ -174,7 +188,7 @@
174
  right: 0;
175
  }
176
 
177
- .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-prev { left: 0px; }
178
  .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-next { right: 0px; }
179
  .wc-gallery .gallery.wcflexslider:hover .wcflex-prev { left: 10px; }
180
  .wc-gallery .gallery.wcflexslider:hover .wcflex-next { right: 10px; }
@@ -182,7 +196,7 @@
182
  @media screen and (max-width: 860px) {
183
  .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-prev { left: 10px;}
184
  .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-next { right: 10px;}
185
- }
186
 
187
  /*
188
  * Image Popup
7
  margin-left: 0px;
8
  margin-right: 0px;
9
  }
10
+ .wc-gallery .gallery.gallery-masonry,
11
+ .wc-gallery .gallery.gallery-default {
12
+ margin-right: -5px;
13
+ }
14
+
15
+ .wc-gallery .gallery.wc-gallery-bottomspace-ten {
16
+ margin-bottom: 10px;
17
+ }
18
+ .wc-gallery .gallery.wc-gallery-bottomspace-five {
19
+ margin-bottom: 5px;
20
+ }
21
+ .wc-gallery .gallery.wc-gallery-bottomspace-none {
22
+ margin-bottom: 0;
23
+ }
24
 
25
  .wc-gallery .gallery-center {
26
  margin-left: auto;
51
  border: 1px solid #eeeeee;
52
  }
53
 
54
+ /* firefox can't handle more than 5 decimals */
55
+ .wc-gallery.gallery.gallery-columns-1 .gallery-item {
56
+ width: 100%;
57
  }
58
+ .wc-gallery.gallery.gallery-columns-2 .gallery-item {
59
+ width: 50%;
60
  }
61
+ .wc-gallery.gallery.gallery-columns-3 .gallery-item {
62
+ width: 33.33333%;
63
  }
64
+ .wc-gallery.gallery.gallery-columns-4 .gallery-item {
65
+ width: 25%;
66
  }
67
+ .wc-gallery.gallery.gallery-columns-5 .gallery-item {
68
+ width: 20%;
69
  }
70
+ .wc-gallery.gallery.gallery-columns-6 .gallery-item {
71
+ width: 16.66666%;
72
  }
73
+ .wc-gallery.gallery.gallery-columns-7 .gallery-item {
74
+ width: 14.28571%;
75
  }
76
+ .wc-gallery.gallery.gallery-columns-8 .gallery-item {
77
+ width: 12.5%;
78
  }
79
+ .wc-gallery.gallery.gallery-columns-9 .gallery-item {
80
+ width: 11.11111%;
81
  }
82
 
83
  .wc-gallery .gallery-caption {
166
  background-color: #cccccc;
167
  }
168
 
169
+ /* .wc-gallery .gallery.wcflexslider .wcflex-direction-nav a {
170
  color: rgba(0,0,0,0.8);
171
+ } */
172
 
173
  .wc-gallery .gallery.wcflexslider .wcflex-slide-item {
174
  position: relative;
188
  right: 0;
189
  }
190
 
191
+ /* .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-prev { left: 0px; }
192
  .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-next { right: 0px; }
193
  .wc-gallery .gallery.wcflexslider:hover .wcflex-prev { left: 10px; }
194
  .wc-gallery .gallery.wcflexslider:hover .wcflex-next { right: 10px; }
196
  @media screen and (max-width: 860px) {
197
  .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-prev { left: 10px;}
198
  .wc-gallery .gallery.wcflexslider .wcflex-direction-nav .wcflex-next { right: 10px;}
199
+ } */
200
 
201
  /*
202
  * Image Popup
includes/functions.php CHANGED
@@ -37,6 +37,8 @@ function wc_gallery_shortcode($blank, $attr) {
37
  'targetsize' => 'large',
38
  'display' => 'masonry',
39
  'customlink' => 'false',
 
 
40
  'class' => '',
41
  'include' => '',
42
  'exclude' => ''
@@ -86,89 +88,52 @@ function wc_gallery_shortcode($blank, $attr) {
86
 
87
  $selector = "gallery-{$instance}";
88
 
89
- $gallery_style = $gallery_div = '';
90
- if ( apply_filters( 'use_default_gallery_style', true ) )
91
- $gallery_style = "
92
- <style type='text/css'>
93
- #{$selector} {
94
- margin: auto;
95
- }
96
- #{$selector} .gallery-item {
97
- float: {$float};
98
- margin-top: 10px;
99
- text-align: center;
100
- width: {$itemwidth}%;
101
- }
102
- #{$selector} img {
103
- border: 2px solid #cfcfcf;
104
- }
105
- #{$selector} .gallery-caption {
106
- margin-left: 0;
107
- }
108
- /* see gallery_shortcode() in wp-includes/media.php */
109
- </style>";
110
  $size_class = sanitize_html_class( $size );
111
 
112
  $showcaptions = 'hide' == $captions ? false : true;
113
  $customlink = 'true' == $customlink ? true : false;
114
  $class = explode( ' ', $class );
 
115
 
116
- if ( 'slider' == $display ) {
 
 
117
  wp_enqueue_script( 'wc-gallery-flexslider' );
118
  wp_enqueue_script( 'wc-gallery' );
119
 
120
  $class[] = 'wc-gallery';
121
  $class[] = 'gallery';
122
- $class[] = 'wcslider';
123
  $class[] = 'wcflexslider';
124
- $gallery_div = "<div class='".implode( ' ', $class )."'>";
125
- $gallery_div .= "<ul id='$selector' class='slides'>";
126
- $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
 
 
127
 
128
  $i = 0;
129
  foreach ( $attachments as $id => $attachment ) {
130
  if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
131
  continue;
 
132
  list($src, $width, $height) = $img;
133
  $image_output = "<img src='{$src}' width='{$width}' height='{$height}' />";
134
- $image_meta = wp_get_attachment_metadata( $id );
135
-
136
- $orientation = '';
137
- if ( isset( $image_meta['height'], $image_meta['width'] ) )
138
- $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
139
 
140
- $output .= "
141
- <li class='wcflex-slide-item'>
142
- $image_output";
143
- if ( $showcaptions && $captiontag && trim($attachment->post_excerpt) ) {
144
- $output .= "
145
- <div class='wp-caption-text gallery-caption'>
146
- " . wptexturize($attachment->post_excerpt) . "
147
- </div>";
 
 
 
 
 
148
  }
149
- $output .= "</li>";
150
- }
151
 
152
- $output .= "</ul></div>\n";
153
- }
154
- else if ( 'carousel' == $display ) {
155
- wp_enqueue_script( 'wc-gallery-flexslider' );
156
- wp_enqueue_script( 'wc-gallery' );
157
-
158
- $class[] = 'wc-gallery';
159
- $class[] = 'gallery';
160
- $class[] = 'wccarousel';
161
- $class[] = 'wcflexslider';
162
- $gallery_div = "<div class='".implode( ' ', $class )."'>";
163
- $gallery_div .= "<ul id='$selector' class='slides'>";
164
- $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
165
-
166
- $i = 0;
167
- foreach ( $attachments as $id => $attachment ) {
168
- if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
169
- continue;
170
- list($src, $width, $height) = $img;
171
- $image_output = "<img src='{$src}' width='{$width}' height='{$height}' />";
172
  $image_meta = wp_get_attachment_metadata( $id );
173
 
174
  $orientation = '';
@@ -177,7 +142,6 @@ function wc_gallery_shortcode($blank, $attr) {
177
 
178
  $output .= "
179
  <li class='wcflex-slide-item'>
180
- <div class='wcflex-center-slide' style='width:{$width}px'>
181
  $image_output";
182
  if ( $showcaptions && $captiontag && trim($attachment->post_excerpt) ) {
183
  $output .= "
@@ -185,7 +149,7 @@ function wc_gallery_shortcode($blank, $attr) {
185
  " . wptexturize($attachment->post_excerpt) . "
186
  </div>";
187
  }
188
- $output .= "</div></li>";
189
  }
190
 
191
  $output .= "</ul></div>\n";
@@ -194,11 +158,7 @@ function wc_gallery_shortcode($blank, $attr) {
194
  wp_enqueue_script( 'wc-gallery-popup' );
195
  wp_enqueue_script( 'wc-gallery' );
196
 
197
- if ( in_array( $size, array( 'thumbnail', 'wcsquare' ) ) )
198
- $display = 'default';
199
-
200
- if ( 'large' == $size && 1 == $columns )
201
- $display = 'default';
202
 
203
  $class[] = "wc-gallery";
204
  $class[] = "gallery";
@@ -215,8 +175,7 @@ function wc_gallery_shortcode($blank, $attr) {
215
 
216
  $class = implode( ' ', $class );
217
 
218
- $gallery_div .= "<div id='$selector' class='{$class}'>";
219
- $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
220
 
221
  $i = 0;
222
  foreach ( $attachments as $id => $attachment ) {
@@ -309,9 +268,11 @@ function wc_gallery_get_attachment_link( $id = 0, $size = 'thumbnail', $permalin
309
  */
310
  function wc_gallery_print_media_templates() {
311
  $display_types = array(
312
- 'masonry' => __( 'Gallery', 'wc_gallery' ),
 
 
313
  'carousel' => __( 'Carousel', 'wc_gallery' ),
314
- 'slider' => __( 'Slider', 'wc_gallery' ),
315
  );
316
  ?>
317
  <script type="text/html" id="tmpl-wc-gallery-settings">
@@ -343,7 +304,7 @@ function wc_gallery_print_media_templates() {
343
  </label>
344
 
345
  <label class="setting">
346
- <span><?php _e( 'Target Size', 'wc_gallery' ); ?></span>
347
  <select class="targetsize" name="targetsize" data-setting="targetsize">
348
  <?php foreach ( $sizes as $key => $name ) : ?>
349
  <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'large' ); ?>><?php echo esc_html( $name ); ?></option>
@@ -372,6 +333,28 @@ function wc_gallery_print_media_templates() {
372
  <input type="checkbox" name="customlink" data-setting="customlink" />
373
  </label>
374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  <label class="setting">
376
  <span><?php _e( 'Class', 'wc_gallery' ); ?></span>
377
  <input type="text" name="class" data-setting="class" />
37
  'targetsize' => 'large',
38
  'display' => 'masonry',
39
  'customlink' => 'false',
40
+ 'bottomspace' => 'default',
41
+ 'hidecontrols' => 'false',
42
  'class' => '',
43
  'include' => '',
44
  'exclude' => ''
88
 
89
  $selector = "gallery-{$instance}";
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  $size_class = sanitize_html_class( $size );
92
 
93
  $showcaptions = 'hide' == $captions ? false : true;
94
  $customlink = 'true' == $customlink ? true : false;
95
  $class = explode( ' ', $class );
96
+ $class[] = 'wc-gallery-bottomspace-' . $bottomspace;
97
 
98
+ $sliders = array( 'slider', 'slider2', 'carousel' );
99
+
100
+ if ( in_array( $display, $sliders ) ) {
101
  wp_enqueue_script( 'wc-gallery-flexslider' );
102
  wp_enqueue_script( 'wc-gallery' );
103
 
104
  $class[] = 'wc-gallery';
105
  $class[] = 'gallery';
106
+ $class[] = 'wc' . $display;
107
  $class[] = 'wcflexslider';
108
+ if ( 'true' == $hidecontrols )
109
+ $class[] = 'wcflexslider-hidecontrols';
110
+
111
+ $output = "<div class='".implode( ' ', $class )."'>";
112
+ $output .= "<ul id='$selector' class='slides'>";
113
 
114
  $i = 0;
115
  foreach ( $attachments as $id => $attachment ) {
116
  if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
117
  continue;
118
+
119
  list($src, $width, $height) = $img;
120
  $image_output = "<img src='{$src}' width='{$width}' height='{$height}' />";
 
 
 
 
 
121
 
122
+ if ( ! empty( $link ) ) {
123
+ if ( $customlink ) {
124
+ $url = get_post_meta( $id, _WC_GALLERY_PREFIX . 'custom_image_link', true );
125
+ $image_output = '<a href="'.$url.'">' . $image_output . '</a>';
126
+ }
127
+ else if ( 'post' === $link ) {
128
+ $url = get_attachment_link( $id );
129
+ $image_output = '<a href="'.$url.'">' . $image_output . '</a>';
130
+ }
131
+ else if ( 'file' === $link ) {
132
+ $url = wp_get_attachment_url( $id );
133
+ $image_output = '<a href="'.$url.'">' . $image_output . '</a>';
134
+ }
135
  }
 
 
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  $image_meta = wp_get_attachment_metadata( $id );
138
 
139
  $orientation = '';
142
 
143
  $output .= "
144
  <li class='wcflex-slide-item'>
 
145
  $image_output";
146
  if ( $showcaptions && $captiontag && trim($attachment->post_excerpt) ) {
147
  $output .= "
149
  " . wptexturize($attachment->post_excerpt) . "
150
  </div>";
151
  }
152
+ $output .= "</li>";
153
  }
154
 
155
  $output .= "</ul></div>\n";
158
  wp_enqueue_script( 'wc-gallery-popup' );
159
  wp_enqueue_script( 'wc-gallery' );
160
 
161
+ $display = 'float' == $display ? 'default' : $display;
 
 
 
 
162
 
163
  $class[] = "wc-gallery";
164
  $class[] = "gallery";
175
 
176
  $class = implode( ' ', $class );
177
 
178
+ $output = "<div id='$selector' class='{$class}'>";
 
179
 
180
  $i = 0;
181
  foreach ( $attachments as $id => $attachment ) {
268
  */
269
  function wc_gallery_print_media_templates() {
270
  $display_types = array(
271
+ 'masonry' => __( 'Masonry', 'wc_gallery' ),
272
+ 'slider' => __( 'Slider (Fade)', 'wc_gallery' ),
273
+ 'slider2' => __( 'Slider (Slide)', 'wc_gallery' ),
274
  'carousel' => __( 'Carousel', 'wc_gallery' ),
275
+ 'float' => __( 'Float', 'wc_gallery' ),
276
  );
277
  ?>
278
  <script type="text/html" id="tmpl-wc-gallery-settings">
304
  </label>
305
 
306
  <label class="setting">
307
+ <span><?php _e( 'Popup', 'wc_gallery' ); ?></span>
308
  <select class="targetsize" name="targetsize" data-setting="targetsize">
309
  <?php foreach ( $sizes as $key => $name ) : ?>
310
  <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'large' ); ?>><?php echo esc_html( $name ); ?></option>
333
  <input type="checkbox" name="customlink" data-setting="customlink" />
334
  </label>
335
 
336
+ <?php
337
+ $space = array(
338
+ 'default' => __( '20px', 'wc_gallery' ),
339
+ 'ten' => __( '10px', 'wc_gallery' ),
340
+ 'five' => __( '5px', 'wc_gallery' ),
341
+ 'none' => __( '0px', 'wc_gallery' ),
342
+ );
343
+ ?>
344
+ <label class="setting">
345
+ <span><?php _e( 'Bottom Space', 'wc_gallery' ); ?></span>
346
+ <select class="bottomspace" name="bottomspace" data-setting="bottomspace">
347
+ <?php foreach ( $space as $key => $value ) : ?>
348
+ <option value="<?php echo esc_attr( $key ); ?>" <?php selected( $key, 'default' ); ?>><?php echo esc_html( $value ); ?></option>
349
+ <?php endforeach; ?>
350
+ </select>
351
+ </label>
352
+
353
+ <label class="setting">
354
+ <span><?php _e( 'Hide Controls', 'wc_gallery' ); ?></span>
355
+ <input type="checkbox" name="hidecontrols" data-setting="hidecontrols" />
356
+ </label>
357
+
358
  <label class="setting">
359
  <span><?php _e( 'Class', 'wc_gallery' ); ?></span>
360
  <input type="text" name="class" data-setting="class" />
includes/js/admin.js CHANGED
@@ -17,12 +17,16 @@
17
  media.gallery.defaults.targetsize = 'large'; // lil hack that lets media know there's a layout attribute.
18
  media.gallery.defaults.captions = 'show'; // lil hack that lets media know there's a layout attribute.
19
  media.gallery.defaults.customlink = false; // lil hack that lets media know there's a layout attribute.
 
 
20
  media.gallery.defaults.class = ''; // lil hack that lets media know there's a layout attribute.
21
  this.update.apply( this, ['display'] );
22
  this.update.apply( this, ['size'] );
23
  this.update.apply( this, ['targetsize'] );
24
  this.update.apply( this, ['captions'] );
25
  this.update.apply( this, ['customlink'] );
 
 
26
  this.update.apply( this, ['class'] );
27
 
28
  return this;
17
  media.gallery.defaults.targetsize = 'large'; // lil hack that lets media know there's a layout attribute.
18
  media.gallery.defaults.captions = 'show'; // lil hack that lets media know there's a layout attribute.
19
  media.gallery.defaults.customlink = false; // lil hack that lets media know there's a layout attribute.
20
+ media.gallery.defaults.bottomspace = 'default'; // lil hack that lets media know there's a layout attribute.
21
+ media.gallery.defaults.hidecontrols = false; // lil hack that lets media know there's a layout attribute.
22
  media.gallery.defaults.class = ''; // lil hack that lets media know there's a layout attribute.
23
  this.update.apply( this, ['display'] );
24
  this.update.apply( this, ['size'] );
25
  this.update.apply( this, ['targetsize'] );
26
  this.update.apply( this, ['captions'] );
27
  this.update.apply( this, ['customlink'] );
28
+ this.update.apply( this, ['bottomspace'] );
29
+ this.update.apply( this, ['hidecontrols'] );
30
  this.update.apply( this, ['class'] );
31
 
32
  return this;
includes/js/flexslider/flexslider.css CHANGED
@@ -23,7 +23,7 @@
23
  /* Icon Fonts
24
  *********************************/
25
  /* Font-face Icons */
26
- @font-face {
27
  font-family: 'flexslider-icon';
28
  src:url('fonts/flexslider-icon.eot');
29
  src:url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'),
@@ -32,13 +32,13 @@
32
  url('fonts/flexslider-icon.svg#flexslider-icon') format('svg');
33
  font-weight: normal;
34
  font-style: normal;
35
- }
36
 
37
  /* FlexSlider Necessary Styles
38
  *********************************/
39
  .wcflexslider {margin: 0; padding: 0;}
40
  .wcflexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
41
- .wcflexslider .slides img {width: 100%; display: block;}
42
  .wcflex-pauseplay span {text-transform: capitalize;}
43
 
44
  /* Clearfix for the .slides element */
@@ -57,28 +57,28 @@ html[xmlns] .slides {display: block;}
57
  .wcflex-viewport { max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; }
58
  .loading .wcflex-viewport { max-height: 300px; }
59
  .wcflexslider .slides { zoom: 1; }
60
- .carousel li { margin-right: 5px; }
61
 
62
  /* Direction Nav */
63
  .wcflex-direction-nav {*height: 0;}
64
- .wcflex-direction-nav a { display: block; width: 40px; height: 40px; margin: -20px 0 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; color: rgba(0,0,0,0.8); text-shadow: 1px 1px 0 rgba(255,255,255,0.3); -webkit-transition: all .3s ease; -moz-transition: all .3s ease; transition: all .3s ease; }
65
- .wcflex-direction-nav .wcflex-prev { left: -50px; }
66
- .wcflex-direction-nav .wcflex-next { right: -50px; text-align: right; }
67
- .wcflexslider:hover .wcflex-prev { opacity: 0.7; left: 10px; }
68
- .wcflexslider:hover .wcflex-next { opacity: 0.7; right: 10px; }
69
  .wcflexslider:hover .wcflex-next:hover, .wcflexslider:hover .wcflex-prev:hover { opacity: 1; }
70
  .wcflex-direction-nav .wcflex-disabled { opacity: 0!important; filter:alpha(opacity=0); cursor: default; }
71
- .wcflex-direction-nav a:before { font-family: "flexslider-icon"; font-size: 40px; display: inline-block; content: '\f001'; }
72
- .wcflex-direction-nav a.wcflex-next:before { content: '\f002'; }
73
 
74
  /* Pause/Play */
75
  .wcflex-pauseplay a { display: block; width: 20px; height: 20px; position: absolute; bottom: 5px; left: 10px; opacity: 0.8; z-index: 10; overflow: hidden; cursor: pointer; color: #000; }
76
- .wcflex-pauseplay a:before { font-family: "flexslider-icon"; font-size: 20px; display: inline-block; content: '\f004'; }
77
- .wcflex-pauseplay a:hover { opacity: 1; }
78
- .wcflex-pauseplay a.wcflex-play:before { content: '\f003'; }
79
 
80
  /* Control Nav */
81
- .wcflex-control-nav {width: 100%; position: absolute; bottom: -40px; text-align: center;}
82
  .wcflex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
83
  .wcflex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -moz-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -o-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); box-shadow: inset 0 0 3px rgba(0,0,0,0.3); }
84
  .wcflex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
@@ -90,7 +90,15 @@ html[xmlns] .slides {display: block;}
90
  .wcflex-control-thumbs img:hover {opacity: 1;}
91
  .wcflex-control-thumbs .wcflex-active {opacity: 1; cursor: default;}
92
 
93
- @media screen and (max-width: 860px) {
 
 
 
 
94
  .wcflex-direction-nav .wcflex-prev { opacity: 1; left: 10px;}
95
  .wcflex-direction-nav .wcflex-next { opacity: 1; right: 10px;}
 
 
 
 
96
  }
23
  /* Icon Fonts
24
  *********************************/
25
  /* Font-face Icons */
26
+ /* @font-face {
27
  font-family: 'flexslider-icon';
28
  src:url('fonts/flexslider-icon.eot');
29
  src:url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'),
32
  url('fonts/flexslider-icon.svg#flexslider-icon') format('svg');
33
  font-weight: normal;
34
  font-style: normal;
35
+ } */
36
 
37
  /* FlexSlider Necessary Styles
38
  *********************************/
39
  .wcflexslider {margin: 0; padding: 0;}
40
  .wcflexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
41
+ .wcflexslider .slides img {/*width: 100%;*/ margin-left: auto; margin-right: auto; display: block;}
42
  .wcflex-pauseplay span {text-transform: capitalize;}
43
 
44
  /* Clearfix for the .slides element */
57
  .wcflex-viewport { max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; -o-transition: all 1s ease; transition: all 1s ease; }
58
  .loading .wcflex-viewport { max-height: 300px; }
59
  .wcflexslider .slides { zoom: 1; }
60
+ .wccarousel li { margin-right: 5px; }
61
 
62
  /* Direction Nav */
63
  .wcflex-direction-nav {*height: 0;}
64
+ .wcflex-direction-nav a { display: block; width: 100px; height: 100px; margin: -50px 0 0; position: absolute; top: 50%; z-index: 10; overflow: hidden; opacity: 0; cursor: pointer; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; transition: all .3s ease; }
65
+ .wcflex-direction-nav .wcflex-prev { background: url("images/slide-arrows.png") no-repeat 0 0; left: 0; }
66
+ .wcflex-direction-nav .wcflex-next { background: url("images/slide-arrows.png") no-repeat 0 -100px; right: 0; text-align: right; }
67
+ .wcflexslider:hover .wcflex-prev { opacity: 1; left: 0px; }
68
+ .wcflexslider:hover .wcflex-next { opacity: 1; right: 0px; }
69
  .wcflexslider:hover .wcflex-next:hover, .wcflexslider:hover .wcflex-prev:hover { opacity: 1; }
70
  .wcflex-direction-nav .wcflex-disabled { opacity: 0!important; filter:alpha(opacity=0); cursor: default; }
71
+ /* .wcflex-direction-nav a:before { display: inline-block; background-image:url("images/leftarrow.png"); } */
72
+ /* .wcflex-direction-nav a.wcflex-next:before { background-image:url("images/rightarrow.png"); } */
73
 
74
  /* Pause/Play */
75
  .wcflex-pauseplay a { display: block; width: 20px; height: 20px; position: absolute; bottom: 5px; left: 10px; opacity: 0.8; z-index: 10; overflow: hidden; cursor: pointer; color: #000; }
76
+ /* .wcflex-pauseplay a:before { font-family: "flexslider-icon"; font-size: 20px; display: inline-block; content: '\f004'; } */
77
+ /* .wcflex-pauseplay a:hover { opacity: 1; } */
78
+ /* .wcflex-pauseplay a.wcflex-play:before { content: '\f003'; } */
79
 
80
  /* Control Nav */
81
+ .wcflex-control-nav {width: 100%; position: relative; text-align: center; padding-top: 20px;}
82
  .wcflex-control-nav li {margin: 0 6px; display: inline-block; zoom: 1; *display: inline;}
83
  .wcflex-control-paging li a {width: 11px; height: 11px; display: block; background: #666; background: rgba(0,0,0,0.5); cursor: pointer; text-indent: -9999px; -webkit-border-radius: 20px; -moz-border-radius: 20px; -o-border-radius: 20px; border-radius: 20px; -webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -moz-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); -o-box-shadow: inset 0 0 3px rgba(0,0,0,0.3); box-shadow: inset 0 0 3px rgba(0,0,0,0.3); }
84
  .wcflex-control-paging li a:hover { background: #333; background: rgba(0,0,0,0.7); }
90
  .wcflex-control-thumbs img:hover {opacity: 1;}
91
  .wcflex-control-thumbs .wcflex-active {opacity: 1; cursor: default;}
92
 
93
+ .wcflexslider-hidecontrols .wcflex-control-nav {
94
+ display: none;
95
+ }
96
+
97
+ /* @media screen and (max-width: 860px) {
98
  .wcflex-direction-nav .wcflex-prev { opacity: 1; left: 10px;}
99
  .wcflex-direction-nav .wcflex-next { opacity: 1; right: 10px;}
100
+ } */
101
+ @media screen and (max-width: 480px) {
102
+ .wcflex-direction-nav .wcflex-prev { background: none; }
103
+ .wcflex-direction-nav .wcflex-next { background: none; }
104
  }
includes/js/flexslider/images/slide-arrows.png ADDED
Binary file
includes/js/gallery.js CHANGED
@@ -43,14 +43,28 @@
43
  if( jQuery().wcflexslider) {
44
  $(window).load(function() {
45
  $('.gallery.wcslider.wcflexslider').wcflexslider({
 
 
46
  smoothHeight: false,
47
  slideshow: false,
48
  animation:"fade"
49
  });
 
 
 
 
 
 
 
50
  $('.gallery.wccarousel.wcflexslider').wcflexslider({
 
 
51
  smoothHeight: false,
 
52
  animation: "slide",
53
- slideshow: false
 
 
54
  });
55
  });
56
  }
43
  if( jQuery().wcflexslider) {
44
  $(window).load(function() {
45
  $('.gallery.wcslider.wcflexslider').wcflexslider({
46
+ prevText: "",
47
+ nextText: "",
48
  smoothHeight: false,
49
  slideshow: false,
50
  animation:"fade"
51
  });
52
+ $('.gallery.wcslider2.wcflexslider').wcflexslider({
53
+ prevText: "",
54
+ nextText: "",
55
+ smoothHeight: true,
56
+ slideshow: false,
57
+ animation:"slide"
58
+ });
59
  $('.gallery.wccarousel.wcflexslider').wcflexslider({
60
+ prevText: "",
61
+ nextText: "",
62
  smoothHeight: false,
63
+ slideshow: false,
64
  animation: "slide",
65
+ animationLoop: false,
66
+ itemWidth: 270,
67
+ itemMargin: 5
68
  });
69
  });
70
  }
readme.txt CHANGED
@@ -46,6 +46,15 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
 
 
 
 
49
  ### Version 1.2
50
 
51
  * Removed fancybox and added another image popup library with a friendly license.
46
 
47
  == Changelog ==
48
 
49
+ ### Version 1.3
50
+
51
+ * Much improved masonry gallery
52
+ * Much improved slider gallery
53
+ * Added option for fade or slide in slider
54
+ * Fixed firefox bug with width percentage
55
+ * More options added in media panel
56
+ * CSS improvements
57
+
58
  ### Version 1.2
59
 
60
  * Removed fancybox and added another image popup library with a friendly license.
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.2
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.2' );
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.3
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.3' );
17
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
18
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
19
  define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );