Gallery – Photo Gallery and Images Gallery - Version 2.8.23

Version Description

  • Fix of the media manager resources upload, adtitional file type check
Download this release

Release Info

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

Code changes from version 2.8.22 to 2.8.23

app/app.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  * Robo Gallery
5
- * Version: 2.8.22 - 95673
6
  * By Robosoft
7
  *
8
  * Contact: https://robosoft.co/robogallery/
2
 
3
  /*
4
  * Robo Gallery
5
+ * Version: 2.8.23 - 31205
6
  * By Robosoft
7
  *
8
  * Contact: https://robosoft.co/robogallery/
app/class.brand.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  * Robo Gallery
5
- * Version: 2.8.22 - 95673
6
  * By Robosoft
7
  *
8
  * Contact: https://robosoft.co/robogallery/
2
 
3
  /*
4
  * Robo Gallery
5
+ * Version: 2.8.23 - 31205
6
  * By Robosoft
7
  *
8
  * Contact: https://robosoft.co/robogallery/
app/class.listing.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/class.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/class.view.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  * Robo Gallery
5
- * Version: 2.8.22 - 95673
6
  * By Robosoft
7
  *
8
  * Contact: https://robosoft.co/robogallery/
2
 
3
  /*
4
  * Robo Gallery
5
+ * Version: 2.8.23 - 31205
6
  * By Robosoft
7
  *
8
  * Contact: https://robosoft.co/robogallery/
app/extensions/dashboard/assets/style.css CHANGED
@@ -1,7 +1,7 @@
1
 
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
 
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/dashboard/class.dashboard.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/dashboard/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/dashboard/overview.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/dashboard/video_guide.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/manager/class.addons.action.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/manager/class.addons.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/manager/css/style.css CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  * Robo Gallery
3
- * Version: 2.8.22 - 95673
4
  * By Robosoft
5
  *
6
  * Contact: https://robosoft.co/robogallery/
1
  /*
2
  * Robo Gallery
3
+ * Version: 2.8.23 - 31205
4
  * By Robosoft
5
  *
6
  * Contact: https://robosoft.co/robogallery/
app/extensions/manager/init.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Robo Gallery
4
- * Version: 2.8.22 - 95673
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
1
  <?php
2
  /*
3
  * Robo Gallery
4
+ * Version: 2.8.23 - 31205
5
  * By Robosoft
6
  *
7
  * Contact: https://robosoft.co/robogallery/
app/extensions/manager/js/script.js CHANGED
@@ -1,6 +1,6 @@
1
  /*
2
  * Robo Gallery
3
- * Version: 2.8.22 - 95673
4
  * By Robosoft
5
  *
6
  * Contact: https://robosoft.co/robogallery/
1
  /*
2
  * Robo Gallery
3
+ * Version: 2.8.23 - 31205
4
  * By Robosoft
5
  *
6
  * Contact: https://robosoft.co/robogallery/
includes/frontend/rbs_gallery_source.php CHANGED
@@ -94,33 +94,64 @@ class roboGalleryImages{
94
  $tempCatArray = array_reverse ($tempCatArray);
95
  $this->catArray = array_merge($this->catArray, $tempCatArray );
96
 
97
- for($i=0;$i<count($this->imgArray);$i++){
98
- $img = $this->imgArray[$i];
99
- $thumb = wp_get_attachment_image_src( $img['id'] , $this->thumbsource);
100
 
101
- if( !is_array($thumb) || !count($thumb) ){
102
- unset($this->imgArray[$i]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  } else {
104
- $this->imgArray[$i]['image'] = wp_get_attachment_url( $img['id'] );
105
- $this->imgArray[$i]['thumb'] = (isset($thumb) && count($thumb) ) ? $thumb[0] : '';
106
- $this->imgArray[$i]['sizeW'] = (isset($thumb[1]) && count($thumb)) ? $thumb[1] : $this->width; //*($i%2 ? 1.5: 1)
107
- $this->imgArray[$i]['sizeH'] = (isset($thumb[2]) && count($thumb)) ? $thumb[2] : $this->height;
108
- $this->imgArray[$i]['data'] = get_post($img['id'] );
109
- $this->imgArray[$i]['link'] = get_post_meta( $img['id'], ROBO_GALLERY_PREFIX.'gallery_link', true );
110
- $this->imgArray[$i]['typelink'] = get_post_meta( $img['id'], ROBO_GALLERY_PREFIX.'gallery_type_link', true );
111
-
112
- $this->imgArray[$i]['videolink'] = get_post_meta( $img['id'], ROBO_GALLERY_PREFIX.'gallery_video_link', true );
113
- $videolink = $this->imgArray[$i]['videolink'];
 
 
114
  if( $videolink && strpos($videolink, 'youtu')!==false ){
115
  $matches =array();
116
  preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $videolink, $matches);
117
  #preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $videolink, $matches);
118
- if( count($matches) && $matches[0] ){
119
- $this->imgArray[$i]['videolink']= 'https://youtube.com/v='.$matches[0];
120
  }
121
  }
122
 
123
- $this->imgArray[$i]['col'] = get_post_meta( $img['id'], ROBO_GALLERY_PREFIX.'gallery_col', true );
124
 
125
  /*switch ($i) {
126
  case 4:
@@ -135,55 +166,55 @@ class roboGalleryImages{
135
  //if( !$this->imgArray[$i]['col'] && ( $i % 2 == 0) ) $this->imgArray[$i]['col'] = rand(2,3);
136
 
137
 
138
- $this->imgArray[$i]['effect'] = get_post_meta( $img['id'], ROBO_GALLERY_PREFIX.'gallery_effect', true );
139
- $this->imgArray[$i]['alt'] = get_post_meta( $img['id'], '_wp_attachment_image_alt', true );
140
 
141
- $this->imgArray[$i]['tags'] = array();
142
-
143
- if( $tags = get_post_meta( $img['id'], ROBO_GALLERY_PREFIX.'gallery_tags', true ) ){
144
- $tags = explode( ',', $tags);
145
- if(count($tags)){
146
- for ($j=0; $j < count($tags); $j++) {
147
- $clearTag = trim($tags[$j]);
148
- $tags[$j] = $clearTag ;
149
- if( array_search($clearTag, $this->tags)===false ) $this->tags[] = $clearTag;
150
- }
151
- }
152
- $this->imgArray[$i]['tags'] =$tags;
153
- }
154
  }
155
 
156
- }
157
- //print_r($this->tags);
158
 
159
- switch ( $this->orderby ) {
160
- case 'random': shuffle ($this->imgArray); break;
161
- case 'titleU': usort($this->imgArray,array('roboGalleryImages','titleUp') ); break;
162
- case 'titleD': usort($this->imgArray,array('roboGalleryImages','titleDown') ); break;
163
- case 'dateU': usort($this->imgArray,array('roboGalleryImages','dateUp') ); break;
164
- case 'dateD': usort($this->imgArray,array('roboGalleryImages','dateDown') ); break;
165
- case 'categoryU': $this->imgArray = array_reverse($this->imgArray); break;
166
- case 'categoryD':
167
- default:
168
- break;
 
 
 
 
169
  }
170
-
 
171
  }
172
 
 
 
 
 
173
  private static function titleUp($item1,$item2){
174
  return strcasecmp ($item1['data']->post_title, $item2['data']->post_title)*-1;
175
  }
176
 
 
177
  private static function titleDown($item1,$item2){
178
  return strcasecmp ($item1['data']->post_title, $item2['data']->post_title);
179
  }
180
 
 
181
  private static function dateUp($item1,$item2){
182
  if($item1['data']->post_date==$item2['data']->post_date) return 0;
183
  if($item1['data']->post_date > $item2['data']->post_date) return 1;
184
  else return -1;
185
  }
186
 
 
187
  private static function dateDown($item1,$item2){
188
  if($item1['data']->post_date==$item2['data']->post_date) return 0;
189
  if($item1['data']->post_date > $item2['data']->post_date) return -1;
94
  $tempCatArray = array_reverse ($tempCatArray);
95
  $this->catArray = array_merge($this->catArray, $tempCatArray );
96
 
97
+ $this->initImagesData();
98
+ $this->initImagesOrder();
 
99
 
100
+ }
101
+
102
+
103
+ private function initImagesOrder( ){
104
+ switch ( $this->orderby ) {
105
+ case 'random': shuffle ($this->imgArray); break;
106
+ case 'titleU': usort($this->imgArray,array('roboGalleryImages','titleUp') ); break;
107
+ case 'titleD': usort($this->imgArray,array('roboGalleryImages','titleDown') ); break;
108
+ case 'dateU': usort($this->imgArray,array('roboGalleryImages','dateUp') ); break;
109
+ case 'dateD': usort($this->imgArray,array('roboGalleryImages','dateDown') ); break;
110
+ case 'categoryU': $this->imgArray = array_reverse($this->imgArray); break;
111
+ case 'categoryD':
112
+ default:
113
+ break;
114
+ }
115
+ }
116
+
117
+
118
+ private function initImagesData( ){
119
+
120
+ if( !is_array($this->imgArray) || count($this->imgArray) == 0 ){
121
+ $this->imgArray = array();
122
+ return;
123
+ }
124
+
125
+ foreach( $this->imgArray as $imgKey => $img) {
126
+ $imgId = $img['id'];
127
+
128
+ $thumb = wp_get_attachment_image_src( $imgId , $this->thumbsource);
129
+
130
+ if( !is_array($thumb) || count($thumb) < 1 ){
131
+ unset($this->imgArray[$imgKey]);
132
  } else {
133
+ $this->imgArray[$imgKey]['image'] = wp_get_attachment_url( $imgId );
134
+ $this->imgArray[$imgKey]['thumb'] = ( isset($thumb[0]) ) ? $thumb[0] : '';
135
+ $this->imgArray[$imgKey]['sizeW'] = ( isset($thumb[1]) ) ? $thumb[1] : $this->width; //*($i%2 ? 1.5: 1)
136
+ $this->imgArray[$imgKey]['sizeH'] = ( isset($thumb[2]) ) ? $thumb[2] : $this->height;
137
+ $this->imgArray[$imgKey]['data'] = get_post( $imgId );
138
+ $this->imgArray[$imgKey]['link'] = get_post_meta( $imgId, ROBO_GALLERY_PREFIX.'gallery_link', true );
139
+ $this->imgArray[$imgKey]['typelink'] = get_post_meta( $imgId, ROBO_GALLERY_PREFIX.'gallery_type_link', true );
140
+
141
+ $this->imgArray[$imgKey]['videolink'] = get_post_meta( $imgId, ROBO_GALLERY_PREFIX.'gallery_video_link', true );
142
+
143
+ $videolink = $this->imgArray[$imgKey]['videolink'];
144
+
145
  if( $videolink && strpos($videolink, 'youtu')!==false ){
146
  $matches =array();
147
  preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $videolink, $matches);
148
  #preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $videolink, $matches);
149
+ if( is_array($matches) && isset($matches[0]) && $matches[0] ){
150
+ $this->imgArray[$imgKey]['videolink']= 'https://youtube.com/v='.$matches[0];
151
  }
152
  }
153
 
154
+ $this->imgArray[$imgKey]['col'] = get_post_meta( $imgId, ROBO_GALLERY_PREFIX.'gallery_col', true );
155
 
156
  /*switch ($i) {
157
  case 4:
166
  //if( !$this->imgArray[$i]['col'] && ( $i % 2 == 0) ) $this->imgArray[$i]['col'] = rand(2,3);
167
 
168
 
169
+ $this->imgArray[$imgKey]['effect'] = get_post_meta( $imgId, ROBO_GALLERY_PREFIX.'gallery_effect', true );
170
+ $this->imgArray[$imgKey]['alt'] = get_post_meta( $imgId, '_wp_attachment_image_alt', true );
171
 
172
+ $this->imgArray[$imgKey]['tags'] = $this->getTags( $imgId );
 
 
 
 
 
 
 
 
 
 
 
 
173
  }
174
 
175
+ }
176
+ }
177
 
178
+
179
+ private function getTags( $imageId ){
180
+ $tagsArray = array();
181
+
182
+ if( $tags = get_post_meta( $imageId, ROBO_GALLERY_PREFIX.'gallery_tags', true ) ){
183
+ $tags = explode( ',', $tags);
184
+ if(count($tags)){
185
+ for ($j=0; $j < count($tags); $j++) {
186
+ $clearTag = trim($tags[$j]);
187
+ $tags[$j] = $clearTag ;
188
+ if( array_search($clearTag, $this->tags)===false ) $this->tags[] = $clearTag;
189
+ }
190
+ }
191
+ $tagsArray = $tags;
192
  }
193
+
194
+ return $tagsArray;
195
  }
196
 
197
+
198
+ /* ==== */
199
+
200
+
201
  private static function titleUp($item1,$item2){
202
  return strcasecmp ($item1['data']->post_title, $item2['data']->post_title)*-1;
203
  }
