Skip to content

Commit

Permalink
Fix usage of $wpdb->last_error
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiorino committed May 23, 2020
1 parent 5e958fe commit 069c959
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crellyslider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Crelly Slider
* Plugin URI: https://wordpress.org/plugins/crelly-slider/
* Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
* Version: 1.4.0
* Version: 1.4.1
* Author: Fabio Rinaldi
* Author URI: https://github.com/fabiorino
* Text Domain: crelly-slider
Expand All @@ -18,7 +18,7 @@

define('CS_DEBUG', true);

define('CS_VERSION', '1.4.0');
define('CS_VERSION', '1.4.1');
define('CS_MIN_CAPABILITY', 'manage_options');
define('CS_PATH', plugin_dir_path(__FILE__));
define('CS_PLUGIN_URL', plugins_url() . '/crelly-slider');
Expand Down
2 changes: 1 addition & 1 deletion css/crellyslider.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Plugin Name: Crelly Slider
* Plugin URI: https://wordpress.org/plugins/crelly-slider/
* Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
* Version: 1.4.0
* Version: 1.4.1
* Author: Fabio Rinaldi
* Author URI: https://github.com/fabiorino
* License: MIT
Expand Down
2 changes: 1 addition & 1 deletion css/crellyslider.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/jquery.crellyslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Plugin Name: Crelly Slider
* Plugin URI: https://wordpress.org/plugins/crelly-slider/
* Description: A free responsive slider that supports layers. Add texts, images, videos and beautify them with transitions and animations.
* Version: 1.4.0
* Version: 1.4.1
* Author: Fabio Rinaldi
* Author URI: https://github.com/fabiorino
* License: MIT
Expand Down
2 changes: 1 addition & 1 deletion js/jquery.crellyslider.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://crellyslider.altervista.org/contribute-and-support/
Tags: animations, layers, texts, images, videos
Requires at least: 3.9
Tested up to: 5.4
Stable tag: 1.4.0
Stable tag: 1.4.1
License: MIT
License URI: http://opensource.org/licenses/MIT

Expand Down Expand Up @@ -54,6 +54,9 @@ You can find the documentation <a href="http://crellyslider.altervista.org/docum

== Changelog ==

= 1.4.1 =
* Fixed Gutenberg editor block failing to load.

= 1.4.0 =
* Added support for Gutenberg: sliders can now be inserted in a page or a post via the WordPress visual editor, no need to use shortcodes anymore (but it will still be supported).
* Fixed slider option "Start from slide" displaying only "Random slide", as reported <a href="https://wordpress.org/support/topic/start-slide-cannot-be-selected-if-random-start-slide-is-selected">here</a>.
Expand Down
4 changes: 2 additions & 2 deletions wordpress/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class SliderForGutenbergBlock {
$slidersForGutenberg = array();
global $wpdb;
$sliders = $wpdb->get_results('SELECT id, alias, name FROM ' . $wpdb->prefix . 'crellyslider_sliders');
if($sliders->last_error) {
if($wpdb->last_error) {
echo json_encode(false);
die();
}
Expand All @@ -96,7 +96,7 @@ class SliderForGutenbergBlock {
$slide = $wpdb->get_results($wpdb->prepare(
'SELECT background_type_image, background_type_color, background_repeat FROM ' . $wpdb->prefix . 'crellyslider_slides WHERE slider_parent = %d AND position = 0 AND draft = 0', $sliderID
));
if($slide->last_error) {
if($wpdb->last_error) {
echo json_encode(false);
die();
}
Expand Down

0 comments on commit 069c959

Please sign in to comment.