Version Description
- fix: wrong stat counter in dashboard widget
Download this release
Release Info
Developer | designemotions |
Plugin | Enjoy Instagram feed on website with WordPress Widget and Shortcode |
Version | 6.1.1 |
Comparing to | |
See all releases |
Code changes from version 6.1.0 to 6.1.1
- enjoyinstagram.php +2 -2
- includes/class.enjoyinstagram-db.php +9 -3
- readme.txt +4 -2
enjoyinstagram.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Plugin Name: Enjoy Instagram
|
12 |
* Plugin URI: https://www.mediabetaprojects.com/enjoy-instagram-premium/
|
13 |
* Description: Instagram Responsive Images Gallery and Carousel, works with Shortcodes and Widgets.
|
14 |
-
* Version: 6.1.
|
15 |
* Requires at least: 4.0
|
16 |
* Requires PHP: 7.2
|
17 |
* Author: Mediabeta Srl
|
@@ -22,7 +22,7 @@
|
|
22 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
23 |
*/
|
24 |
|
25 |
-
! defined( 'ENJOYINSTAGRAM_VERSION' ) && define( 'ENJOYINSTAGRAM_VERSION', '6.1.
|
26 |
! defined( 'ENJOYINSTAGRAM_FILE' ) && define( 'ENJOYINSTAGRAM_FILE', __FILE__ );
|
27 |
! defined( 'ENJOYINSTAGRAM_URL' ) && define( 'ENJOYINSTAGRAM_URL', plugin_dir_url( __FILE__ ) );
|
28 |
! defined( 'ENJOYINSTAGRAM_DIR' ) && define( 'ENJOYINSTAGRAM_DIR', plugin_dir_path( __FILE__ ) );
|
11 |
* Plugin Name: Enjoy Instagram
|
12 |
* Plugin URI: https://www.mediabetaprojects.com/enjoy-instagram-premium/
|
13 |
* Description: Instagram Responsive Images Gallery and Carousel, works with Shortcodes and Widgets.
|
14 |
+
* Version: 6.1.1
|
15 |
* Requires at least: 4.0
|
16 |
* Requires PHP: 7.2
|
17 |
* Author: Mediabeta Srl
|
22 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
23 |
*/
|
24 |
|
25 |
+
! defined( 'ENJOYINSTAGRAM_VERSION' ) && define( 'ENJOYINSTAGRAM_VERSION', '6.1.1' );
|
26 |
! defined( 'ENJOYINSTAGRAM_FILE' ) && define( 'ENJOYINSTAGRAM_FILE', __FILE__ );
|
27 |
! defined( 'ENJOYINSTAGRAM_URL' ) && define( 'ENJOYINSTAGRAM_URL', plugin_dir_url( __FILE__ ) );
|
28 |
! defined( 'ENJOYINSTAGRAM_DIR' ) && define( 'ENJOYINSTAGRAM_DIR', plugin_dir_path( __FILE__ ) );
|
includes/class.enjoyinstagram-db.php
CHANGED
@@ -492,20 +492,26 @@ class EnjoyInstagram_DB {
|
|
492 |
public function stats() {
|
493 |
global $wpdb;
|
494 |
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
return [
|
496 |
'media' => [
|
497 |
'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table ),
|
498 |
'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->main_table, 1 ),
|
499 |
],
|
500 |
'hashtag' => [
|
501 |
-
'count' => $wpdb->get_var( 'SELECT COUNT(
|
502 |
'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->hashtags_table, 1 ),
|
503 |
],
|
504 |
'moderated_approved' => [
|
505 |
-
'count' => $
|
506 |
],
|
507 |
'moderated_rejected' => [
|
508 |
-
'count' => $
|
509 |
],
|
510 |
];
|
511 |
}
|
492 |
public function stats() {
|
493 |
global $wpdb;
|
494 |
|
495 |
+
$media_approved = $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table . ' WHERE moderate = "approved"' );
|
496 |
+
$hashtag_approved = $wpdb->get_var( 'SELECT COUNT(DISTINCT(image_id)) FROM ' . $this->hashtags_table . ' WHERE moderate = "approved"' );
|
497 |
+
|
498 |
+
$media_rejected = $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table . ' WHERE moderate = "rejected"' );
|
499 |
+
$hashtag_rejected = $wpdb->get_var( 'SELECT COUNT(DISTINCT(image_id)) FROM ' . $this->hashtags_table . ' WHERE moderate = "rejected"' );
|
500 |
+
|
501 |
return [
|
502 |
'media' => [
|
503 |
'count' => $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $this->main_table ),
|
504 |
'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->main_table, 1 ),
|
505 |
],
|
506 |
'hashtag' => [
|
507 |
+
'count' => $wpdb->get_var( 'SELECT COUNT(DISTINCT(hashtag)) FROM ' . $this->hashtags_table ),
|
508 |
'structure' => $wpdb->get_var( 'SHOW CREATE TABLE ' . $this->hashtags_table, 1 ),
|
509 |
],
|
510 |
'moderated_approved' => [
|
511 |
+
'count' => $media_approved + $hashtag_approved,
|
512 |
],
|
513 |
'moderated_rejected' => [
|
514 |
+
'count' => $media_rejected + $hashtag_rejected,
|
515 |
],
|
516 |
];
|
517 |
}
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.google.com/url?q=https%3A%2F%2Fwww.paypal.com%2Fcgi-bin
|
|
4 |
Tags: instagram carousel, instagram, instagram feed, instagram widget, instagram grid
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.7
|
7 |
-
Version: 6.1.
|
8 |
-
Stable tag: 6.1.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -210,6 +210,8 @@ In the Setting section yon can customize grid and/or Carousel view
|
|
210 |
8. Front End View Example
|
211 |
|
212 |
== Changelog ==
|
|
|
|
|
213 |
= 6.1.0 =
|
214 |
* feat: added new dashboard widget showing some plugin stats
|
215 |
* feat: added cron scheduler for instagram token refresh
|
4 |
Tags: instagram carousel, instagram, instagram feed, instagram widget, instagram grid
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.7
|
7 |
+
Version: 6.1.1
|
8 |
+
Stable tag: 6.1.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
210 |
8. Front End View Example
|
211 |
|
212 |
== Changelog ==
|
213 |
+
= 6.1.1 =
|
214 |
+
* fix: wrong stat counter in dashboard widget
|
215 |
= 6.1.0 =
|
216 |
* feat: added new dashboard widget showing some plugin stats
|
217 |
* feat: added cron scheduler for instagram token refresh
|