Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce - Version 2.1.7

Version Description

Dec 04, 2019 = * Fix: HTTP and HTTPS mixed content issue. * Fix: Undefined index php notice.

Download this release

Release Info

Developer shapedplugin
Plugin Icon 128x128 Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce
Version 2.1.7
Comparing to
See all releases

Code changes from version 2.1.6 to 2.1.7

admin/views/metabox-config.php CHANGED
@@ -699,7 +699,7 @@ SP_WPCF::createSection(
699
  'fields' => array(
700
  array(
701
  'type' => 'notice',
702
- 'style' => 'normal',
703
  'content' => __( 'The Following Typography (840+ Google Fonts) options are available in the <a href="https://shapedplugin.com/plugin/wordpress-carousel-pro/" target="_blank">Pro Version</a> only.', 'wp-carousel-free' ),
704
  ),
705
  array(
699
  'fields' => array(
700
  array(
701
  'type' => 'notice',
702
+ 'style' => 'normal',
703
  'content' => __( 'The Following Typography (840+ Google Fonts) options are available in the <a href="https://shapedplugin.com/plugin/wordpress-carousel-pro/" target="_blank">Pro Version</a> only.', 'wp-carousel-free' ),
704
  ),
705
  array(
admin/views/wpcfree-metabox/classes/options.class.php CHANGED
@@ -25,7 +25,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
25
  public $args = array(
26
 
27
  // framework title.
28
- 'framework_title' => 'Codestar Framework <small>by Codestar</small>',
29
  'framework_class' => '',
30
 
31
  // menu settings.
@@ -655,7 +655,7 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
655
  }
656
  } else {
657
 
658
- echo '<div class="spf-no-option spf-text-muted">' . esc_html__( 'No option provided by developer.', 'wp-carousel-free' ) . '</div>';
659
 
660
  }
661
 
@@ -674,23 +674,6 @@ if ( ! class_exists( 'SP_WPCF_Options' ) ) {
674
 
675
  echo '</div>';
676
 
677
- // if ( ! empty( $this->args['show_footer'] ) ) {
678
-
679
- // echo '<div class="spf-footer">';
680
-
681
- // echo '<div class="spf-buttons">';
682
- // echo '<input type="submit" name="spf_transient[save]" class="button button-primary spf-save' . $ajax_class . '" value="' . esc_html__( 'Save', 'wp-carousel-free' ) . '" data-save="' . esc_html__( 'Saving...', 'wp-carousel-free' ) . '">';
683
- // echo ( $this->args['show_reset_section'] ) ? '<input type="submit" name="spf_transient[reset_section]" class="button button-secondary spf-reset-section spf-confirm" value="' . esc_html__( 'Reset Section', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset this section options?', 'wp-carousel-free' ) . '">' : '';
684
- // echo ( $this->args['show_reset_all'] ) ? '<input type="submit" name="spf_transient[reset]" class="button button-secondary spf-reset-all spf-confirm" value="' . esc_html__( 'Reset All', 'wp-carousel-free' ) . '" data-confirm="' . esc_html__( 'Are you sure to reset all options?', 'wp-carousel-free' ) . '">' : '';
685
- // echo '</div>';
686
-
687
- // echo ( ! empty( $this->args['footer_text'] ) ) ? '<div class="spf-copyright">' . $this->args['footer_text'] . '</div>' : '';
688
-
689
- // echo '<div class="clear"></div>';
690
- // echo '</div>';
691
-
692
- // }
693
-
694
  echo '</form>';
695
 
696
  echo '</div>';
25
  public $args = array(
26
 
27
  // framework title.
28
+ 'framework_title' => 'ShapedPlugin',
29
  'framework_class' => '',
30
 
31
  // menu settings.
655
  }
656
  } else {
657
 
658
+ echo '<div class="spf-no-option spf-text-muted">' . esc_html__( 'No option provided by developer.', 'wp-carousel-free' ) . '</div>';
659
 
660
  }
661
 
674
 
675
  echo '</div>';
676
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
677
  echo '</form>';
678
 
679
  echo '</div>';
admin/views/wpcfree-metabox/classes/setup.class.php CHANGED
@@ -74,7 +74,6 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
74
  }
75
  }
76
 
77
-
78
  // setup metaboxes.
79
  $params = array();
80
  if ( ! empty( self::$args['metaboxes'] ) ) {
@@ -262,17 +261,17 @@ if ( ! class_exists( 'SP_WPCF' ) ) {
262
  wp_enqueue_style( 'wp-color-picker' );
263
  wp_enqueue_script( 'wp-color-picker' );
264
 
265
- // framework core styles
266
- wp_enqueue_style( 'spf', self::include_plugin_url( 'assets/css/spf' . $min . '.css' ), array(), '1.0.0', 'all' );
267
 
268
  // rtl styles.
269
  if ( is_rtl() ) {
270
- wp_enqueue_style( 'spf-rtl', self::include_plugin_url( 'assets/css/spf-rtl' . $min . '.css' ), array(), '1.0.0', 'all' );
271
  }
272
 
273
  // framework core scripts.
274
- wp_enqueue_script( 'spf-plugins', self::include_plugin_url( 'assets/js/spf-plugins' . $min . '.js' ), array(), '1.0.0', true );
275
- wp_enqueue_script( 'spf', self::include_plugin_url( 'assets/js/spf' . $min . '.js' ), array( 'spf-plugins' ), '1.0.0', true );
276
 
277
  wp_localize_script(
278
  'spf',
74
  }
75
  }
76
 
 
77
  // setup metaboxes.
78
  $params = array();
79
  if ( ! empty( self::$args['metaboxes'] ) ) {
261
  wp_enqueue_style( 'wp-color-picker' );
262
  wp_enqueue_script( 'wp-color-picker' );
263
 
264
+ // framework core styles.
265
+ wp_enqueue_style( 'spf', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/css/spf' . $min . '.css', array(), WPCAROUSELF_VERSION, 'all' );
266
 
267
  // rtl styles.
268
  if ( is_rtl() ) {
269
+ wp_enqueue_style( 'spf-rtl', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/css/spf-rtl' . $min . '.css', array(), WPCAROUSELF_VERSION, 'all' );
270
  }
271
 
272
  // framework core scripts.
273
+ wp_enqueue_script( 'spf-plugins', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/js/spf-plugins' . $min . '.js', array(), WPCAROUSELF_VERSION, true );
274
+ wp_enqueue_script( 'spf', WPCAROUSELF_URL . 'admin/views/wpcfree-metabox/assets/js/spf' . $min . '.js', array( 'spf-plugins' ), WPCAROUSELF_VERSION, true );
275
 
276
  wp_localize_script(
277
  'spf',
admin/views/wpcfree-metabox/fields/selectf/selectf.php CHANGED
@@ -51,18 +51,10 @@ if ( ! class_exists( 'SP_WPCF_Field_selectf' ) ) {
51
  }
52
 
53
  foreach ( $options as $option_key => $option ) {
54
- $pro_only = true == $option['pro_only'] ? ' disabled' : '';
55
- // if ( is_array( $option ) && ! empty( $option ) ) {
56
- // echo '<optgroup label="' . $option_key . '">';
57
- // foreach ( $option as $sub_key => $sub_value ) {
58
- // $selected = ( in_array( $sub_key, $this->value ) ) ? ' selected' : '';
59
- // echo '<option' . $pro_only . ' value="' . $sub_key . '" ' . $selected . '>' . $sub_value . '</option>';
60
- // }
61
- // echo '</optgroup>';
62
- // } else {
63
- $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
64
- echo '<option' . $pro_only . ' value="' . $option_key . '" ' . $selected . '>' . $option['text'] . '</option>';
65
- // }
66
  }
67
 
68
  echo '</select>';
51
  }
52
 
53
  foreach ( $options as $option_key => $option ) {
54
+ $pro_only_value = isset( $option['pro_only'] ) ? $option['pro_only'] : '';
55
+ $pro_only = true == $pro_only_value ? ' disabled' : '';
56
+ $selected = ( in_array( $option_key, $this->value ) ) ? ' selected' : '';
57
+ echo '<option' . $pro_only . ' value="' . $option_key . '" ' . $selected . '>' . $option['text'] . '</option>';
 
 
 
 
 
 
 
 
58
  }
59
 
60
  echo '</select>';
includes/class-wp-carosuel-free-updates.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fired during plugin updates
4
+ *
5
+ * @link https://shapedplugin.com/
6
+ * @since 2.1.7
7
+ *
8
+ * @package WP_Carousel_Free
9
+ * @subpackage WP_Carousel_Free/includes
10
+ */
11
+
12
+ // don't call the file directly.
13
+ if ( ! defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
+ /**
18
+ * Fired during plugin updates.
19
+ *
20
+ * This class defines all code necessary to run during the plugin's updates.
21
+ *
22
+ * @since 2.1.7
23
+ * @package WP_Carousel_Free
24
+ * @subpackage WP_Carousel_Free/includes
25
+ * @author ShapedPlugin <support@shapedplugin.com>
26
+ */
27
+ class WP_Carousel_Free_Updates {
28
+
29
+ /**
30
+ * DB updates that need to be run
31
+ *
32
+ * @var array
33
+ */
34
+ private static $updates = [
35
+ '2.1.7' => 'updates/update-2.1.7.php',
36
+ ];
37
+
38
+ /**
39
+ * Binding all events
40
+ *
41
+ * @since 2.1.7
42
+ *
43
+ * @return void
44
+ */
45
+ public function __construct() {
46
+ add_action( 'plugins_loaded', array( $this, 'do_updates' ) );
47
+ }
48
+
49
+ /**
50
+ * Check if need any update
51
+ *
52
+ * @since 2.1.7
53
+ *
54
+ * @return boolean
55
+ */
56
+ public function is_needs_update() {
57
+ $installed_version = get_option( 'wp_carousel_free_version' );
58
+
59
+ if ( false === $installed_version ) {
60
+ update_option( 'wp_carousel_free_version', '2.1.7' );
61
+ update_option( 'wp_carousel_free_db_version', '2.1.7' );
62
+ }
63
+
64
+ if ( version_compare( $installed_version, WPCAROUSELF_VERSION, '<' ) ) {
65
+ return true;
66
+ }
67
+
68
+ return false;
69
+ }
70
+
71
+ /**
72
+ * Do updates.
73
+ *
74
+ * @since 2.1.7
75
+ *
76
+ * @return void
77
+ */
78
+ public function do_updates() {
79
+ $this->perform_updates();
80
+ }
81
+
82
+ /**
83
+ * Perform all updates
84
+ *
85
+ * @since 2.1.7
86
+ *
87
+ * @return void
88
+ */
89
+ public function perform_updates() {
90
+ if ( ! $this->is_needs_update() ) {
91
+ return;
92
+ }
93
+
94
+ $installed_version = get_option( 'wp_carousel_free_version' );
95
+
96
+ foreach ( self::$updates as $version => $path ) {
97
+ if ( version_compare( $installed_version, $version, '<' ) ) {
98
+ include $path;
99
+ update_option( 'wp_carousel_free_version', $version );
100
+ }
101
+ }
102
+
103
+ update_option( 'wp_carousel_free_version', WPCAROUSELF_VERSION );
104
+
105
+ }
106
+
107
+ }
108
+ new WP_Carousel_Free_Updates();
includes/updates/update-2.1.7.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Update version.
4
+ */
5
+ update_option( 'wp_carousel_free_version', WPCAROUSELF_VERSION );
6
+ update_option( 'wp_carousel_free_db_version', WPCAROUSELF_VERSION );
readme.txt CHANGED
@@ -326,6 +326,10 @@ Thank you!
326
 
327
  == Changelog ==
328
 
 
 
 
 
329
  = 2.1.6 – Nov 23, 2019 =
330
  * Fix: WordPress 5.3 compatibility issue.
331
 
326
 
327
  == Changelog ==
328
 
329
+ = 2.1.7 – Dec 04, 2019 =
330
+ * Fix: HTTP and HTTPS mixed content issue.
331
+ * Fix: Undefined index php notice.
332
+
333
  = 2.1.6 – Nov 23, 2019 =
334
  * Fix: WordPress 5.3 compatibility issue.
335
 
wp-carousel-free.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: WordPress Carousel
11
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/
12
  * Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
13
- * Version: 2.1.6
14
  * Author: ShapedPlugin
15
  * Author URI: https://shapedplugin.com/
16
  * License: GPL-2.0+
@@ -129,7 +129,7 @@ class SP_WP_Carousel_Free {
129
  */
130
  public function setup() {
131
  $this->plugin_name = 'wp-carousel-free';
132
- $this->version = '2.1.6';
133
  $this->define_constants();
134
  $this->includes();
135
  $this->load_dependencies();
@@ -173,6 +173,7 @@ class SP_WP_Carousel_Free {
173
  */
174
  public function includes() {
175
 
 
176
  require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-loader.php';
177
  require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-post-types.php';
178
  require_once WPCAROUSELF_PATH . '/admin/views/wpcfree-metabox/classes/setup.class.php';
@@ -255,13 +256,7 @@ class SP_WP_Carousel_Free {
255
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_admin_styles' );
256
  $this->loader->add_filter( 'post_updated_messages', $plugin_admin, 'wpcp_carousel_updated_messages', 10, 2 );
257
  $this->loader->add_filter( 'manage_sp_wp_carousel_posts_columns', $plugin_admin, 'filter_carousel_admin_column' );
258
- $this->loader->add_action(
259
- 'manage_sp_wp_carousel_posts_custom_column',
260
- $plugin_admin,
261
- 'display_carousel_admin_fields',
262
- 10,
263
- 2
264
- );
265
  $this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'add_plugin_action_links', 10, 2 );
266
  $this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'plugin_row_meta', 10, 2 );
267
  $this->loader->add_filter( 'admin_footer_text', $plugin_admin, 'sp_wpcp_review_text', 10, 2 );
10
  * Plugin Name: WordPress Carousel
11
  * Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/
12
  * Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
13
+ * Version: 2.1.7
14
  * Author: ShapedPlugin
15
  * Author URI: https://shapedplugin.com/
16
  * License: GPL-2.0+
129
  */
130
  public function setup() {
131
  $this->plugin_name = 'wp-carousel-free';
132
+ $this->version = '2.1.7';
133
  $this->define_constants();
134
  $this->includes();
135
  $this->load_dependencies();
173
  */
174
  public function includes() {
175
 
176
+ require_once WPCAROUSELF_INCLUDES . '/class-wp-carosuel-free-updates.php';
177
  require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-loader.php';
178
  require_once WPCAROUSELF_INCLUDES . '/class-wp-carousel-free-post-types.php';
179
  require_once WPCAROUSELF_PATH . '/admin/views/wpcfree-metabox/classes/setup.class.php';
256
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_admin_styles' );
257
  $this->loader->add_filter( 'post_updated_messages', $plugin_admin, 'wpcp_carousel_updated_messages', 10, 2 );
258
  $this->loader->add_filter( 'manage_sp_wp_carousel_posts_columns', $plugin_admin, 'filter_carousel_admin_column' );
259
+ $this->loader->add_action( 'manage_sp_wp_carousel_posts_custom_column', $plugin_admin, 'display_carousel_admin_fields', 10, 2 );
 
 
 
 
 
 
260
  $this->loader->add_filter( 'plugin_action_links', $plugin_admin, 'add_plugin_action_links', 10, 2 );
261
  $this->loader->add_filter( 'plugin_row_meta', $plugin_admin, 'plugin_row_meta', 10, 2 );
262
  $this->loader->add_filter( 'admin_footer_text', $plugin_admin, 'sp_wpcp_review_text', 10, 2 );