Ditty News Ticker - Version 2.2.7

Version Description

  • Constant variable bug fix
Download this release

Release Info

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

Code changes from version 2.2.6 to 2.2.7

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.2.6
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
@@ -61,28 +61,28 @@ final class Ditty_News_Ticker {
61
  private function setup_constants() {
62
 
63
  // Plugin version
64
- if ( ! defined( 'DNT_VERSION' ) ) {
65
- define( 'DNT_VERSION', '2.2.6' );
66
  }
67
 
68
  // Plugin Folder Path
69
- if ( ! defined( 'DNT_DIR') ) {
70
- define( 'DNT_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
71
  }
72
 
73
  // Plugin Folder URL
74
- if ( ! defined( 'DNT_URL') ) {
75
- define( 'DNT_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
76
  }
77
 
78
  // Plugin Root File
79
- if ( ! defined( 'DNT_FILE') ) {
80
- define( 'DNT_FILE', __FILE__ );
81
  }
82
 
83
  // Store URL
84
- if ( ! defined( 'DNT_STORE_URL') ) {
85
- define( 'DNT_STORE_URL', 'https://www.metaphorcreations.com' );
86
  }
87
  }
88
 
@@ -94,43 +94,43 @@ final class Ditty_News_Ticker {
94
  private function includes() {
95
 
96
  // Load the general functions
97
- require_once DNT_DIR . 'eddsl/eddsl.php';
98
-
99
- require_once DNT_DIR . 'inc/composer.php';
100
- require_once DNT_DIR . 'inc/helpers.php';
101
- require_once DNT_DIR . 'inc/hooks.php';
102
- require_once DNT_DIR . 'inc/post-types.php';
103
- require_once DNT_DIR . 'inc/settings.php';
104
- require_once DNT_DIR . 'inc/static.php';
105
- require_once DNT_DIR . 'inc/widget.php';
106
 
107
  if( is_admin() ) {
108
 
109
  // Load admin specific code
110
- require_once DNT_DIR . 'inc/admin/ajax.php';
111
- require_once DNT_DIR . 'inc/admin/meta-boxes.php';
112
- require_once DNT_DIR . 'inc/admin/edit-columns.php';
113
- require_once DNT_DIR . 'inc/admin/fields/helpers.php';
114
- require_once DNT_DIR . 'inc/admin/fields/fields.php';
115
- require_once DNT_DIR . 'inc/admin/filters.php';
116
- require_once DNT_DIR . 'inc/admin/functions.php';
117
- require_once DNT_DIR . 'inc/admin/upgrades.php';
118
 
119
  } else {
120
 
121
  // Load front-end specific code
122
- require_once DNT_DIR . 'inc/filters.php';
123
- require_once DNT_DIR . 'inc/functions.php';
124
- require_once DNT_DIR . 'inc/shortcodes.php';
125
- require_once DNT_DIR . 'inc/classes/class-mtphr-dnt.php';
126
- require_once DNT_DIR . 'inc/classes/class-mtphr-dnt-tick.php';
127
- require_once DNT_DIR . 'inc/classes/class-mtphr-dnt-image.php';
128
- require_once DNT_DIR . 'inc/classes/helpers/class-mtphr-dnt-string-replacement.php';
129
- require_once DNT_DIR . 'inc/templates.php';
130
  }
131
 
132
- require_once DNT_DIR . 'inc/classes/class-mtphr-dnt-roles.php';
133
- require_once DNT_DIR . 'inc/install.php';
134
  }
135
 
136
 
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.2.7
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
61
  private function setup_constants() {
62
 
63
  // Plugin version
64
+ if ( ! defined( 'MTPHR_DNT_VERSION' ) ) {
65
+ define( 'MTPHR_DNT_VERSION', '2.2.7' );
66
  }
67
 
68
  // Plugin Folder Path
69
+ if ( ! defined( 'MTPHR_DNT_DIR') ) {
70
+ define( 'MTPHR_DNT_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
71
  }
72
 
73
  // Plugin Folder URL
74
+ if ( ! defined( 'MTPHR_DNT_URL') ) {
75
+ define( 'MTPHR_DNT_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
76
  }
77
 
78
  // Plugin Root File
79
+ if ( ! defined( 'MTPHR_DNT_FILE') ) {
80
+ define( 'MTPHR_DNT_FILE', __FILE__ );
81
  }
82
 
83
  // Store URL
84
+ if ( ! defined( 'MTPHR_DNT_STORE_URL') ) {
85
+ define( 'MTPHR_DNT_STORE_URL', 'https://www.metaphorcreations.com' );
86
  }
87
  }
88
 
94
  private function includes() {
95
 
96
  // Load the general functions
97
+ require_once MTPHR_DNT_DIR . 'eddsl/eddsl.php';
98
+
99
+ require_once MTPHR_DNT_DIR . 'inc/composer.php';
100
+ require_once MTPHR_DNT_DIR . 'inc/helpers.php';
101
+ require_once MTPHR_DNT_DIR . 'inc/hooks.php';
102
+ require_once MTPHR_DNT_DIR . 'inc/post-types.php';
103
+ require_once MTPHR_DNT_DIR . 'inc/settings.php';
104
+ require_once MTPHR_DNT_DIR . 'inc/static.php';
105
+ require_once MTPHR_DNT_DIR . 'inc/widget.php';
106
 
107
  if( is_admin() ) {
108
 
109
  // Load admin specific code
110
+ require_once MTPHR_DNT_DIR . 'inc/admin/ajax.php';
111
+ require_once MTPHR_DNT_DIR . 'inc/admin/meta-boxes.php';
112
+ require_once MTPHR_DNT_DIR . 'inc/admin/edit-columns.php';
113
+ require_once MTPHR_DNT_DIR . 'inc/admin/fields/helpers.php';
114
+ require_once MTPHR_DNT_DIR . 'inc/admin/fields/fields.php';
115
+ require_once MTPHR_DNT_DIR . 'inc/admin/filters.php';
116
+ require_once MTPHR_DNT_DIR . 'inc/admin/functions.php';
117
+ require_once MTPHR_DNT_DIR . 'inc/admin/upgrades.php';
118
 
119
  } else {
120
 
121
  // Load front-end specific code
122
+ require_once MTPHR_DNT_DIR . 'inc/filters.php';
123
+ require_once MTPHR_DNT_DIR . 'inc/functions.php';
124
+ require_once MTPHR_DNT_DIR . 'inc/shortcodes.php';
125
+ require_once MTPHR_DNT_DIR . 'inc/classes/class-mtphr-dnt.php';
126
+ require_once MTPHR_DNT_DIR . 'inc/classes/class-mtphr-dnt-tick.php';
127
+ require_once MTPHR_DNT_DIR . 'inc/classes/class-mtphr-dnt-image.php';
128
+ require_once MTPHR_DNT_DIR . 'inc/classes/helpers/class-mtphr-dnt-string-replacement.php';
129
+ require_once MTPHR_DNT_DIR . 'inc/templates.php';
130
  }
131
 
132
+ require_once MTPHR_DNT_DIR . 'inc/classes/class-mtphr-dnt-roles.php';
133
+ require_once MTPHR_DNT_DIR . 'inc/install.php';
134
  }
135
 
136
 
inc/admin/functions.php CHANGED
@@ -33,7 +33,7 @@ function mtphr_dnt_plugin_upgrade(){
33
  $active_version = get_option( 'mtphr_dnt_active_version', '0' );
34
 
35
  // Outdated
36
- if( version_compare($active_version, DNT_VERSION, '<') ) {
37
 
38
  /*
39
  // Run specific upgrade routines
@@ -42,7 +42,7 @@ function mtphr_dnt_plugin_upgrade(){
42
  }
43
  */
44
 
45
- update_option( 'mtphr_dnt_active_version', DNT_VERSION );
46
  }
47
  }
48
  //add_action( 'admin_init', 'mtphr_dnt_plugin_upgrade' );
33
  $active_version = get_option( 'mtphr_dnt_active_version', '0' );
34
 
35
  // Outdated
36
+ if( version_compare($active_version, MTPHR_DNT_VERSION, '<') ) {
37
 
38
  /*
39
  // Run specific upgrade routines
42
  }
43
  */
44
 
45
+ update_option( 'mtphr_dnt_active_version', MTPHR_DNT_VERSION );
46
  }
47
  }
48
  //add_action( 'admin_init', 'mtphr_dnt_plugin_upgrade' );
inc/hooks.php CHANGED
@@ -5,7 +5,7 @@
5
  * @since 2.2
6
  */
7
  function mtphr_dnt_unyson_extension( $locations ) {
8
- $locations[DNT_DIR.'inc/builders/unyson'] = plugins_url('ditty-news-ticker/inc/builders/unyson');
9
  return $locations;
10
  }
11
  add_filter( 'fw_extensions_locations', 'mtphr_dnt_unyson_extension' );
5
  * @since 2.2
6
  */
7
  function mtphr_dnt_unyson_extension( $locations ) {
8
+ $locations[MTPHR_DNT_DIR.'inc/builders/unyson'] = plugins_url('ditty-news-ticker/inc/builders/unyson');
9
  return $locations;
10
  }
11
  add_filter( 'fw_extensions_locations', 'mtphr_dnt_unyson_extension' );
inc/install.php CHANGED
@@ -46,7 +46,7 @@ function mtphr_dnt_install( $network_wide = false ) {
46
  mtphr_dnt_run_install();
47
  }
48
  }
49
- register_activation_hook( DNT_FILE, 'mtphr_dnt_install' );
50
 
51
 
52
  /**
@@ -75,7 +75,7 @@ function mtphr_dnt_run_install() {
75
  update_option( 'mtphr_dnt_version_upgraded_from', $current_version );
76
  }
77
 
78
- update_option( 'mtphr_dnt_version', DNT_VERSION );
79
 
80
  // Create MTPHR_DNT roles
81
  $roles = new MTPHR_DNT_Roles;
@@ -98,7 +98,7 @@ function mtphr_dnt_run_install() {
98
  */
99
  function mtphr_dnt_new_blog_created( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
100
 
101
- if( is_plugin_active_for_network(plugin_basename(DNT_FILE)) ) {
102
 
103
  switch_to_blog( $blog_id );
104
  mtphr_dnt_install();
46
  mtphr_dnt_run_install();
47
  }
48
  }
49
+ register_activation_hook( MTPHR_DNT_FILE, 'mtphr_dnt_install' );
50
 
51
 
52
  /**
75
  update_option( 'mtphr_dnt_version_upgraded_from', $current_version );
76
  }
77
 
78
+ update_option( 'mtphr_dnt_version', MTPHR_DNT_VERSION );
79
 
80
  // Create MTPHR_DNT roles
81
  $roles = new MTPHR_DNT_Roles;
98
  */
99
  function mtphr_dnt_new_blog_created( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
100
 
101
+ if( is_plugin_active_for_network(plugin_basename(MTPHR_DNT_FILE)) ) {
102
 
103
  switch_to_blog( $blog_id );
104
  mtphr_dnt_install();
inc/static.php CHANGED
@@ -34,7 +34,7 @@ function mtphr_dnt_scripts() {
34
  wp_register_script( 'jquery-easing', plugins_url('ditty-news-ticker/inc/static/js/jquery.easing.js'), array('jquery'), '1.4.1', true );
35
 
36
  // Load the news ticker scripts
37
- wp_enqueue_script( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/js/script-admin.min.js'), array( 'jquery','jquery-ui-core','jquery-ui-sortable', 'jquery-easing', 'qtip' ), DNT_VERSION, true );
38
  wp_localize_script( 'ditty-news-ticker', 'ditty_news_ticker_vars', array(
39
  'security' => wp_create_nonce( 'ditty-news-ticker' ),
40
  'img_title' => __( 'Upload or select an image', 'ditty-news-ticker' ),
@@ -45,18 +45,18 @@ function mtphr_dnt_scripts() {
45
  }
46
 
47
  // Load the icon font css
48
- wp_enqueue_style( 'ditty-news-ticker-font', plugins_url('ditty-news-ticker/inc/static/libs/fontastic/styles.css'), false, DNT_VERSION );
49
 
50
  // Load the plugin css
51
- wp_enqueue_style( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/css/style-admin.css'), array('dashicons'), DNT_VERSION );
52
 
53
  } else {
54
 
55
  // Load the icon font css
56
- wp_enqueue_style( 'ditty-news-ticker-font', plugins_url('ditty-news-ticker/inc/static/libs/fontastic/styles.css'), false, DNT_VERSION );
57
 
58
  // Register touchSwipe
59
- wp_enqueue_script( 'touchSwipe', plugins_url('ditty-news-ticker/inc/static/js/jquery.touchSwipe.min.js'), array('jquery'), DNT_VERSION, true );
60
 
61
  // Register the jQuery easing
62
  wp_enqueue_script( 'jquery-easing', plugins_url('ditty-news-ticker/inc/static/js/jquery.easing.js'), array('jquery'), '1.4.1', true );
@@ -65,9 +65,9 @@ function mtphr_dnt_scripts() {
65
  wp_enqueue_script( 'imagesLoaded', plugins_url('ditty-news-ticker/inc/static/js/imagesloaded.pkgd.min.js'), array('jquery'), '4.1.0', true );
66
 
67
  // Register the Ditty News Ticker scripts
68
- wp_enqueue_style( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/css/style.css'), false, filemtime(DNT_DIR.'inc/static/css/style.css') );
69
 
70
- wp_enqueue_script( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/js/ditty-news-ticker.min.js'), array('jquery', 'imagesLoaded', 'touchSwipe', 'jquery-easing'), filemtime(DNT_DIR.'inc/static/js/ditty-news-ticker.min.js'), true );
71
  wp_localize_script( 'ditty-news-ticker', 'mtphr_dnt_vars', array(
72
  'is_rtl' => is_rtl(),
73
  )
34
  wp_register_script( 'jquery-easing', plugins_url('ditty-news-ticker/inc/static/js/jquery.easing.js'), array('jquery'), '1.4.1', true );
35
 
36
  // Load the news ticker scripts
37
+ wp_enqueue_script( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/js/script-admin.min.js'), array( 'jquery','jquery-ui-core','jquery-ui-sortable', 'jquery-easing', 'qtip' ), MTPHR_DNT_VERSION, true );
38
  wp_localize_script( 'ditty-news-ticker', 'ditty_news_ticker_vars', array(
39
  'security' => wp_create_nonce( 'ditty-news-ticker' ),
40
  'img_title' => __( 'Upload or select an image', 'ditty-news-ticker' ),
45
  }
46
 
47
  // Load the icon font css
48
+ wp_enqueue_style( 'ditty-news-ticker-font', plugins_url('ditty-news-ticker/inc/static/libs/fontastic/styles.css'), false, MTPHR_DNT_VERSION );
49
 
50
  // Load the plugin css
51
+ wp_enqueue_style( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/css/style-admin.css'), array('dashicons'), MTPHR_DNT_VERSION );
52
 
53
  } else {
54
 
55
  // Load the icon font css
56
+ wp_enqueue_style( 'ditty-news-ticker-font', plugins_url('ditty-news-ticker/inc/static/libs/fontastic/styles.css'), false, MTPHR_DNT_VERSION );
57
 
58
  // Register touchSwipe
59
+ wp_enqueue_script( 'touchSwipe', plugins_url('ditty-news-ticker/inc/static/js/jquery.touchSwipe.min.js'), array('jquery'), MTPHR_DNT_VERSION, true );
60
 
61
  // Register the jQuery easing
62
  wp_enqueue_script( 'jquery-easing', plugins_url('ditty-news-ticker/inc/static/js/jquery.easing.js'), array('jquery'), '1.4.1', true );
65
  wp_enqueue_script( 'imagesLoaded', plugins_url('ditty-news-ticker/inc/static/js/imagesloaded.pkgd.min.js'), array('jquery'), '4.1.0', true );
66
 
67
  // Register the Ditty News Ticker scripts
68
+ wp_enqueue_style( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/css/style.css'), false, filemtime(MTPHR_DNT_DIR.'inc/static/css/style.css') );
69
 
70
+ wp_enqueue_script( 'ditty-news-ticker', plugins_url('ditty-news-ticker/inc/static/js/ditty-news-ticker.min.js'), array('jquery', 'imagesLoaded', 'touchSwipe', 'jquery-easing'), filemtime(MTPHR_DNT_DIR.'inc/static/js/ditty-news-ticker.min.js'), true );
71
  wp_localize_script( 'ditty-news-ticker', 'mtphr_dnt_vars', array(
72
  'is_rtl' => is_rtl(),
73
  )
inc/templates.php CHANGED
@@ -55,8 +55,8 @@ function mtphr_dnt_locate_template( $template_names, $load = false, $require_onc
55
  break;
56
 
57
  // Check theme compatibility last
58
- } elseif( file_exists(DNT_DIR.'inc/templates/'.$template_name) ) {
59
- $located = DNT_DIR.'inc/templates/'.$template_name;
60
  break;
61
  }
62
  }
55
  break;
56
 
57
  // Check theme compatibility last
58
+ } elseif( file_exists(MTPHR_DNT_DIR.'inc/templates/'.$template_name) ) {
59
+ $located = MTPHR_DNT_DIR.'inc/templates/'.$template_name;
60
  break;
61
  }
62
  }
readme.txt CHANGED
@@ -72,6 +72,9 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
72
 
73
  == Changelog ==
74
 
 
 
 
75
  = 2.2.6 =
76
  * Resolved undefined variable bug in eddsl.php file
77
 
@@ -504,4 +507,4 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
504
 
505
  == Upgrade Notice ==
506
 
507
- Updated extension license check for multisite networks
72
 
73
  == Changelog ==
74
 
75
+ = 2.2.7 =
76
+ * Constant variable bug fix
77
+
78
  = 2.2.6 =
79
  * Resolved undefined variable bug in eddsl.php file
80
 
507
 
508
  == Upgrade Notice ==
509
 
510
+ Constant variable bug fix