204
 
205
+
206
  private static function titleDown($item1,$item2){
207
  return strcasecmp ($item1['data']->post_title, $item2['data']->post_title);
208
  }
209
 
210
+
211
  private static function dateUp($item1,$item2){
212
  if($item1['data']->post_date==$item2['data']->post_date) return 0;
213
  if($item1['data']->post_date > $item2['data']->post_date) return 1;
214
  else return -1;
215
  }
216
 
217
+
218
  private static function dateDown($item1,$item2){
219
  if($item1['data']->post_date==$item2['data']->post_date) return 0;
220
  if($item1['data']->post_date > $item2['data']->post_date) return -1;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://robosoft.co/robogallery
4
  Tags: gallery, photo gallery, image gallery, wordpress gallery plugin, responsive gallery
5
  Requires at least: 3.3
6
  Tested up to: 5.1
7
- Stable tag: 2.8.22
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -203,6 +203,9 @@ If any problem occurs, please contact us.
203
 
204
  == Changelog ==
205
 
 
 
 
206
  = 2.8.22 =
207
  * Fix of the Gutenberg block and lightbox code
208
 
@@ -504,6 +507,9 @@ If any problem occurs, please contact us.
504
 
505
  == Upgrade Notice ==
506
 
 
 
 
507
  = 2.8.22 =
508
  Fix of the Gutenberg block and lightbox code
509
 
4
  Tags: gallery, photo gallery, image gallery, wordpress gallery plugin, responsive gallery
5
  Requires at least: 3.3
6
  Tested up to: 5.1
7
+ Stable tag: 2.8.23
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
203
 
204
  == Changelog ==
205
 
206
+ = 2.8.23 =
207
+ * Fix of the media manager resources upload, adtitional file type check
208
+
209
  = 2.8.22 =
210
  * Fix of the Gutenberg block and lightbox code
211
 
507
 
508
  == Upgrade Notice ==
509
 
510
+ = 2.8.23 =
511
+ Fix of the media manager resources upload, additional file type check
512
+
513
  = 2.8.22 =
514
  Fix of the Gutenberg block and lightbox code
515
 
robogallery.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Robo Gallery
4
  Plugin URI: https://robosoft.co/wordpress-gallery-plugin
5
  Description: Gallery modes photo gallery, images gallery, video gallery, Polaroid gallery, gallery lighbox, portfolio gallery, responsive gallery
6
- Version: 2.8.22
7
  Author: RoboSoft
8
  Author URI: https://robosoft.co/wordpress-gallery-plugin
9
  License: GPLv3 or later
@@ -15,7 +15,7 @@ if(!defined('WPINC'))die;
15
  if(!defined("ABSPATH"))exit;
16
 
17
  define("ROBO_GALLERY", 1);
18
- define("ROBO_GALLERY_VERSION", '2.8.22');
19
 
20
  define("ROBO_GALLERY_OPTIONS", 'rbs_opt_');
21
 
3
  Plugin Name: Robo Gallery
4
  Plugin URI: https://robosoft.co/wordpress-gallery-plugin
5
  Description: Gallery modes photo gallery, images gallery, video gallery, Polaroid gallery, gallery lighbox, portfolio gallery, responsive gallery
6
+ Version: 2.8.23
7
  Author: RoboSoft
8
  Author URI: https://robosoft.co/wordpress-gallery-plugin
9
  License: GPLv3 or later
15
  if(!defined("ABSPATH"))exit;
16
 
17
  define("ROBO_GALLERY", 1);
18
+ define("ROBO_GALLERY_VERSION", '2.8.23');
19
 
20
  define("ROBO_GALLERY_OPTIONS", 'rbs_opt_');
21