Slider by Soliloquy – Responsive Image Slider for WordPress - Version 1.5.1.1

Version Description

Download this release

Release Info

Developer chrisakelley
Plugin Icon 128x128 Slider by Soliloquy – Responsive Image Slider for WordPress
Version 1.5.1.1
Comparing to
See all releases

Code changes from version 2.5.1 to 1.5.1.1

Files changed (3) hide show
  1. includes/admin/review.php +212 -0
  2. readme.txt +5 -1
  3. soliloquy-lite.php +3 -2
includes/admin/review.php ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Review class.
4
+ *
5
+ * @since 1.1.4.5
6
+ *
7
+ * @package envira
8
+ * @author Devin Vinson
9
+ */
10
+ class Soliloquy_Review {
11
+
12
+ /**
13
+ * Holds the class object.
14
+ *
15
+ * @since 1.1.4.5
16
+ *
17
+ * @var object
18
+ */
19
+ public static $instance;
20
+
21
+ /**
22
+ * Path to the file.
23
+ *
24
+ * @since 1.1.4.5
25
+ *
26
+ * @var string
27
+ */
28
+ public $file = __FILE__;
29
+
30
+ /**
31
+ * Holds the review slug.
32
+ *
33
+ * @since 1.1.4.5
34
+ *
35
+ * @var string
36
+ */
37
+ public $hook;
38
+
39
+ /**
40
+ * Holds the base class object.
41
+ *
42
+ * @since 1.1.4.5
43
+ *
44
+ * @var object
45
+ */
46
+ public $base;
47
+
48
+ /**
49
+ * API Username.
50
+ *
51
+ * @since 1.1.4.5
52
+ *
53
+ * @var bool|string
54
+ */
55
+ public $user = false;
56
+
57
+
58
+ /**
59
+ * Primary class constructor.
60
+ *
61
+ * @since 1.1.4.5
62
+ */
63
+ public function __construct() {
64
+
65
+ $this->base = Soliloquy::get_instance();
66
+
67
+ add_action( 'admin_notices', array( $this, 'review' ) );
68
+ add_action( 'wp_ajax_soliloquy_dismiss_review', array( $this, 'dismiss_review' ) );
69
+ add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
70
+
71
+ }
72
+
73
+ /**
74
+ * When user is on a Envira related admin page, display footer text
75
+ * that graciously asks them to rate us.
76
+ *
77
+ * @since
78
+ * @param string $text
79
+ * @return string
80
+ */
81
+ public function admin_footer( $text ) {
82
+ global $current_screen;
83
+ if ( !empty( $current_screen->id ) && strpos( $current_screen->id, 'envira' ) !== false ) {
84
+ $url = 'https://wordpress.org/support/plugin/soliloquy-lite/reviews/?filter=5#new-post';
85
+ $text = sprintf( __( 'Please rate <strong>Soliloquy</strong> <a href="%s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the Soliloquy team!', 'soliloquy' ), $url, $url );
86
+ }
87
+ return $text;
88
+ }
89
+
90
+ /**
91
+ * Add admin notices as needed for reviews.
92
+ *
93
+ * @since 1.1.6.1
94
+ */
95
+ public function review() {
96
+
97
+ // Verify that we can do a check for reviews.
98
+ $review = get_option( 'soliloquy_review' );
99
+ $time = time();
100
+ $load = false;
101
+
102
+ if ( ! $review ) {
103
+ $review = array(
104
+ 'time' => $time,
105
+ 'dismissed' => false
106
+ );
107
+ $load = true;
108
+ } else {
109
+ // Check if it has been dismissed or not.
110
+ if ( (isset( $review['dismissed'] ) && ! $review['dismissed']) && (isset( $review['time'] ) && (($review['time'] + DAY_IN_SECONDS) <= $time)) ) {
111
+ $load = true;
112
+ }
113
+ }
114
+
115
+ // If we cannot load, return early.
116
+ if ( ! $load ) {
117
+ return;
118
+ }
119
+
120
+ // Update the review option now.
121
+ update_option( 'soliloquy_review', $review );
122
+
123
+ // Run through optins on the site to see if any have been loaded for more than a week.
124
+ $valid = false;
125
+ $sliders = $this->base->get_sliders();
126
+
127
+ if ( ! $sliders ) {
128
+ return;
129
+ }
130
+
131
+ foreach ( $sliders as $slider ) {
132
+
133
+ $data = get_post( $slider['id']);
134
+
135
+ // Check the creation date of the local optin. It must be at least one week after.
136
+ $created = isset( $data->post_date ) ? strtotime( $data->post_date ) + (7 * DAY_IN_SECONDS) : false;
137
+ if ( ! $created ) {
138
+ continue;
139
+ }
140
+
141
+ if ( $created <= $time ) {
142
+ $valid = true;
143
+ break;
144
+ }
145
+ }
146
+
147
+ // If we don't have a valid optin yet, return.
148
+ if ( ! $valid ) {
149
+ return;
150
+ }
151
+
152
+ // We have a candidate! Output a review message.
153
+ ?>
154
+ <div class="notice notice-info is-dismissible soliloquy-review-notice">
155
+ <p><?php _e( 'Hey, I noticed you created a slider with Soliloquy - that’s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation.', 'soliloquy-gallery' ); ?></p>
156
+ <p><strong><?php _e( '~ Syed Balkhi<br>Co-Founder of Soliloquy', 'soliloquy' ); ?></strong></p>
157
+ <p>
158
+ <a href="https://wordpress.org/support/plugin/soliloquy-lite/reviews/?filter=5#new-post" class="soliloquy-dismiss-review-notice soliloquy-review-out" target="_blank" rel="noopener"><?php _e( 'Ok, you deserve it', 'soliloquy-gallery' ); ?></a><br>
159
+ <a href="#" class="soliloquy-dismiss-review-notice" target="_blank" rel="noopener"><?php _e( 'Nope, maybe later', 'soliloquy' ); ?></a><br>
160
+ <a href="#" class="soliloquy-dismiss-review-notice" target="_blank" rel="noopener"><?php _e( 'I already did', 'soliloquy' ); ?></a><br>
161
+ </p>
162
+ </div>
163
+ <script type="text/javascript">
164
+ jQuery(document).ready( function($) {
165
+ $(document).on('click', '.soliloquy-dismiss-review-notice, .soliloquy-review-notice button', function( event ) {
166
+ if ( ! $(this).hasClass('soliloquy-review-out') ) {
167
+ event.preventDefault();
168
+ }
169
+
170
+ $.post( ajaxurl, {
171
+ action: 'soliloquy_dismiss_review'
172
+ });
173
+
174
+ $('.soliloquy-review-notice').remove();
175
+ });
176
+ });
177
+ </script>
178
+ <?php
179
+ }
180
+
181
+ /**
182
+ * Dismiss the review nag
183
+ *
184
+ * @since 1.1.6.1
185
+ */
186
+ public function dismiss_review() {
187
+
188
+ $review = get_option( 'soliloquy_review' );
189
+ if ( ! $review ) {
190
+ $review = array();
191
+ }
192
+
193
+ $review['time'] = time();
194
+ $review['dismissed'] = true;
195
+
196
+ update_option( 'soliloquy_review', $review );
197
+ die;
198
+ }
199
+
200
+
201
+ public static function get_instance() {
202
+
203
+ if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Soliloquy_Review ) ) {
204
+ self::$instance = new Soliloquy_Review();
205
+ }
206
+
207
+ return self::$instance;
208
+
209
+ }
210
+ }
211
+
212
+ $soliloquy_review = Soliloquy_Review::get_instance();
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: griffinjt
3
  Tags: wordpress slider, slider, wordpress slider plugin, slider plugin, responsive, responsive slider, image slider, image slider plugin, responsive slider plugin, responsive image slider, responsive image slider plugin, custom post types, slideshow, responsive slideshow, slideshow plugin, responsive slideshow plugin, rotator, image rotator, responsive rotator, jquery slider, javascript slider, jquery rotator, javascript rotator, picture slider, photo slider, photo rotator, shortcode, template tag, wordpress slideshow, photo slider, wordpress responsive slider, wordpress picture slider, responsive picture slider, wordpress image slider, wordpress gallery, image gallery, photo gallery, wordpress photo gallery, wordpress picture gallery, wordpress picture slider, wp slider, best wordpress slider, best slider, best slider wordpress, best responsive slider, best responsive wordpress slider plugin
