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

Version Description

  • Fix: Use WP_Query to get sliders when cache/transient is empty, preventing slider output blanking after a day when using caching plugins
Download this release

Release Info

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

Code changes from version 2.4.0.6 to 2.4.0.7

Files changed (2) hide show
  1. readme.txt +3 -0
  2. soliloquy-lite.php +17 -18
readme.txt CHANGED
@@ -87,6 +87,9 @@ Soliloquy has many Addons that extend its default functionality to make it do in
87
 
88
  == Changelog ==
89
 
 
 
 
90
  = 2.4.0.6 =
91
  * Fix: Slider slug would not save when changed
92
 
87
 
88
  == Changelog ==
89
 
90
+ = 2.4.0.7 =
91
+ * Fix: Use WP_Query to get sliders when cache/transient is empty, preventing slider output blanking after a day when using caching plugins
92
+
93
  = 2.4.0.6 =
94
  * Fix: Slider slug would not save when changed
95
 
soliloquy-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
- * Version: 2.4.0.6
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.4.0.6';
58
 
59
  /**
60
  * The name of the plugin.
@@ -302,27 +302,26 @@ class Soliloquy_Lite {
302
  */
303
  public function _get_sliders() {
304
 
305
- $sliders = get_posts(
306
- array(
307
- 'post_type' => 'any',
308
- 'no_found_rows' => true,
309
- 'cache_results' => false,
310
- 'nopaging' => true,
311
- 'fields' => 'ids',
312
- 'meta_query' => array(
313
- array(
314
- 'key' => '_sol_slider_data'
315
- )
316
- )
317
- )
318
- );
319
- if ( empty( $sliders ) ) {
320
  return false;
321
  }
322
 
323
  // Now loop through all the sliders found and only use sliders that have images in them.
324
  $ret = array();
325
- foreach ( $sliders as $id ) {
326
  $data = get_post_meta( $id, '_sol_slider_data', true );
327
  if ( empty( $data['slider'] ) && 'default' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) || 'dynamic' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) ) {
328
  continue;
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
+ * Version: 2.4.0.7
9
  * Text Domain: soliloquy
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '2.4.0.7';
58
 
59
  /**
60
  * The name of the plugin.
302
  */
303
  public function _get_sliders() {
304
 
305
+ $sliders = new WP_Query( array(
306
+ 'post_type' => 'any',
307
+ 'post_status' => 'publish',
308
+ 'posts_per_page'=> -1,
309
+ 'fields' => 'ids',
310
+ 'meta_query' => array(
311
+ array(
312
+ 'key' => '_sol_slider_data',
313
+ 'compare' => 'EXISTS',
314
+ ),
315
+ ),
316
+ ) );
317
+
318
+ if ( ! isset( $sliders->posts) || empty( $sliders->posts ) ) {
 
319
  return false;
320
  }
321
 
322
  // Now loop through all the sliders found and only use sliders that have images in them.
323
  $ret = array();
324
+ foreach ( $sliders->posts as $id ) {
325
  $data = get_post_meta( $id, '_sol_slider_data', true );
326
  if ( empty( $data['slider'] ) && 'default' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) || 'dynamic' == Soliloquy_Shortcode_Lite::get_instance()->get_config( 'type', $data ) ) {
327
  continue;