Ditty News Ticker - Version 3.0.5

Version Description

  • Added checks for auto-enabling Ditty News Ticker if old shortcode or function is used on front-end
Download this release

Release Info

Developer metaphorcreations
Plugin Icon 128x128 Ditty News Ticker
Version 3.0.5
Comparing to
See all releases

Code changes from version 3.0.4 to 3.0.5

ditty-news-ticker.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Ditty (formerly Ditty News Ticker)
5
  * Plugin URI: https://www.metaphorcreations.com/ditty
6
  * Description: Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
7
- * Version: 3.0.4
8
  * Author: Metaphor Creations
9
  * Author URI: https://www.metaphorcreations.com
10
  * License: GPL-2.0+
@@ -20,7 +20,7 @@ if ( ! defined( 'WPINC' ) ) {
20
 
21
  // Plugin version.
22
  if ( ! defined( 'DITTY_VERSION' ) ) {
23
- define( 'DITTY_VERSION', '3.0.4' );
24
  }
25
 
26
  // Plugin Folder Path.
4
  * Plugin Name: Ditty (formerly Ditty News Ticker)
5
  * Plugin URI: https://www.metaphorcreations.com/ditty
6
  * Description: Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
7
+ * Version: 3.0.5
8
  * Author: Metaphor Creations
9
  * Author URI: https://www.metaphorcreations.com
10
  * License: GPL-2.0+
20
 
21
  // Plugin version.
22
  if ( ! defined( 'DITTY_VERSION' ) ) {
23
+ define( 'DITTY_VERSION', '3.0.5' );
24
  }
25
 
26
  // Plugin Folder Path.
includes/class-ditty.php CHANGED
@@ -311,6 +311,8 @@ class Ditty {
311
  // Possibly add Ditty News Ticker
312
  if ( ditty_news_ticker_enabled() ) {
313
  require_once DITTY_DIR . 'legacy/legacy.php';
 
 
314
  }
315
 
316
  $this->loader = new Ditty_Loader();
311
  // Possibly add Ditty News Ticker
312
  if ( ditty_news_ticker_enabled() ) {
313
  require_once DITTY_DIR . 'legacy/legacy.php';
314
+ } else {
315
+ require_once DITTY_DIR . 'includes/legacy-helpers.php';
316
  }
317
 
318
  $this->loader = new Ditty_Loader();
includes/helpers.php CHANGED
@@ -1104,7 +1104,7 @@ function ditty_border_styles_array() {
1104
  /**
1105
  * Prepare display items
1106
  *
1107
- * @since 3.0
1108
  * @var $eases array
1109
  */
1110
  function ditty_prepare_display_items( $meta ) {
@@ -1113,7 +1113,7 @@ function ditty_prepare_display_items( $meta ) {
1113
  }
1114
  $prepared_items = array();
1115
  if ( ! $item_type_object = ditty_item_type_object( $meta['item_type'] ) ) {
1116
- return $prepared_items();
1117
  }
1118
  $defaults = $item_type_object->default_settings();
1119
  $args = shortcode_atts( $defaults, $meta['item_value'] );
1104
  /**
1105
  * Prepare display items
1106
  *
1107
+ * @since 3.0.5
1108
  * @var $eases array
1109
  */
1110
  function ditty_prepare_display_items( $meta ) {
1113
  }
1114
  $prepared_items = array();
1115
  if ( ! $item_type_object = ditty_item_type_object( $meta['item_type'] ) ) {
1116
+ return $prepared_items;
1117
  }
1118
  $defaults = $item_type_object->default_settings();
1119
  $args = shortcode_atts( $defaults, $meta['item_value'] );
includes/legacy-helpers.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Make sure Ditty News Ticker is enabled if the old shortcode is used
5
+ *
6
+ * @since 3.0
7
+ */
8
+ function ditty_legacy_display() {
9
+ ditty_settings( 'ditty_news_ticker', '1' );
10
+ }
11
+ add_shortcode( 'ditty_news_ticker', 'ditty_legacy_display' );
12
+
13
+ /**
14
+ * Make sure Ditty News Ticker is enabled if the old function is used
15
+ *
16
+ * @since 3.0
17
+ */
18
+ if ( ! function_exists( 'ditty_news_ticker' ) ) {
19
+ function ditty_news_ticker() {
20
+ ditty_settings( 'ditty_news_ticker', '1' );
21
+ }
22
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: ticker, news, news ticker, rotator, data rotator, lists, data, aggregator, latest posts
5
  Requires at least: 4.5
6
  Tested up to: 5.8.2
7
- Stable tag: 3.0.4
8
  License: GPL2
9
 
10
  Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
@@ -66,6 +66,9 @@ The most common cause for an unresponsive Ditty (when using scroll or rotate mod
66
 
67
  == Changelog ==
68
 
 
 
 
69
  = 3.0.4 =
70
  * Removed trailing comma in class-ditty-extensions.php file
71
 
@@ -602,4 +605,4 @@ The most common cause for an unresponsive Ditty (when using scroll or rotate mod
602
 
603
  == Upgrade Notice ==
604
 
605
- Removed trailing comma in class-ditty-extensions.php file
4
  Tags: ticker, news, news ticker, rotator, data rotator, lists, data, aggregator, latest posts
5
  Requires at least: 4.5
6
  Tested up to: 5.8.2
7
+ Stable tag: 3.0.5
8
  License: GPL2
9
 
10
  Formerly Ditty News Ticker. Ditty is a multi-functional data display plugin.
66
 
67
  == Changelog ==
68
 
69
+ = 3.0.5 =
70
+ * Added checks for auto-enabling Ditty News Ticker if old shortcode or function is used on front-end
71
+
72
  = 3.0.4 =
73
  * Removed trailing comma in class-ditty-extensions.php file
74
 
605
 
606
  == Upgrade Notice ==
607
 
608
+ Added checks for auto-enabling Ditty News Ticker if old shortcode or function is used on front-end