4
  Requires at least: 4.0.0
5
- Tested up to: 4.6.0
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
@@ -90,6 +90,10 @@ Soliloquy has many Addons that extend its default functionality to make it do in
90
 
91
 
92
  == Changelog ==
 
 
 
 
93
  = 2.5.1 =
94
  * Fix: PHP optimizations to improve performance.
95
  * Fix: Cases where Media library images weren’t being inserted.
2
  Contributors: griffinjt
3
  Tags: wordpress slider, slider, wordpress slider plugin, slider plugin, responsive, responsive slider, image slider, image slider plugin, responsive slider plugin, responsive image slider, responsive image slider plugin, custom post types, slideshow, responsive slideshow, slideshow plugin, responsive slideshow plugin, rotator, image rotator, responsive rotator, jquery slider, javascript slider, jquery rotator, javascript rotator, picture slider, photo slider, photo rotator, shortcode, template tag, wordpress slideshow, photo slider, wordpress responsive slider, wordpress picture slider, responsive picture slider, wordpress image slider, wordpress gallery, image gallery, photo gallery, wordpress photo gallery, wordpress picture gallery, wordpress picture slider, wp slider, best wordpress slider, best slider, best slider wordpress, best responsive slider, best responsive wordpress slider plugin
4
  Requires at least: 4.0.0
