Ditty News Ticker - Version 2.1.3

Version Description

  • Added check to ensure VC version is 5 or greater before adding VC shortcode
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

Files changed (4) hide show
  1. config.codekit3 +0 -18
  2. ditty-news-ticker.php +2 -2
  3. includes/composer.php +29 -23
  4. readme.txt +4 -1
config.codekit3 CHANGED
@@ -315,12 +315,6 @@
315
  "oAP": "\/classes\/helpers\/class-mtphr-dnt-string-replacement.php",
316
  "oF": 0
317
  },
318
- "\/ditty-news-ticker.php": {
319
- "ft": 8192,
320
- "oA": 2,
321
- "oAP": "\/ditty-news-ticker.php",
322
- "oF": 0
323
- },
324
  "\/includes\/admin\/ajax.php": {
325
  "ft": 8192,
326
  "oA": 2,
@@ -369,12 +363,6 @@
369
  "oAP": "\/includes\/admin\/upgrades.php",
370
  "oF": 0
371
  },
372
- "\/includes\/composer.php": {
373
- "ft": 8192,
374
- "oA": 2,
375
- "oAP": "\/includes\/composer.php",
376
- "oF": 0
377
- },
378
  "\/includes\/filters.php": {
379
  "ft": 8192,
380
  "oA": 2,
@@ -483,12 +471,6 @@
483
  "oAP": "\/languages\/ditty-news-ticker-it_IT.po",
484
  "oF": 0
485
  },
486
- "\/readme.txt": {
487
- "ft": 8192,
488
- "oA": 2,
489
- "oAP": "\/readme.txt",
490
- "oF": 0
491
- },
492
  "\/templates\/control_nav.php": {
493
  "ft": 8192,
494
  "oA": 2,
315
  "oAP": "\/classes\/helpers\/class-mtphr-dnt-string-replacement.php",
316
  "oF": 0
317
  },
 
 
 
 
 
 
318
  "\/includes\/admin\/ajax.php": {
319
  "ft": 8192,
320
  "oA": 2,
363
  "oAP": "\/includes\/admin\/upgrades.php",
364
  "oF": 0
365
  },
 
 
 
 
 
 
366
  "\/includes\/filters.php": {
367
  "ft": 8192,
368
  "oA": 2,
471
  "oAP": "\/languages\/ditty-news-ticker-it_IT.po",
472
  "oF": 0
473
  },
 
 
 
 
 
 
474
  "\/templates\/control_nav.php": {
475
  "ft": 8192,
476
  "oA": 2,
ditty-news-ticker.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://dittynewsticker.com/
5
  Description: Ditty News Ticker is a multi-functional data display plugin
6
  Text Domain: ditty-news-ticker
7
  Domain Path: languages
8
- Version: 2.1.2
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
@@ -31,7 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31
 
32
 
33
 
34
- define ( 'MTPHR_DNT_VERSION', '2.1.2' );
35
  define ( 'MTPHR_DNT_DIR', trailingslashit(plugin_dir_path(__FILE__)) );
36
 
37
 
5
  Description: Ditty News Ticker is a multi-functional data display plugin
6
  Text Domain: ditty-news-ticker
7
  Domain Path: languages
8
+ Version: 2.1.3
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
31
 
32
 
33
 
34
+ define ( 'MTPHR_DNT_VERSION', '2.1.3' );
35
  define ( 'MTPHR_DNT_DIR', trailingslashit(plugin_dir_path(__FILE__)) );
36
 
37
 
includes/composer.php CHANGED
@@ -1,28 +1,34 @@
1
  <?php
2
 
 
 
 
 
3
  function mtphr_dnt_add_to_vc() {
4
-
5
- vc_map( array(
6
- 'name' => __( 'Ditty News Ticker', 'ditty-news-ticker' ),
7
- 'base' => 'ditty_news_ticker',
8
- 'icon' => 'mtphr-dnt-icon-dittynewsticker',
9
- 'category' => 'Content',
10
- 'params' => array(
11
- array(
12
- 'type' => 'dropdown',
13
- 'heading' => __( 'Ditty News Ticker', 'ditty-news-ticker' ),
14
- 'param_name' => 'id',
15
- 'description' => __('Select the ticker you want to display', 'ditty-news-ticker'),
16
- 'value' => mtphr_dnt_get_tickers( true ),
17
- 'admin_label' => true
18
- ),
19
- array(
20
- 'type' => 'textfield',
21
- 'heading' => __( 'Custom Class', 'ditty-news-ticker' ),
22
- 'param_name' => 'class',
23
- 'description' => __('Add a custom class name to the ticker', 'ditty-news-ticker'),
24
- ),
25
- )
26
- ));
 
 
27
  }
28
  add_action( 'vc_before_init', 'mtphr_dnt_add_to_vc' );
1
  <?php
2
 
3
+ /* --------------------------------------------------------- */
4
+ /* !Add VC Shortcode - 2.1.3 */
5
+ /* --------------------------------------------------------- */
6
+
7
  function mtphr_dnt_add_to_vc() {
8
+ if( defined('WPB_VC_VERSION') && version_compare(WPB_VC_VERSION, '5.0.0', '>=' ) ) {
9
+ echo '<pre>';print_r('testing');echo '</pre>';
10
+ vc_map( array(
11
+ 'name' => __( 'Ditty News Ticker', 'ditty-news-ticker' ),
12
+ 'base' => 'ditty_news_ticker',
13
+ 'icon' => 'mtphr-dnt-icon-dittynewsticker',
14
+ 'category' => 'Content',
15
+ 'params' => array(
16
+ array(
17
+ 'type' => 'dropdown',
18
+ 'heading' => __( 'Ditty News Ticker', 'ditty-news-ticker' ),
19
+ 'param_name' => 'id',
20
+ 'description' => __('Select the ticker you want to display', 'ditty-news-ticker'),
21
+ 'value' => mtphr_dnt_get_tickers( true ),
22
+ 'admin_label' => true
23
+ ),
24
+ array(
25
+ 'type' => 'textfield',
26
+ 'heading' => __( 'Custom Class', 'ditty-news-ticker' ),
27
+ 'param_name' => 'class',
28
+ 'description' => __('Add a custom class name to the ticker', 'ditty-news-ticker'),
29
+ ),
30
+ )
31
+ ));
32
+ }
33
  }
34
  add_action( 'vc_before_init', 'mtphr_dnt_add_to_vc' );
readme.txt CHANGED
@@ -68,6 +68,9 @@ Each individual Ticker post has multiple settings to customize.
68
 
69
  == Changelog ==
70
 
 
 
 
71
  = 2.1.2 =
72
  * Updated qtip scripts
73
  * Updated paths to enqueued files
@@ -398,4 +401,4 @@ Each individual Ticker post has multiple settings to customize.
398
 
399
  == Upgrade Notice ==
400
 
401
- Updated qtip scripts & paths to enqueued files
68
 
69
  == Changelog ==
70
 
71
+ = 2.1.3 =
72
+ * Added check to ensure VC version is 5 or greater before adding VC shortcode
73
+
74
  = 2.1.2 =
75
  * Updated qtip scripts
76
  * Updated paths to enqueued files
401
 
402
  == Upgrade Notice ==
403
 
404
+ Added check to ensure VC version is 5 or greater before adding VC shortcode