Gallery – Photo Gallery and Images Gallery - Version 2.7.7

Version Description

  • Updated cache functionality of the gallery
  • Added gallery cache expire option
Download this release

Release Info

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

Code changes from version 2.7.6 to 2.7.7

includes/extensions/stats/js/index.html DELETED
File without changes
includes/extensions/stats/js/script.js DELETED
@@ -1,16 +0,0 @@
1
- /*
2
- * Robo Gallery
3
- * Version: 1.0
4
- * By Robosoft
5
- *
6
- * Contact: https://robosoft.co/robogallery/
7
- * Created: 2015
8
- * Licensed under the GPLv2 license - http://opensource.org/licenses/gpl-2.0.php
9
- *
10
- * Copyright (c) 2014-2018, Robosoft. All rights reserved.
11
- * Available only in https://robosoft.co/robogallery/
12
- */
13
-
14
- jQuery(document).ready( function($){
15
- jQuery(".wp-admin.edit-php.post-type-robo_gallery_table .wrap h1 ~ .page-title-action:last").after("<a href='edit.php?post_type=robo_gallery_table&page=robo-gallery-stats' id='rbs_stats_button' class='page-title-action'>Statistics Gallery</a>");
16
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/extensions/stats/stats.class.php CHANGED
@@ -22,21 +22,26 @@ class ROBO_GALLERY_STATS{
22
  public function __construct($postType){
23
  $this->postType = $postType;
24
  $this->assetsUri = plugin_dir_url(__FILE__);
25
- add_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
26
  }
27
 
28
- public function enqueueScripts(){
29
  if (
30
  rbs_gallery_get_current_post_type() == ROBO_GALLERY_TYPE_POST &&
31
  rbs_gallery_is_edit_page('list')
32
  ) {
33
- wp_enqueue_script(
34
- 'robo-gallery-stats-js',
35
- $this->assetsUri . '/js/script.js',
36
- array(),
37
- false,
38
- true
39
- );
 
 
 
 
 
40
  }
41
  }
42
  }
22
  public function __construct($postType){
23
  $this->postType = $postType;
24
  $this->assetsUri = plugin_dir_url(__FILE__);
25
+ add_action('admin_footer', array($this, 'script'));
26
  }
27
 
28
+ public function script(){
29
  if (
30
  rbs_gallery_get_current_post_type() == ROBO_GALLERY_TYPE_POST &&
31
  rbs_gallery_is_edit_page('list')
32
  ) {
33
+ ?>
34
+ <script type="text/javascript">
35
+ (function ($, undefined){
36
+
37
+ $(document).ready(function() {
38
+ $(".wp-admin.edit-php.post-type-robo_gallery_table .wrap .page-title-action:last").
39
+ after("<a href='edit.php?post_type=robo_gallery_table&page=robo-gallery-stats' id='rbs_stats_button' class='page-title-action'><?php _e('Statistics Gallery', 'robo-gallery'); ?></a>");
40
+ });
41
+
42
+ }(jQuery));
43
+ </script>
44
+ <?php
45
  }
46
  }
47
  }
includes/frontend/rbs_gallery_class.php CHANGED
@@ -632,7 +632,11 @@ class roboGallery extends roboGalleryUtils{
632
  $debugText = '';
633
 
634
  if( $cache ){
635
- set_transient( 'robo_gallery_cached_id'.$cacheId , $this->returnHtml, 12 * HOUR_IN_SECONDS );
 
 
 
 
636
 
637
  if($this->debug){
638
  $this->endTime = microtime(true);
632
  $debugText = '';
633
 
634
  if( $cache ){
635
+
636
+ $option_cache = (int) get_option(ROBO_GALLERY_PREFIX.'cache', '12');
637
+ if(!$option_cache) $option_cache = 12;
638
+
639
+ set_transient( 'robo_gallery_cached_id'.$cacheId , $this->returnHtml, $option_cache * HOUR_IN_SECONDS );
640
 
641
  if($this->debug){
642
  $this->endTime = microtime(true);
includes/options/cache.php CHANGED
@@ -40,7 +40,8 @@ $cache_box->add_field( array(
40
 
41
  <div class="row">
42
  <div class="col-sm-12">
43
- '.__('If you modify settings gallery generate new cache after save.', 'robo-gallery').'
 
44
  </div>
45
  </div>
46
 
40
 
41
  <div class="row">
42
  <div class="col-sm-12">
43
+ '.__('If you modify settings gallery generate new cache after save.', 'robo-gallery').'<br/>
44
+ '.__('You can configure timeout for cleaning of the cached resources ', 'robo-gallery').' <a target="_blank" href="'.admin_url( 'edit.php?post_type=robo_gallery_table&page=robo-gallery-settings').'">'.__('here').'</a>.
45
  </div>
46
  </div>
47
 
includes/rbs_gallery_about.php CHANGED
@@ -69,5 +69,5 @@ if(!ROBO_GALLERY_PRO){
69
  </div>
70
  ';
71
  }
72
- echo '<div class="rbs_about_string2">Copyright &copy; 2014 - 2017 RoboSoft '.__('All Rights Reserved', 'robo-gallery').'.</div>
73
  ';
69
  </div>
70
  ';
71
  }
72
+ echo '<div class="rbs_about_string2">Copyright &copy; 2014 - 2018 RoboSoft '.__('All Rights Reserved', 'robo-gallery').'.</div>
73
  ';
includes/rbs_gallery_settings.php CHANGED
@@ -38,6 +38,8 @@ class Robo_Gallery_Settings {
38
 
39
 
40
  function settings(){
 
 
41
  register_setting( 'robo_gallery_settings_comp', ROBO_GALLERY_PREFIX.'categoryShow' );
42
  register_setting( 'robo_gallery_settings_comp', ROBO_GALLERY_PREFIX.'jqueryVersion' );
43
  register_setting( 'robo_gallery_settings_comp', ROBO_GALLERY_PREFIX.'fontLoad' );
@@ -55,6 +57,9 @@ class Robo_Gallery_Settings {
55
  function tabs( ){
56
  echo '
57
  <h2 class="nav-tab-wrapper">
 
 
 
58
  <a href="edit.php?post_type=robo_gallery_table&page=robo-gallery-settings&tab=comp" class="nav-tab '.( $this->active_tab == 'comp' ? 'nav-tab-active' : '' ).'">
59
  '.__('Compatibility Settings', 'robo-gallery').'
60
  </a>
@@ -78,11 +83,11 @@ class Robo_Gallery_Settings {
78
 
79
  $this->enqueue();
80
 
81
- $this->active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'comp';
82
 
83
  echo '
84
  <div class="wrap">
85
- <h1>'.__('Robo Gallery', 'robo-gallery').'</h1>';
86
 
87
  settings_errors();
88
 
@@ -92,7 +97,11 @@ class Robo_Gallery_Settings {
92
 
93
  echo '<table class="form-table">';
94
 
95
- if( $this->active_tab == 'comp' ) {
 
 
 
 
96
  settings_fields( 'robo_gallery_settings_comp' );
97
  do_settings_sections( 'robo_gallery_settings_comp' );
98
  $this->compOptions();
@@ -113,11 +122,31 @@ class Robo_Gallery_Settings {
113
  echo '
114
  </form>
115
  </div>
116
- <div class="rbs_about_string2">Copyright &copy; 2014 - 2017 <a href="https://robosoft.co/robogallery">RoboSoft</a> All Rights Reserved</div>';
117
 
118
  }
119
 
120
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
 
122
  function compOptions(){
123
  ?>
38
 
39
 
40
  function settings(){
41
+ register_setting( 'robo_gallery_settings_cache', ROBO_GALLERY_PREFIX.'cache' );
42
+
43
  register_setting( 'robo_gallery_settings_comp', ROBO_GALLERY_PREFIX.'categoryShow' );
44
  register_setting( 'robo_gallery_settings_comp', ROBO_GALLERY_PREFIX.'jqueryVersion' );
45
  register_setting( 'robo_gallery_settings_comp', ROBO_GALLERY_PREFIX.'fontLoad' );
57
  function tabs( ){
58
  echo '
59
  <h2 class="nav-tab-wrapper">
60
+ <a href="edit.php?post_type=robo_gallery_table&page=robo-gallery-settings&tab=cache" class="nav-tab '.( $this->active_tab == 'cache' ? 'nav-tab-active' : '' ).'">
61
+ '.__('Cache Settings', 'robo-gallery').'
62
+ </a>
63
  <a href="edit.php?post_type=robo_gallery_table&page=robo-gallery-settings&tab=comp" class="nav-tab '.( $this->active_tab == 'comp' ? 'nav-tab-active' : '' ).'">
64
  '.__('Compatibility Settings', 'robo-gallery').'
65
  </a>
83
 
84
  $this->enqueue();
85
 
86
+ $this->active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'cache';
87
 
88
  echo '
89
  <div class="wrap">
90
+ <h1>'.__('Robo Gallery Settings', 'robo-gallery').'</h1>';
91
 
92
  settings_errors();
93
 
97
 
98
  echo '<table class="form-table">';
99
 
100
+ if( $this->active_tab == 'cache' ) {
101
+ settings_fields( 'robo_gallery_settings_cache' );
102
+ do_settings_sections( 'robo_gallery_settings_cache' );
103
+ $this->cacheOptions();
104
+ } elseif( $this->active_tab == 'comp' ) {
105
  settings_fields( 'robo_gallery_settings_comp' );
106
  do_settings_sections( 'robo_gallery_settings_comp' );
107
  $this->compOptions();
122
  echo '
123
  </form>
124
  </div>
125
+ <div class="rbs_about_string2">Copyright &copy; 2014 - 2018 <a href="https://robosoft.co/robogallery">RoboSoft</a> All Rights Reserved</div>';
126
 
127
  }
128
 
129
+ function cacheOptions(){
130
+ $option_cache = (int) get_option(ROBO_GALLERY_PREFIX.'cache', '12');
131
+ if(!$option_cache) $option_cache = 12;
132
+ ?>
133
+ <tr>
134
+ <th scope="row"><?php _e('Clear cache timeout', 'robo-gallery'); ?></th>
135
+ <td>
136
+ <fieldset>
137
+ <input name="<?php echo ROBO_GALLERY_PREFIX.'cache'; ?>" id="<?php echo ROBO_GALLERY_PREFIX.'cache'; ?>" value="<?php echo $option_cache; ?>" class="small-text" type="text"> hours
138
+ </fieldset>
139
+ </td>
140
+ </tr>
141
+ <tr>
142
+ <td colspan="2">
143
+ <p class="description">
144
+ <?php _e("This is timeout for the clear gallery cache option. Value in hours for the cleaning period of the cached resources.", 'robo-gallery'); ?>
145
+ </p>
146
+ </td>
147
+ </tr>
148
+ <?php
149
+ }
150
 
151
  function compOptions(){
152
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://robosoft.co/robogallery
4
  Tags: gallery, photo gallery, images gallery, gallery images, wordpress gallery plugin, responsive gallery, categories gallery, Polaroid gallery, gallery lightbox, portfolio gallery, video gallery, Gallery Plugin, Robo Gallery
5
  Requires at least: 3.3
6
  Tested up to: 4.9
7
- Stable tag: 2.7.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -259,6 +259,10 @@ If any problem occurs, please contact us.
259
 
260
  == Changelog ==
261
 
 
 
 
 
262
  = 2.7.6 =
263
  * Added copy shortcode by click in gallery listing
264
  * Added gallery sorting configrmation message
@@ -440,6 +444,10 @@ If any problem occurs, please contact us.
440
 
441
  == Upgrade Notice ==
442
 
 
 
 
 
443
  = 2.7.6 =
444
  Added copy shortcode by click in gallery listing
445
  Added gallery sorting configrmation message
4
  Tags: gallery, photo gallery, images gallery, gallery images, wordpress gallery plugin, responsive gallery, categories gallery, Polaroid gallery, gallery lightbox, portfolio gallery, video gallery, Gallery Plugin, Robo Gallery
5
  Requires at least: 3.3
6
  Tested up to: 4.9
7
+ Stable tag: 2.7.7
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
259
 
260
  == Changelog ==
261
 
262
+ = 2.7.7 =
263
+ * Updated cache functionality of the gallery
264
+ * Added gallery cache expire option
265
+
266
  = 2.7.6 =
267
  * Added copy shortcode by click in gallery listing
268
  * Added gallery sorting configrmation message
444
 
445
  == Upgrade Notice ==
446
 
447
+ = 2.7.7 =
448
+ Updated cache functionality of the gallery
449
+ Added gallery cache expire option
450
+
451
  = 2.7.6 =
452
  Added copy shortcode by click in gallery listing
453
  Added gallery sorting configrmation message
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.7.6
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.7.6');
19
 
20
  if( !defined("ROBO_GALLERY_PATH") ) define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
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.7.7
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.7.7');
19
 
20
  if( !defined("ROBO_GALLERY_PATH") ) define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
21