5
+ Tested up to: 4.7.1
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
90
 
91
 
92
  == Changelog ==
93
+
94
+ = 2.5.1.1 =
95
+ * Fix: Minor bug fixes.
96
+
97
  = 2.5.1 =
98
  * Fix: PHP optimizations to improve performance.
99
  * Fix: Cases where Media library images weren’t being inserted.
soliloquy-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Soliloquy Team
7
  * Author URI: https://soliloquywp.com
8
- * Version: 2.5.1
9
  * Text Domain: soliloquy
10
  * Domain Path: languages
11
  *
@@ -54,7 +54,7 @@ class Soliloquy_Lite {
54
  *
55
  * @var string
56
  */
57
- public $version = '2.5.1';
58
 
59
  /**
60
  * The name of the plugin.
@@ -166,6 +166,7 @@ class Soliloquy_Lite {
166
  require plugin_dir_path( __FILE__ ) . 'includes/admin/utils.php';
167
  require plugin_dir_path( __FILE__ ) . 'includes/admin/addons.php';
168
  require plugin_dir_path( __FILE__ ) . 'includes/admin/media-view.php';
 
169
 
170
  }
171
 
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Soliloquy Team
7
  * Author URI: https://soliloquywp.com
8
+ * Version: 2.5.1.1
9
  * Text Domain: soliloquy
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '2.5.1.1';
58
 
59
  /**
60
  * The name of the plugin.
166
  require plugin_dir_path( __FILE__ ) . 'includes/admin/utils.php';
167
  require plugin_dir_path( __FILE__ ) . 'includes/admin/addons.php';
168
  require plugin_dir_path( __FILE__ ) . 'includes/admin/media-view.php';
169
+ require plugin_dir_path( __FILE__ ) . 'includes/admin/review.php';
170
 
171
  }
172