Gallery – Photo Gallery and Images Gallery - Version 1.4.0

Version Description

  • Added new gallery width option
  • Gallery width values in pixels
  • Gallery width values in percents
  • Small code fixes and optimization
Download this release

Release Info

Developer robosoft
Plugin Icon 128x128 Gallery – Photo Gallery and Images Gallery
Version 1.4.0
Comparing to
See all releases

Code changes from version 1.3.9 to 1.4.0

cmb2/fields/multisize/index.html ADDED
File without changes
cmb2/fields/multisize/rbs-multiSize.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Robo Gallery
4
+ * Version: 1.0
5
+ * By Robosoft
6
+ *
7
+ * Contact: http://robosoft.co
8
+ * Created: 2015
9
+ * Licensed under the GPLv2 license - http://opensource.org/licenses/gpl-2.0.php
10
+ *
11
+ * Copyright (c) 2014-2015, Robosoft. All rights reserved.
12
+ * Available only in http://robosoft.co/
13
+ */
14
+
15
+ function rbs_multisize_field( $metakey, $post_id = 0 ) {
16
+ echo rbs_get_multisize_field( $metakey, $post_id );
17
+ }
18
+
19
+ function rbs_multisize_field_callback( $field, $value, $object_id, $object_type, $field_type_object ) {
20
+ // make sure we specify each part of the value we need.
21
+ $level = $field->args('level')?1:0;
22
+
23
+ $default = $field->args('default');
24
+ if(!is_array($default)) $default = array();
25
+
26
+ if(!isset($default['width'])) $default['width'] = '100';
27
+ if(!isset($default['widthType'])) $default['widthType'] = '';
28
+
29
+ $value = wp_parse_args( $value, array(
30
+ 'width' => $default['width'],
31
+ 'widthType' => $default['widthType'],
32
+ ));
33
+
34
+ ?>
35
+
36
+ <div class="form-horizontal">
37
+ <div class="form-group">
38
+ <label class="col-xs-4 col-sm-2 control-label" for="<?php echo $field_type_object->_id(); ?>"><?php echo esc_html( $field->args('name') ); ?></label>
39
+
40
+ <div class="col-xs-3 col-sm-2<?php echo ($level?' rbs_disabled':'') ?>">
41
+ <?php
42
+ echo $field_type_object->input( array(
43
+ 'name' => $field_type_object->_name('[width]' ),
44
+ 'id' => $field_type_object->_id('[width]' ),
45
+ 'value' => $value['width'],
46
+ 'class' => 'form-control '.$field->args('class') ,
47
+ ));
48
+ ?>
49
+ </div>
50
+ <div class="col-xs-3 col-sm-2<?php echo ($level?' rbs_disabled':'') ?>">
51
+ <?php
52
+ echo
53
+ '<input type="checkbox" data-toggle="toggle" data-on="px" data-off="%" data-onstyle="primary" data-offstyle="info" '
54
+ .'name="'.$field_type_object->_name( '[widthType]' ).'" '
55
+ .'id="'. $field_type_object->_id( 'widthType' ).'" '
56
+ .( $value['widthType']==1 ?' checked ':'')
57
+ .'value="1" '
58
+ .'>';
59
+ ?>
60
+ </div>
61
+
62
+ <?php if($level){ ?>
63
+ <div class="col-xs-2 col-sm-6 rbs-block-pro">
64
+ <?php echo ROBO_GALLERY_LABEL_PRO; ?>
65
+ </div>
66
+ <?php } ?>
67
+ </div>
68
+ </div>
69
+ <?php
70
+ echo $field_type_object->_desc( true );
71
+
72
+ }
73
+ add_filter( 'cmb2_render_multisize', 'rbs_multisize_field_callback', 10, 5 );
includes/frontend/rbs_gallery_class.php CHANGED
@@ -50,7 +50,7 @@ class roboGallery extends roboGalleryUtils{
50
  public $rbsCloseLightboxStyle = '';
51
  public $rbsArrowLightboxStyle = '';
52
 
53
-
54
 
55
 
56
  public $javaScript = '';
@@ -361,6 +361,22 @@ class roboGallery extends roboGalleryUtils{
361
  //$this->addJavaScriptStyle('rbsTitleLightbox','body .mfp-title',2);
362
  $this->addJavaScriptStyle('rbsTextLightbox','body .mfp-title, body .mfp-counter',2);
363
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  if(count($this->selectImages->imgArray)){
365
 
366
  if( get_option( ROBO_GALLERY_PREFIX.'jqueryVersion', 'build' )=='forced' ){
@@ -421,9 +437,11 @@ class roboGallery extends roboGalleryUtils{
421
  }
422
  if( $this->returnHtml ){
423
  $this->returnHtml =
424
- ($menu?$this->getMenu():'').
425
- '<div id="'.$this->galleryId.'" data-options="'.$this->galleryId.'" style="width:100%;" class="robo_gallery">'
426
- . $this->returnHtml
 
 
427
  .'</div>'
428
  .'<script>'.$this->compileJavaScript().'</script>';
429
 
50
  public $rbsCloseLightboxStyle = '';
51
  public $rbsArrowLightboxStyle = '';
52
 
53
+ public $rbsMainDivStyle = '';
54
 
55
 
56
  public $javaScript = '';
361
  //$this->addJavaScriptStyle('rbsTitleLightbox','body .mfp-title',2);
362
  $this->addJavaScriptStyle('rbsTextLightbox','body .mfp-title, body .mfp-counter',2);
363
 
364
+ $widthSize = get_post_meta( $this->id, ROBO_GALLERY_PREFIX.'width-size', true );
365
+ $widthSizeValue = '';
366
+ if( count($widthSize) ){
367
+ if( isset($widthSize['width']) ){
368
+ $widthSizeValue = (int) $widthSize['width'];
369
+ if($widthSizeValue){
370
+ if( isset($widthSize['widthType']) && $widthSize['widthType'] ) $widthSizeValue .= 'px';
371
+ else $widthSizeValue .= '%';
372
+ }
373
+ }
374
+ }
375
+ if(!$widthSizeValue) $widthSizeValue = '100%;';
376
+
377
+ $this->rbsMainDivStyle = 'width:'.$widthSizeValue.';';
378
+
379
+
380
  if(count($this->selectImages->imgArray)){
381
 
382
  if( get_option( ROBO_GALLERY_PREFIX.'jqueryVersion', 'build' )=='forced' ){
437
  }
438
  if( $this->returnHtml ){
439
  $this->returnHtml =
440
+ '<div style="'.$this->rbsMainDivStyle.'">'
441
+ .($menu?$this->getMenu():'').
442
+ '<div id="'.$this->galleryId.'" data-options="'.$this->galleryId.'" style="width:100%;" class="robo_gallery">'
443
+ . $this->returnHtml
444
+ .'</div>'
445
  .'</div>'
446
  .'<script>'.$this->compileJavaScript().'</script>';
447
 
includes/options/rbs_gallery_options_size.php CHANGED
@@ -26,13 +26,22 @@ $size_group = new_cmb2_box( array(
26
 
27
  //$size_group->add_field( array('type' => 'toolbox'));
28
 
 
 
 
 
 
 
 
 
 
 
29
  $size_group->add_field( array(
30
  'name' => __('Thumbs Options', 'rbs_gallery' ),
31
  'id' => ROBO_GALLERY_PREFIX . 'thumb-size-options',
32
  'type' => 'size',
33
  'level' => !ROBO_GALLERY_PRO,
34
- 'before_row' => ' <br />
35
- <div class="rbs_block">
36
  <div class="rbs_thumb_tabs">
37
  <div role="tabpanel">
38
  <ul class="nav nav-tabs" role="tablist">
26
 
27
  //$size_group->add_field( array('type' => 'toolbox'));
28
 
29
+ $size_group->add_field( array(
30
+ 'name' => __('Width ', 'rbs_gallery'),
31
+ 'id' => ROBO_GALLERY_PREFIX . 'width-size',
32
+ 'type' => 'multisize',
33
+ 'default' => array( 'width'=> 100, 'widthType'=>''),
34
+ 'bootstrap_style'=> 1,
35
+ 'before_row' => ' <br />
36
+ <div class="rbs_block">'
37
+ ));
38
+
39
  $size_group->add_field( array(
40
  'name' => __('Thumbs Options', 'rbs_gallery' ),
41
  'id' => ROBO_GALLERY_PREFIX . 'thumb-size-options',
42
  'type' => 'size',
43
  'level' => !ROBO_GALLERY_PRO,
44
+ 'before_row' => '
 
45
  <div class="rbs_thumb_tabs">
46
  <div role="tabpanel">
47
  <ul class="nav nav-tabs" role="tablist">
includes/rbs_gallery_init.php CHANGED
@@ -131,6 +131,8 @@ if( rbs_gallery_get_current_post_type() == ROBO_GALLERY_TYPE_POST && ( rbs_galle
131
  'rbstextarea/cmb-field-rbstextarea.php',
132
  'font/cmb-field-font.php',
133
  'rbsgallery/cmb-field-rbsgallery.php',
 
 
134
 
135
  ), ROBO_GALLERY_CMB_FILEDS_PATH);
136
 
131
  'rbstextarea/cmb-field-rbstextarea.php',
132
  'font/cmb-field-font.php',
133
  'rbsgallery/cmb-field-rbsgallery.php',
134
+ 'multisize/rbs-multiSize.php',
135
+
136
 
137
  ), ROBO_GALLERY_CMB_FILEDS_PATH);
138
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.robosoft.co/robogallery
4
  Tags: gallery, add gallery, photo gallery, images gallery, media gallery, responsive gallery, gallery image, gallery lightbox, Polaroid gallery, Gallery Plugin, plugin gallery, video gallery, gallery shortcode, responsive images gallery, website gallery, widget gallery, wordpress gallery, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugin, wp gallery plugins, multi categories gallery, add galleries, add picture, add pictures, album, best gallery, best gallery plugin, responsive galleries, mobile gallery, mobile galleries, responsive photo gallery, best portfolio, easy media gallery, filterable gallery, filterable portfolio, foto, fotoalbum, fotogalerie, sortable gallery, sortable galleries, free photo gallery, fullscreen gallery, galary, galeri, galerie, galerij, galery, gallary, Galleria, gallerie, galleries, gallery decription, gallery slider, gelary, gellary, gellery, google, grid gallery, image, image album, image gallery, image gallery plugin, image lightbox, image slider, image slideshow, images, jquery, jquery gallery, links, media, multiple pictures, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photoalbum, photogallery, photos, photoset, picture, pictures, plugin, plugin for gallery, portfolio, portfolio gallery, portfolio plugin, Post, posts, responsive slideshow, responsive wordpress photo gallery, seo image, slide show, slideshow, thumbnail, upload images, upload photos, batch upload, multiply images upload, view images, view pictures, wordpress portfolio plugin, multi-categories gallery, multi categories galleries, robo gallery
5
  Requires at least: 3.3
6
  Tested up to: 4.3
7
- Stable tag: 1.3.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -213,25 +213,17 @@ In our gallery we implemented layout based on columns amount. So you can general
213
 
214
  Every gallery image have additional fields where you can define custom link, title, description. One of the link option allow you to define link type, for example video link. All this options you can find in gallery images manager, inside general gallery settings
215
 
216
- = How to insert gallery into Wordpress page or post? =
217
-
218
- When you create gallery in plugin galleries manager you can go to the post or page editor and there using special wizard button insert gallery into your wordpress post or page. Another way you can insert your gallery manually using shortcode, which you can find in gallery edit mode in shortcode section on the right side of the gallery settings
219
-
220
  = How to generate shortcode for Wordpress page, post or widget? =
221
 
222
  First of all you can copy shortcode inside gallery settings , in separate shortcode block. Another way generate shortcode directly in post or page edit mode. You can find wizard button on top of content editor
223
 
224
- = How to define custom hover effect for some gallery thumbnail? =
225
-
226
- When you open gallery media manager you'll see there list of the gallery images. Click on some image and on the right side you'll see images options. Every gallery image have custom effect field where you can select different hover effect for every image of the gallery.
227
-
228
- = Do you have some limits for images types in gallery? =
229
 
230
- You can use any standard file type in our gallery: png, jpg, jpeg, gif
231
 
232
- = Do you have some limit for images size in gallery? =
233
 
234
- No, we don't have any limits for image size in our gallery.
235
 
236
  = Is it possible to create direct link on the front end to the gallery? =
237
 
@@ -241,6 +233,14 @@ Yes, you can use generated direct link inside particular gallery settings
241
 
242
  When you open gallery settings inside you'll find images manager section. Images manager make you able to add/edit descriptions and titles of every gallery image
243
 
 
 
 
 
 
 
 
 
244
  = How to customize border of the gallery thumbnails? =
245
 
246
  In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
@@ -265,6 +265,14 @@ Yes, you can have different styles of the borders and shadows for static and hov
265
 
266
  In gallery settings you can enable custom caption settings where you can customize font size and see results in live preview
267
 
 
 
 
 
 
 
 
 
268
  = How to hide titles of the gallery image in lightbox ? =
269
 
270
  In lightbox section of the gallery settings you can find hide title option. If you enable it titles of the gallery images in lightbox will be turned off.
@@ -273,17 +281,17 @@ In lightbox section of the gallery settings you can find hide title option. If y
273
 
274
  In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
275
 
276
- = How to define custom link for some gallery images? =
277
 
278
- Every gallery image have additional fields where you can define custom link, title, description. All this options you can find in gallery images manager, inside general gallery settings
279
 
280
- = How to customize gallery layouts for different screen resolutions? =
281
 
282
- In admin section of the gallery you'll find columns options which provide you advanced customization options for different resolutions. You can define some static size or auto size for every resolution.
283
 
284
- = Is it possible to turn off border of the gallery thumbnails? =
285
 
286
- Yes, in gallery options you can turn on/off border option
287
 
288
  = How to define size of the gallery images thumbnails? =
289
 
@@ -297,14 +305,6 @@ You can change size, color and style of gallery thumbnails borders and shadows.
297
 
298
  Shadows of the thumbnails you can customize in gallery settings. With gallery settings you can change size , color and position of the gallery thumbnails shadow
299
 
300
- = How to change amount of images loading on gallery page? =
301
-
302
- In gallery settings we have few options which makes you able to select amount of the images for the first load and for load more action
303
-
304
- = How to enable lazy load in gallery options? =
305
-
306
- In gallery settings you can find option to enable/disable lazy load, also there you'll have alot of additional options for customization of the loading process
307
-
308
  = How to change color of the gallery interface elements? =
309
 
310
  Color of every gallery front end interface element could be changed changed in admin section with color selector. There you can change colors of the menu buttons, load more button, borders, shadows, backgrounds and etc.
@@ -333,14 +333,14 @@ In gallery settings you can find images manager where you can change settings of
333
 
334
  Yes, you can use HTML tags inside gallery image description field
335
 
336
- = How to change font color of the gallery image description text? =
337
-
338
- In gallery settings, when enabled custom hover settings you can customize style of the gallery image description text. In this settings you can change color of the text
339
-
340
  = How to change font style of the gallery image caption? =
341
 
342
  In gallery settings you can enable custom caption settings where you can customize font style and see results in live preview
343
 
 
 
 
 
344
  = How to define custom ALT for gallery image? =
345
 
346
  When you open gallery images manager you can define alt for every gallery image there
@@ -559,6 +559,13 @@ If any problem occurs, please contact us.
559
 
560
  == Changelog ==
561
 
 
 
 
 
 
 
 
562
  = 1.3.9 =
563
  * Fixed self show images options
564
  * Enabled to show self images by default after gallery update
@@ -705,6 +712,9 @@ If any problem occurs, please contact us.
705
 
706
  == Upgrade Notice ==
707
 
 
 
 
708
  = 1.3.9 =
709
  Fixed self show images options, enabled to show self images by default after gallery update
710
 
4
  Tags: gallery, add gallery, photo gallery, images gallery, media gallery, responsive gallery, gallery image, gallery lightbox, Polaroid gallery, Gallery Plugin, plugin gallery, video gallery, gallery shortcode, responsive images gallery, website gallery, widget gallery, wordpress gallery, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugin, wp gallery plugins, multi categories gallery, add galleries, add picture, add pictures, album, best gallery, best gallery plugin, responsive galleries, mobile gallery, mobile galleries, responsive photo gallery, best portfolio, easy media gallery, filterable gallery, filterable portfolio, foto, fotoalbum, fotogalerie, sortable gallery, sortable galleries, free photo gallery, fullscreen gallery, galary, galeri, galerie, galerij, galery, gallary, Galleria, gallerie, galleries, gallery decription, gallery slider, gelary, gellary, gellery, google, grid gallery, image, image album, image gallery, image gallery plugin, image lightbox, image slider, image slideshow, images, jquery, jquery gallery, links, media, multiple pictures, page, pagination gallery, pagination portfolio, photo, photo album, photo albums, photoalbum, photogallery, photos, photoset, picture, pictures, plugin, plugin for gallery, portfolio, portfolio gallery, portfolio plugin, Post, posts, responsive slideshow, responsive wordpress photo gallery, seo image, slide show, slideshow, thumbnail, upload images, upload photos, batch upload, multiply images upload, view images, view pictures, wordpress portfolio plugin, multi-categories gallery, multi categories galleries, robo gallery
5
  Requires at least: 3.3
6
  Tested up to: 4.3
7
+ Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
213
 
214
  Every gallery image have additional fields where you can define custom link, title, description. One of the link option allow you to define link type, for example video link. All this options you can find in gallery images manager, inside general gallery settings
215
 
 
 
 
 
216
  = How to generate shortcode for Wordpress page, post or widget? =
217
 
218
  First of all you can copy shortcode inside gallery settings , in separate shortcode block. Another way generate shortcode directly in post or page edit mode. You can find wizard button on top of content editor
219
 
220
+ = How to insert gallery into Wordpress page or post? =
 
 
 
 
221
 
222
+ When you create gallery in plugin galleries manager you can go to the post or page editor and there using special wizard button insert gallery into your wordpress post or page. Another way you can insert your gallery manually using shortcode, which you can find in gallery edit mode in shortcode section on the right side of the gallery settings
223
 
224
+ = How to define custom hover effect for some gallery thumbnail? =
225
 
226
+ When you open gallery media manager you'll see there list of the gallery images. Click on some image and on the right side you'll see images options. Every gallery image have custom effect field where you can select different hover effect for every image of the gallery.
227
 
228
  = Is it possible to create direct link on the front end to the gallery? =
229
 
233
 
234
  When you open gallery settings inside you'll find images manager section. Images manager make you able to add/edit descriptions and titles of every gallery image
235
 
236
+ = Do you have some limits for images types in gallery? =
237
+
238
+ You can use any standard file type in our gallery: png, jpg, jpeg, gif
239
+
240
+ = Do you have some limit for images size in gallery? =
241
+
242
+ No, we don't have any limits for image size in our gallery.
243
+
244
  = How to customize border of the gallery thumbnails? =
245
 
246
  In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
265
 
266
  In gallery settings you can enable custom caption settings where you can customize font size and see results in live preview
267
 
268
+ = How to define custom link for some gallery images? =
269
+
270
+ Every gallery image have additional fields where you can define custom link, title, description. All this options you can find in gallery images manager, inside general gallery settings
271
+
272
+ = How to customize gallery layouts for different screen resolutions? =
273
+
274
+ In admin section of the gallery you'll find columns options which provide you advanced customization options for different resolutions. You can define some static size or auto size for every resolution.
275
+
276
  = How to hide titles of the gallery image in lightbox ? =
277
 
278
  In lightbox section of the gallery settings you can find hide title option. If you enable it titles of the gallery images in lightbox will be turned off.
281
 
282
  In gallery settings you can find general settings section where you can turn on/off thumbnails border. Also you can customize there style of the border, namely width, color and style of the thumbnail borders
283
 
284
+ = Is it possible to turn off border of the gallery thumbnails? =
285
 
286
+ Yes, in gallery options you can turn on/off border option
287
 
288
+ = How to change amount of images loading on gallery page? =
289
 
290
+ In gallery settings we have few options which makes you able to select amount of the images for the first load and for load more action
291
 
292
+ = How to enable lazy load in gallery options? =
293
 
294
+ In gallery settings you can find option to enable/disable lazy load, also there you'll have alot of additional options for customization of the loading process
295
 
296
  = How to define size of the gallery images thumbnails? =
297
 
305
 
306
  Shadows of the thumbnails you can customize in gallery settings. With gallery settings you can change size , color and position of the gallery thumbnails shadow
307
 
 
 
 
 
 
 
 
 
308
  = How to change color of the gallery interface elements? =
309
 
310
  Color of every gallery front end interface element could be changed changed in admin section with color selector. There you can change colors of the menu buttons, load more button, borders, shadows, backgrounds and etc.
333
 
334
  Yes, you can use HTML tags inside gallery image description field
335
 
 
 
 
 
336
  = How to change font style of the gallery image caption? =
337
 
338
  In gallery settings you can enable custom caption settings where you can customize font style and see results in live preview
339
 
340
+ = How to change font color of the gallery image description text? =
341
+
342
+ In gallery settings, when enabled custom hover settings you can customize style of the gallery image description text. In this settings you can change color of the text
343
+
344
  = How to define custom ALT for gallery image? =
345
 
346
  When you open gallery images manager you can define alt for every gallery image there
559
 
560
  == Changelog ==
561
 
562
+ = 1.4.0 =
563
+ * Added new gallery width option
564
+ * Gallery width values in pixels
565
+ * Gallery width values in percents
566
+ * Small code fixes and optimization
567
+
568
+
569
  = 1.3.9 =
570
  * Fixed self show images options
571
  * Enabled to show self images by default after gallery update
712
 
713
  == Upgrade Notice ==
714
 
715
+ = 1.4.0 =
716
+ Added new gallery width option, gallery width values in pixels and percents
717
+
718
  = 1.3.9 =
719
  Fixed self show images options, enabled to show self images by default after gallery update
720
 
robogallery.php CHANGED
@@ -8,7 +8,7 @@
8
  * Plugin Name: Robo Gallery
9
  * Plugin URI: http://robosoft.co/robogallery
10
  * Description: A responsive, easy and elegant way to show gallery.
11
- * Version: 1.3.9
12
  * Author: RoboSoft (c)
13
  * Author URI: http://robosoft.co/robogallery
14
  * License: GPL-2.0+
@@ -19,7 +19,7 @@
19
 
20
  if ( ! defined( 'WPINC' ) ) die;
21
  define("ROBO_GALLERY", 1);
22
- define("ROBO_GALLERY_VERSION", '1.3.9');
23
  define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
24
  define("ROBO_GALLERY_SPECIAL", 0);
25
 
8
  * Plugin Name: Robo Gallery
9
  * Plugin URI: http://robosoft.co/robogallery
10
  * Description: A responsive, easy and elegant way to show gallery.
11
+ * Version: 1.4.0
12
  * Author: RoboSoft (c)
13
  * Author URI: http://robosoft.co/robogallery
14
  * License: GPL-2.0+
19
 
20
  if ( ! defined( 'WPINC' ) ) die;
21
  define("ROBO_GALLERY", 1);
22
+ define("ROBO_GALLERY_VERSION", '1.4.0');
23
  define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
24
  define("ROBO_GALLERY_SPECIAL", 0);
25