Gallery – Photo Gallery and Images Gallery - Version 2.4.8

Version Description

  • Updated gallery statistics and fixed reset statistic function
  • Updated description of the plugin, explanation of the life cases
Download this release

Release Info

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

Code changes from version 2.4.7 to 2.4.8

includes/extensions/stats/stats.class.php CHANGED
@@ -14,37 +14,18 @@
14
 
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
17
- class ROBO_GALLERY_STATS
18
- {
19
- /**
20
- * Post type
21
- *
22
- * @var string
23
- */
24
- protected $postType;
25
 
26
- /**
27
- * Assets directory uri
28
- *
29
- * @var string
30
- */
31
  protected $assetsUri;
32
 
33
-
34
- /**
35
- * @constructor
36
- * @param string $postType
37
- * @param array $postTypeParams
38
- */
39
- public function __construct($postType)
40
- {
41
  $this->postType = $postType;
42
  $this->assetsUri = plugin_dir_url(__FILE__);
43
  add_action('admin_enqueue_scripts', array($this, 'enqueueScripts'));
44
  }
45
 
46
- public function enqueueScripts()
47
- {
48
  if (
49
  rbs_gallery_get_current_post_type() == ROBO_GALLERY_TYPE_POST &&
50
  rbs_gallery_is_edit_page('list')
14
 
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
17
+ class ROBO_GALLERY_STATS{
 
 
 
 
 
 
 
18
 
19
+ protected $postType;
 
 
 
 
20
  protected $assetsUri;
21
 
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')
includes/extensions/stats/stats.form.php CHANGED
@@ -14,12 +14,53 @@
14
 
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ?>
18
  <div class="wrap">
19
  <h1 class="rbs-stats">
20
  <?php _e('Robo Gallery Statistics', 'rbs_gallery'); ?>
21
- <a id="robo_gallery_reset_stat" href="edit.php?post_type=robo_gallery_table&page=robo-gallery-stats" class="page-title-action"><?php _e('Reset', 'rbs_gallery'); ?></a>
22
  </h1>
 
 
 
 
 
 
 
 
 
 
23
  <br>
24
 
25
  <?php
@@ -33,41 +74,12 @@ if(!function_exists('rbs_stats_tabs')){
33
  echo '<h2 class="nav-tab-wrapper">';
34
  foreach( $tabs as $tab => $name ){
35
  $class = ( $tab == $current ) ? ' nav-tab-active' : '';
36
- echo "<a class='nav-tab$class' href='edit.php?post_type=robo_gallery_table&page=robo-gallery-stats&tab=$tab'>$name</a>";
37
  }
38
  echo '</h2>';
39
  }
40
  }
41
  $tab = 'gallery';
42
- //if ( isset( $_GET['tab'] ) ) $tab = $_GET['tab'];
43
- //if ( isset( $_POST['tab'] ) ) $tab = $_POST['tab'];
44
- //rbs_stats_tabs( $tab);
45
-
46
- $today = date("Y_j_n");
47
- $countPosts = wp_count_posts(ROBO_GALLERY_TYPE_POST);
48
- //print_r($countPosts);
49
-
50
- $args = array(
51
- 'post_type' => ROBO_GALLERY_TYPE_POST,
52
- 'meta_key' => 'gallery_views_count',
53
- 'posts_per_page' =>-1,
54
- );
55
- $allViews = 0;
56
- $loop = new WP_Query($args);
57
- $allImages = 0;
58
-
59
- if ( $loop->have_posts() ){
60
- for ($i=0; $i <count($loop->posts) ; $i++) {
61
-
62
- $images = get_post_meta( $loop->posts[$i]->ID, ROBO_GALLERY_PREFIX.'galleryImages', true);
63
- if( isset($images) && is_array($images) && count($images) ){
64
- $allImages += count($images);
65
- }
66
-
67
- $amt = get_post_meta( $loop->posts[$i]->ID, 'gallery_views_count', true);
68
- if ($amt) {$allViews += $amt;};
69
- }
70
- }
71
 
72
  switch ($tab) {
73
  case 'gallery':
14
 
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
17
+ $countPosts = wp_count_posts(ROBO_GALLERY_TYPE_POST);
18
+
19
+ $args = array(
20
+ 'post_type' => ROBO_GALLERY_TYPE_POST,
21
+ 'meta_key' => 'gallery_views_count',
22
+ 'posts_per_page' =>-1,
23
+ );
24
+ $allViews = 0;
25
+ $loop = new WP_Query($args);
26
+ $allImages = 0;
27
+
28
+ $clearStat = 0;
29
+ if ( isset( $_GET['clearStat'] ) && $_GET['clearStat']==1 ) $clearStat=1;
30
+
31
+ if ( $loop->have_posts() ){
32
+ for ($i=0; $i <count($loop->posts) ; $i++) {
33
+
34
+ $images = get_post_meta( $loop->posts[$i]->ID, ROBO_GALLERY_PREFIX.'galleryImages', true);
35
+ if( isset($images) && is_array($images) && count($images) ){
36
+ $allImages += count($images);
37
+ }
38
+ if($clearStat){
39
+ delete_post_meta( $loop->posts[$i]->ID, 'gallery_views_count');
40
+ add_post_meta( $loop->posts[$i]->ID, 'gallery_views_count', '0');
41
+ }
42
+ $amt = get_post_meta( $loop->posts[$i]->ID, 'gallery_views_count', true);
43
+ if ($amt) {$allViews += $amt;};
44
+ }
45
+ }
46
+
47
+
48
  ?>
49
  <div class="wrap">
50
  <h1 class="rbs-stats">
51
  <?php _e('Robo Gallery Statistics', 'rbs_gallery'); ?>
52
+ <a id="robo_gallery_reset_stat" href="edit.php?post_type=robo_gallery_table&page=robo-gallery-stats&clearStat=1" class="page-title-action"><?php _e('Reset', 'rbs_gallery'); ?></a>
53
  </h1>
54
+
55
+ <?php if(isset($_GET['clearStat']) && $_GET['clearStat']==1 ){ ?>
56
+ <div id="setting-error-settings_updated" class="updated settings-error notice is-dismissible">
57
+ <p><strong><?php _e('Statistics Reset.', 'rbs_gallery'); ?></strong></p>
58
+ <button type="button" class="notice-dismiss">
59
+ <span class="screen-reader-text"><?php _e('Dismiss this notice.'); ?></span>
60
+ </button>
61
+ </div>
62
+ <?php } ?>
63
+
64
  <br>
65
 
66
  <?php
74
  echo '<h2 class="nav-tab-wrapper">';
75
  foreach( $tabs as $tab => $name ){
76
  $class = ( $tab == $current ) ? ' nav-tab-active' : '';
77
+ echo '<a class="nav-tab'.$class.'" href="edit.php?post_type=robo_gallery_table&page=robo-gallery-stats&tab='.$tab.'">'.$name.'</a>';
78
  }
79
  echo '</h2>';
80
  }
81
  }
82
  $tab = 'gallery';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  switch ($tab) {
85
  case 'gallery':
readme.txt CHANGED
@@ -1,17 +1,18 @@
1
  === Gallery - Photo Gallery and Images Gallery ===
2
- Contributors: robosoft
3
- Tags: gallery, Gallery Plugin, photo gallery, images gallery, responsive gallery, categories gallery, Polaroid gallery, gallery lightbox, pictures, images, portfolio gallery, video gallery
 
4
  Requires at least: 3.3
5
  Tested up to: 4.6
6
- Stable tag: 2.4.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
10
- Gallery. It's really attractive part of your pages. Gallery with categories, highly customizable gallery with videos, links and lightbox
11
 
12
  == Description ==
13
 
14
- **Gallery - Robo Gallery**
15
 
16
  #### [Gallery Most Easy and Powerful plugin to create attractive image section on your WordPress website.](http://robosoft.co/robogallery/#overview)
17
 
@@ -111,6 +112,27 @@ Gallery. It's really attractive part of your pages. Gallery with categories, hig
111
  * Drag and Drop Category Manager
112
 
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  > #### Useful Gallery Links
115
  >
116
  >[Multi Categories Cars Gallery Demo](http://robosoft.co/demo/gallery/cars-gallery-demo/)
@@ -203,6 +225,10 @@ If any problem occurs, please contact us.
203
 
204
  == Changelog ==
205
 
 
 
 
 
206
  = 2.4.7 =
207
  * Updated font options
208
  * Added new awesome font load modes
@@ -872,6 +898,10 @@ If any problem occurs, please contact us.
872
 
873
  == Upgrade Notice ==
874
 
 
 
 
 
875
  = 2.4.7 =
876
  Updated font options
877
  Added new awesome font load modes
1
  === Gallery - Photo Gallery and Images Gallery ===
2
+ Contributors: gallerysupport, robosoft
3
+ Donate link: http://robosoft.co/robogallery
4
+ Tags: gallery, photo gallery, images gallery, gallery images, 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.6
7
+ Stable tag: 2.4.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
+ Gallery modes: photo gallery, images gallery, video gallery, Polaroid gallery, gallery lighbox, portfolio gallery, responsive gallery
12
 
13
  == Description ==
14
 
15
+ = Gallery - Robo Gallery =
16
 
17
  #### [Gallery Most Easy and Powerful plugin to create attractive image section on your WordPress website.](http://robosoft.co/robogallery/#overview)
18
 
112
  * Drag and Drop Category Manager
113
 
114
 
115
+ = Robo Gallery Advantages =
116
+
117
+ Robo Gallery it's wordpress gallery plugin which could help you to create different images gallery. Robo gallery could be used as photo gallery, classic images gallery with traditional layout and square thumbnails or as Polaroid gallery. Robo gallery have different configuration settings which gonna help to create porfolio gallery with your projects images. Robo gallery could be also used as video gallery on your website.
118
+
119
+ = Responsive gallery =
120
+
121
+ Robo gallery it's responive gallery what is really important for the website page rank. Robo gallery work on mobile devices as stable part of your website interface. Robo gallery lightbox also fully responsive and mobile devices friendly.
122
+
123
+ = Polaroid gallery =
124
+
125
+ Robo gallery have buil-in Polaroid gallery mode. When you turn on Polaroid gallery mode every thumbnail of the photo gallery will have additional panel below thumbnails where you can publish title, description or caption of images gallery.
126
+
127
+ = Portfolio gallery =
128
+
129
+ Images gallery it's a best form to represent your porfolion on your website. With Robo photo gallery you can easily build your portfolio with images galleries, video galleries. Every images gallery could have different settings. You can create absolutely different photo galleies on your page which fit to your needs and design the best way.
130
+
131
+ = Video gallery, gallery lightbox, gallery links =
132
+
133
+ Robo gallery have advanced functionality which provide you ide range of settings for configuring gallery images links, video galleries and gallery lightbox. Every images gallery have link and video link options where you can specify proper value for every element of the photo gallery. For your video gallery you can use videos hosted on Youtube or Vimeo. Image settings have field where you can define direct link to this gallery. Gallery lightbox have different settings for interface styling.
134
+
135
+
136
  > #### Useful Gallery Links
137
  >
138
  >[Multi Categories Cars Gallery Demo](http://robosoft.co/demo/gallery/cars-gallery-demo/)
225
 
226
  == Changelog ==
227
 
228
+ = 2.4.8 =
229
+ * Updated gallery statistics and fixed reset statistic function
230
+ * Updated description of the plugin, explanation of the life cases
231
+
232
  = 2.4.7 =
233
  * Updated font options
234
  * Added new awesome font load modes
898
 
899
  == Upgrade Notice ==
900
 
901
+ = 2.4.8 =
902
+ Updated gallery statistics and fixed reset statistic function
903
+ Updated description of the plugin, explanation of the life cases
904
+
905
  = 2.4.7 =
906
  Updated font options
907
  Added new awesome font load modes
robogallery.php CHANGED
@@ -2,9 +2,9 @@
2
  /*
3
  Plugin Name: Robo Gallery
4
  Plugin URI: http://robosoft.co/gallery
5
- Description: A responsive, easy and elegant way to show gallery.
6
  Author: RoboSoft
7
- Version: 2.4.7
8
  Author URI: http://robosoft.co/gallery
9
  License: GPLv3 or later
10
  */
@@ -13,7 +13,7 @@ if(!defined('WPINC'))die;
13
  if(!defined("ABSPATH"))exit;
14
 
15
  define("ROBO_GALLERY", 1);
16
- define("ROBO_GALLERY_VERSION", '2.4.7');
17
 
18
  if( !defined("ROBO_GALLERY_PATH") ) define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
19
 
2
  /*
3
  Plugin Name: Robo Gallery
4
  Plugin URI: http://robosoft.co/gallery
5
+ Description: Gallery modes: photo gallery, images gallery, video gallery, Polaroid gallery, gallery lighbox, portfolio gallery, responsive gallery
6
  Author: RoboSoft
7
+ Version: 2.4.8
8
  Author URI: http://robosoft.co/gallery
9
  License: GPLv3 or later
10
  */
13
  if(!defined("ABSPATH"))exit;
14
 
15
  define("ROBO_GALLERY", 1);
16
+ define("ROBO_GALLERY_VERSION", '2.4.8');
17
 
18
  if( !defined("ROBO_GALLERY_PATH") ) define("ROBO_GALLERY_PATH", plugin_dir_path( __FILE__ ));
19