Ditty News Ticker - Version 2.2.14

Version Description

  • Resolved display issue with tickers using external fonts
Download this release

Release Info

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

Code changes from version 2.2.13 to 2.2.14

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.13
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
@@ -62,7 +62,7 @@ final class Ditty_News_Ticker {
62
 
63
  // Plugin version
64
  if ( ! defined( 'MTPHR_DNT_VERSION' ) ) {
65
- define( 'MTPHR_DNT_VERSION', '2.2.13' );
66
  }
67
 
68
  // Plugin Folder Path
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.14
9
  Author: Metaphor Creations
10
  Author URI: http://www.metaphorcreations.com
11
  Contributors: metaphorcreations
62
 
63
  // Plugin version
64
  if ( ! defined( 'MTPHR_DNT_VERSION' ) ) {
65
+ define( 'MTPHR_DNT_VERSION', '2.2.14' );
66
  }
67
 
68
  // Plugin Folder Path
inc/static/css/style.css CHANGED
@@ -28,6 +28,7 @@
28
  overflow: hidden; }
29
 
30
  .mtphr-dnt-tick {
 
31
  margin: 0; }
32
  .mtphr-dnt-tick img.emoji {
33
  max-width: none; }
@@ -136,10 +137,8 @@
136
  font-size: 30px;
137
  color: #FFF;
138
  margin: -15px 0 0 -15px;
139
- -webkit-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
140
- -moz-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
141
- -o-animation: mtphr-dnt-spinner-rotation 0.8s infinite linear;
142
- animation: mtphr-dnt-spinner-rotation 0.8s infinite linear; }
143
 
144
  @-webkit-keyframes mtphr-dnt-spinner-rotation {
145
  from {
@@ -147,23 +146,13 @@
147
  to {
148
  -webkit-transform: rotate(359deg); } }
149
 
150
- @-moz-keyframes mtphr-dnt-spinner-rotation {
151
- from {
152
- -moz-transform: rotate(0deg); }
153
- to {
154
- -moz-transform: rotate(359deg); } }
155
-
156
- @-o-keyframes mtphr-dnt-spinner-rotation {
157
- from {
158
- -o-transform: rotate(0deg); }
159
- to {
160
- -o-transform: rotate(359deg); } }
161
-
162
  @keyframes mtphr-dnt-spinner-rotation {
163
  from {
164
- transform: rotate(0deg); }
 
165
  to {
166
- transform: rotate(359deg); } }
 
167
 
168
  /* --------------------------------------------------------- */
169
  /* !Images */
@@ -180,12 +169,10 @@
180
  margin-top: 0; }
181
  .mtphr-dnt-image-container > *:last-child {
182
  margin-bottom: 0; }
183
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo,
184
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-photo {
185
  margin-top: 0;
186
  margin-bottom: 0; }
187
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption,
188
- .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-caption {
189
  position: absolute;
190
  left: 0;
191
  bottom: 0;
@@ -203,8 +190,8 @@
203
  display: block; }
204
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
205
  opacity: 0;
206
- -webkit-transition: opacity 0.25s ease;
207
- transition: opacity 0.25s ease; }
208
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
209
  opacity: 1; }
210
  .mtphr-dnt-image-container .mtphr-dnt-image-photo {
@@ -263,10 +250,8 @@
263
 
264
  .mtphr-dnt-nav-hide {
265
  opacity: 0;
266
- -webkit-transition: opacity 0.3s linear;
267
- -moz-transition: opacity 0.3s linear;
268
- -o-transition: opacity 0.3s linear;
269
- transition: opacity 0.3s linear; }
270
 
271
  .mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
272
  opacity: 1; }
@@ -333,8 +318,8 @@
333
  background-color: #333;
334
  border-radius: 20px;
335
  opacity: .8;
336
- -webkit-transition: opacity 0.25s ease;
337
- transition: opacity 0.25s ease; }
338
  .mtphr-dnt-play-pause i:before {
339
  vertical-align: middle; }
340
  .mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
@@ -356,17 +341,13 @@
356
  color: #666;
357
  background: #FFF;
358
  padding: 6px 8px 4px 7px;
359
- -webkit-border-radius: 5px;
360
- -moz-border-radius: 5px;
361
  border-radius: 5px;
362
  filter: alpha(opacity=50);
363
  -moz-opacity: .5;
364
  -khtml-opacity: .5;
365
  opacity: .5;
366
- -webkit-transition: opacity 0.2s linear;
367
- -moz-transition: opacity 0.2s linear;
368
- -o-transition: opacity 0.2s linear;
369
- transition: opacity 0.2s linear; }
370
 
371
  .mtphr-dnt-edit-link:hover {
372
  color: #666;
28
  overflow: hidden; }
29
 
30
  .mtphr-dnt-tick {
31
+ opacity: 0;
32
  margin: 0; }
33
  .mtphr-dnt-tick img.emoji {
34
  max-width: none; }
137
  font-size: 30px;
138
  color: #FFF;
139
  margin: -15px 0 0 -15px;
140
+ -webkit-animation: mtphr-dnt-spinner-rotation .8s infinite linear;
141
+ animation: mtphr-dnt-spinner-rotation .8s infinite linear; }
 
 
142
 
143
  @-webkit-keyframes mtphr-dnt-spinner-rotation {
144
  from {
146
  to {
147
  -webkit-transform: rotate(359deg); } }
148
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  @keyframes mtphr-dnt-spinner-rotation {
150
  from {
151
+ -webkit-transform: rotate(0deg);
152
+ transform: rotate(0deg); }
153
  to {
154
+ -webkit-transform: rotate(359deg);
155
+ transform: rotate(359deg); } }
156
 
157
  /* --------------------------------------------------------- */
158
  /* !Images */
169
  margin-top: 0; }
170
  .mtphr-dnt-image-container > *:last-child {
171
  margin-bottom: 0; }
172
+ .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-photo, .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-photo {
 
173
  margin-top: 0;
174
  margin-bottom: 0; }
175
+ .mtphr-dnt-image-container.mtphr-dnt-image-caption-top .mtphr-dnt-image-caption, .mtphr-dnt-image-container.mtphr-dnt-image-caption-bottom .mtphr-dnt-image-caption {
 
176
  position: absolute;
177
  left: 0;
178
  bottom: 0;
190
  display: block; }
191
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover .mtphr-dnt-image-caption {
192
  opacity: 0;
193
+ -webkit-transition: opacity .25s ease;
194
+ transition: opacity .25s ease; }
195
  .mtphr-dnt-image-container.mtphr-dnt-image-caption-hover:hover .mtphr-dnt-image-caption {
196
  opacity: 1; }
197
  .mtphr-dnt-image-container .mtphr-dnt-image-photo {
250
 
251
  .mtphr-dnt-nav-hide {
252
  opacity: 0;
253
+ -webkit-transition: opacity .3s linear;
254
+ transition: opacity .3s linear; }
 
 
255
 
256
  .mtphr-dnt-tick-container:hover .mtphr-dnt-nav-hide {
257
  opacity: 1; }
318
  background-color: #333;
319
  border-radius: 20px;
320
  opacity: .8;
321
+ -webkit-transition: opacity .25s ease;
322
+ transition: opacity .25s ease; }
323
  .mtphr-dnt-play-pause i:before {
324
  vertical-align: middle; }
325
  .mtphr-dnt-play-pause i.mtphr-dnt-icon-play {
341
  color: #666;
342
  background: #FFF;
343
  padding: 6px 8px 4px 7px;
 
 
344
  border-radius: 5px;
345
  filter: alpha(opacity=50);
346
  -moz-opacity: .5;
347
  -khtml-opacity: .5;
348
  opacity: .5;
349
+ -webkit-transition: opacity .2s linear;
350
+ transition: opacity .2s linear; }
 
 
351
 
352
  .mtphr-dnt-edit-link:hover {
353
  color: #666;
inc/static/js/ditty-news-ticker.js CHANGED
@@ -241,8 +241,10 @@
241
  pos = (settings.scroll_direction === 'left') ? mtphr_dnt_scroll_left(i) : mtphr_dnt_scroll_right(i);
242
  if( pos === 'reset' ) {
243
  pos = ticks[i][0].reset;
 
244
  ticks[i][0].headline.stop(true,true).css('left',pos+'px');
245
  } else {
 
246
  ticks[i][0].headline.stop(true,true).animate( {
247
  left: pos+'px'
248
  }, 100, 'linear' );
@@ -252,8 +254,10 @@
252
  pos = (settings.scroll_direction === 'up') ? mtphr_dnt_scroll_up(i) : mtphr_dnt_scroll_down(i);
253
  if( pos === 'reset' ) {
254
  pos = ticks[i][0].reset;
 
255
  ticks[i][0].headline.stop(true,true).css('top',pos+'px');
256
  } else {
 
257
  ticks[i][0].headline.stop(true,true).animate( {
258
  top: pos+'px'
259
  }, 100, 'linear' );
241
  pos = (settings.scroll_direction === 'left') ? mtphr_dnt_scroll_left(i) : mtphr_dnt_scroll_right(i);
242
  if( pos === 'reset' ) {
243
  pos = ticks[i][0].reset;
244
+ ticks[i][0].headline.css('opacity', 0);
245
  ticks[i][0].headline.stop(true,true).css('left',pos+'px');
246
  } else {
247
+ ticks[i][0].headline.css('opacity', 1);
248
  ticks[i][0].headline.stop(true,true).animate( {
249
  left: pos+'px'
250
  }, 100, 'linear' );
254
  pos = (settings.scroll_direction === 'up') ? mtphr_dnt_scroll_up(i) : mtphr_dnt_scroll_down(i);
255
  if( pos === 'reset' ) {
256
  pos = ticks[i][0].reset;
257
+ ticks[i][0].headline.css('opacity', 0);
258
  ticks[i][0].headline.stop(true,true).css('top',pos+'px');
259
  } else {
260
+ ticks[i][0].headline.css('opacity', 1);
261
  ticks[i][0].headline.stop(true,true).animate( {
262
  top: pos+'px'
263
  }, 100, 'linear' );
inc/static/js/ditty-news-ticker.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={init:function(e){return this.each((function(){function i(){N.tick_count=S.find(".mtphr-dnt-tick").length,N.tick_count>0&&("scroll"===K.type?r():"rotate"===K.type&&y()),K.after_load.call(P,S),P.trigger("mtphr_dnt_after_load_single",[N,tt]),t("body").trigger("mtphr_dnt_after_load",[P,N,tt])}function n(){S.find(".mtphr-dnt-tick").each((function(){t(this).height()>$&&($=t(this).height()),"up"!==K.scroll_direction&&"down"!==K.scroll_direction||t(this).css("height","auto")})),S.css("height",$+"px")}function r(){var e=S.find(".mtphr-dnt-tick:first");if(e.attr("style")){var i,r=e.attr("style").split("width:");it=!(r.length>1)}tt=[],S.find("img").length?S.imagesLoaded((function(){n(),S.find(".mtphr-dnt-tick").each((function(){t(this).show();var e=[{headline:t(this)}];tt.push(e)})),g(),a()})):(n(),S.find(".mtphr-dnt-tick").each((function(){t(this).show();var e=[{headline:t(this)}];tt.push(e)})),g(),a()),S.hover((function(){K.scroll_pause&&s()}),(function(){K.scroll_pause&&!N.paused&&o()}))}function s(){clearInterval(et)}function o(){a()}function a(){clearInterval(et),et=setInterval((function(){for(var t=0;t<N.tick_count;t++)if(!0===tt[t][0].visible){var e="reset";"left"===K.scroll_direction||"right"===K.scroll_direction?"reset"===(e="left"===K.scroll_direction?c(t):p(t))?(e=tt[t][0].reset,tt[t][0].headline.stop(!0,!0).css("left",e+"px")):tt[t][0].headline.stop(!0,!0).animate({left:e+"px"},100,"linear"):"reset"===(e="up"===K.scroll_direction?l(t):_(t))?(e=tt[t][0].reset,tt[t][0].headline.stop(!0,!0).css("top",e+"px")):tt[t][0].headline.stop(!0,!0).animate({top:e+"px"},100,"linear"),tt[t][0].position=e}}),100)}function c(t){var e=parseFloat(tt[t][0].position-K.scroll_speed);return e<-(tt[t][0].headline.width()+K.offset)?e=d(t):e<parseFloat(Z-tt[t][0].headline.width()-K.scroll_spacing)&&u(t),e}function p(t){var e=tt[t][0].position+K.scroll_speed;return e>Z+K.offset?e=d(t):e>K.scroll_spacing&&u(t),e}function l(t){var e=tt[t][0].position-K.scroll_speed;return e<-(tt[t][0].headline.height()+K.offset)?e=d(t):e<$-tt[t][0].headline.height()-K.scroll_spacing&&u(t),e}function _(t){var e=tt[t][0].position+K.scroll_speed;return e>$+K.offset?e=d(t):e>K.scroll_spacing&&u(t),e}function d(e){return N.tick_count>1&&(tt[e][0].visible=!1),N.tick_count===e+1&&(P.trigger("mtphr_dnt_scroll_complete",[N,tt]),t("body").trigger("mtphr_dnt_scroll_complete",[P,N,tt])),"reset"}function f(t){!1===tt[t][0].visible&&(N.previous_tick=parseInt(t-1),N.previous_tick<0&&(N.previous_tick=parseInt(N.tick_count-1)),N.current_tick=t,N.next_tick=parseInt(t+1),N.next_tick>=N.tick_count&&(N.next_tick=0))}function u(t){t===N.tick_count-1?K.scroll_loop&&(f(0),tt[0][0].visible=!0):(f(parseInt(t+1)),tt[t+1][0].visible=!0)}function h(){for(var t=0;t<N.tick_count;t++){var e,i=tt[t][0].headline;switch(K.scroll_direction){case"left":e=Z+K.offset,!1===tt[t][0].visible&&i.css("left",e+"px");break;case"right":e=parseInt("-"+(i.width()+K.offset)),!1===tt[t][0].visible&&i.css("left",e+"px");break;case"up":it&&i.css("width",Z),e=parseInt($+K.offset),!1===tt[t][0].visible&&i.css("top",e+"px");break;case"down":it&&i.css("width",Z),e=parseInt("-"+(i.height()+K.offset)),!1===tt[t][0].visible&&i.css("top",e+"px");break}tt[t][0].width=i.width(),tt[t][0].height=i.height(),!1===tt[t][0].visible&&(tt[t][0].position=e),tt[t][0].reset=e}}function g(){for(var t,e,i=0;i<N.tick_count;i++)if(tt[i]){switch(e=tt[i][0].headline,K.scroll_direction){case"left":t=Z+K.offset,e.stop(!0,!0).css("left",t+"px");break;case"right":t=parseInt("-"+(e.width()+K.offset)),e.stop(!0,!0).css("left",t+"px");break;case"up":it&&e.css("width",Z),t=parseInt($+K.offset),e.stop(!0,!0).css("top",t+"px");break;case"down":it&&e.css("width",Z),t=parseInt("-"+(e.height()+K.offset)),e.stop(!0,!0).css("top",t+"px");break}tt[i][0].width=e.width(),tt[i][0].height=e.height(),tt[i][0].position=t,tt[i][0].reset=t,tt[i][0].visible=!1}if(N.current_tick=0,tt[N.current_tick][0].visible=!0,K.scroll_init)for("left"===K.scroll_direction?t=.1*Z:"right"===K.scroll_direction?t=.9*Z:"up"===K.scroll_direction?t=.1*$:"down"===K.scroll_direction&&(t=.9*$),i=0;i<N.tick_count;i++)switch(e=tt[i][0].headline,K.scroll_direction){case"left":t<Z&&(e.stop(!0,!0).css("left",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t=t+tt[i][0].width+K.scroll_spacing);break;case"right":t>0&&(t-=tt[i][0].width,e.stop(!0,!0).css("left",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t-=K.scroll_spacing);break;case"up":t<$&&(e.stop(!0,!0).css("top",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t=t+tt[i][0].height+K.scroll_spacing);break;case"down":t>0&&(t-=tt[i][0].height,e.stop(!0,!0).css("top",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t-=K.scroll_spacing);break}}function v(){m()}function k(){clearInterval(nt)}function y(){switch(S.find(".mtphr-dnt-tick").each((function(){tt.push(t(this)),t(this).imagesLoaded((function(){F()}))})),F(),S.find(".mtphr-dnt-tick").show(),K.rotate_type){case"fade":C(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":z(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":T(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":A(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":R(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break}w(0),K.auto_rotate&&v(),S.hover((function(){K.auto_rotate&&K.rotate_pause&&!N.running&&k()}),(function(){K.auto_rotate&&K.rotate_pause&&!N.running&&!N.paused&&v()}))}function m(){k(),nt=setInterval((function(){var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),b(t)}),parseInt(1e3*K.rotate_delay))}function b(e){N.current_tick!==e&&(K.auto_rotate&&k(),N.next_tick=e,K.before_change.call(P,S),P.trigger("mtphr_dnt_before_change_single",[N,tt]),t("body").trigger("mtphr_dnt_before_change",[P,N,tt]),N.running=1,I(e),x(e),N.previous_tick=N.current_tick,N.current_tick=e,st=setTimeout((function(){K.after_change.call(P,S),P.trigger("mtphr_dnt_after_change_single",[N,tt]),t("body").trigger("mtphr_dnt_after_change",[P,N,tt]),rt=K.rotate_type,N.reverse=0,N.running=0,K.auto_rotate&&!N.paused&&m()}),parseInt(100*K.rotate_speed)))}function w(t){X&&(X.children("a").removeClass("active"),X.children('a[href="'+t+'"]').addClass("active"))}function x(e){switch(w(e),rt){case"fade":D(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":L(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":j(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":M(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":q(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break}}function I(e){switch(rt){case"fade":W(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":O(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":E(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":Q(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":B(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break}}function F(){for(var e=0;e<N.tick_count;e++)t(tt[e]).width(Z+"px"),N.current_tick!==e&&t(tt[e]).css({left:parseFloat(Z+K.offset)+"px"});var i=t(tt[N.current_tick]).height();S.stop().css("height",i+"px")}function C(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,left:"auto"})}function D(t,e,i,n,r){e.css({opacity:0,left:"auto"}),e.stop().animate({opacity:1},n,r);var s=e.height();t.stop().animate({height:s+"px"},n,r)}function W(e,i,n,r,s){i.stop().animate({opacity:0},r,s,(function(){t(this).css({left:parseFloat(Z+K.offset)+"px"}),i.remove(),e.append(i)}))}function z(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,left:0})}function L(t,e,i,n,r){var s=e.height();e.css({opacity:1,left:parseFloat(Z+K.offset)+"px"}),t.stop().animate({height:s+"px"},n,r,(function(){})),e.stop().animate({left:"0"},n,r,(function(){}))}function O(t,e,i,n,r){e.stop().animate({left:"-"+parseFloat(Z+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function T(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,left:0})}function j(t,e,i,n,r){var s=e.height();e.css({opacity:1,left:"-"+parseFloat(Z+K.offset)+"px"}),t.stop().animate({height:s+"px"},n,r,(function(){})),e.stop().animate({left:"0"},n,r)}function E(t,e,i,n,r){e.stop().animate({left:parseFloat(Z+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function A(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,top:0,left:"auto"})}function M(t,e,i,n,r){var s=e.height();e.css({opacity:1,top:"-"+parseFloat(s+K.offset)+"px",left:"auto"}),t.stop().animate({height:s+"px"},n,r),e.stop().animate({top:"0"},n,r)}function Q(t,e,i,n,r){var s=i.height();e.stop().animate({top:parseFloat(s+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function R(t,e){var i=e[0],n=i.height();t.css({height:n+"px",left:"auto"}),i.css({opacity:1,top:0})}function q(t,e,i,n,r){var s=e.height();e.css({opacity:1,top:parseFloat(i.height()+K.offset)+"px",left:"auto"}),t.stop().animate({height:s+"px"},n,r),e.stop().animate({top:"0"},n,r)}function B(t,e,i,n,r){var s=e.height();e.stop().animate({top:"-"+parseFloat(s+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function G(){if(N.running)return!1;var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),b(t)}function H(){if(N.running)return!1;var t=parseInt(N.current_tick-1);t<0&&(t=N.tick_count-1),K.nav_reverse&&("slide_left"===K.rotate_type?rt="slide_right":"slide_right"===K.rotate_type?rt="slide_left":"slide_down"===K.rotate_type?rt="slide_up":"slide_up"===K.rotate_type&&(rt="slide_down"),N.reverse=1),b(t)}function J(t){t?(N.paused=!1,Y.removeClass("paused"),"scroll"===K.type?o():v()):(N.paused=!0,Y.addClass("paused"),"scroll"===K.type?s():k()),P.trigger("mtphr_dnt_play_pause",[N,tt])}var K={id:"",type:"scroll",scroll_direction:"left",scroll_speed:10,scroll_pause:0,scroll_spacing:40,scroll_units:10,scroll_init:0,scroll_loop:1,rotate_type:"fade",auto_rotate:0,rotate_delay:10,rotate_pause:0,rotate_speed:10,rotate_ease:"easeOutExpo",nav_reverse:0,disable_touchswipe:0,offset:20,before_change:function(){},after_change:function(){},after_load:function(){}},N={id:K.id,tick_count:0,previous_tick:0,current_tick:0,next_tick:0,reverse:0,running:0,paused:0};e&&t.extend(K,e);var P=t(this),S=P.find(".mtphr-dnt-tick-contents"),U=P.find(".mtphr-dnt-nav-prev"),V=P.find(".mtphr-dnt-nav-next"),X=P.find(".mtphr-dnt-control-links"),Y=P.find(".mtphr-dnt-play-pause"),Z=S.outerWidth(!0),$=0,tt=[],et,it=!0,nt,rt=K.rotate_type,st;if(S.data("ditty:vars",N),U&&"rotate"===K.type&&(U.bind("click",(function(t){t.preventDefault(),H()})),V.bind("click",(function(t){t.preventDefault(),G()}))),X&&"rotate"===K.type&&X.children("a").bind("click",(function(e){e.preventDefault();var i=parseInt(t(this).attr("href"));if(N.running)return!1;if(i===N.current_tick)return!1;var n=i<N.current_tick?1:0;K.nav_reverse&&n&&("slide_left"===K.rotate_type?rt="slide_right":"slide_right"===K.rotate_type?rt="slide_left":"slide_down"===K.rotate_type?rt="slide_up":"slide_up"===K.rotate_type&&(rt="slide_down"),N.reverse=1),b(i)})),Y.bind("click",(function(t){t.preventDefault(),J(N.paused)})),"rotate"!==K.type||K.disable_touchswipe||S.swipe({triggerOnTouchEnd:!0,swipeLeft:function(){if(N.running)return!1;var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),"slide_left"!==K.rotate_type&&"slide_right"!==K.rotate_type||(rt="slide_left"),b(t)},swipeRight:function(){if(N.running)return!1;var t=parseInt(N.current_tick-1);t<0&&(t=N.tick_count-1),"slide_left"!==K.rotate_type&&"slide_right"!==K.rotate_type||(rt="slide_right"),K.nav_reverse&&("slide_down"===K.rotate_type?rt="slide_up":"slide_up"===K.rotate_type&&(rt="slide_down"),N.reverse=1),b(t)}}),P.on("mtphr_dnt_next",(function(){G()})),P.on("mtphr_dnt_prev",(function(){H()})),P.on("mtphr_dnt_goto",(function(t,e){b(parseInt(e))})),P.on("mtphr_dnt_pause",(function(){J()})),P.on("mtphr_dnt_play",(function(){J(!0)})),t(window).resize((function(){S.outerWidth()!==Z&&(Z=S.outerWidth(!0),"scroll"===K.type?("up"===K.scroll_direction||"down"===K.scroll_direction)&&it?g():h():"rotate"===K.type&&F())})),P.on("mtphr_dnt_resize_single",(function(){"scroll"===K.type?h():"rotate"===K.type&&F()})),t("body").on("mtphr_dnt_resize",(function(t,e){e&&e.indexOf(K.id)>=0&&("scroll"===K.type?h():"rotate"===K.type&&F())})),P.on("mtphr_dnt_replace_ticks",(function(e,n,r){clearInterval(et),P.find(".mtphr-dnt-tick").remove(),n.each((function(){S.append(t(this))})),setTimeout((function(){i()}),r)})),0===P.width())var ot=setInterval((function(){P.width()>10&&(clearInterval(ot),Z=S.outerWidth(!0),i())}),100);else i()}))}};t.fn.ditty_news_ticker=function(i){return e[i]?e[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist in ditty_news_ticker"):e.init.apply(this,arguments)}}(jQuery);
1
+ !function(t){var e={init:function(e){return this.each((function(){function i(){N.tick_count=S.find(".mtphr-dnt-tick").length,N.tick_count>0&&("scroll"===K.type?r():"rotate"===K.type&&y()),K.after_load.call(P,S),P.trigger("mtphr_dnt_after_load_single",[N,tt]),t("body").trigger("mtphr_dnt_after_load",[P,N,tt])}function n(){S.find(".mtphr-dnt-tick").each((function(){t(this).height()>$&&($=t(this).height()),"up"!==K.scroll_direction&&"down"!==K.scroll_direction||t(this).css("height","auto")})),S.css("height",$+"px")}function r(){var e=S.find(".mtphr-dnt-tick:first");if(e.attr("style")){var i,r=e.attr("style").split("width:");it=!(r.length>1)}tt=[],S.find("img").length?S.imagesLoaded((function(){n(),S.find(".mtphr-dnt-tick").each((function(){t(this).show();var e=[{headline:t(this)}];tt.push(e)})),g(),a()})):(n(),S.find(".mtphr-dnt-tick").each((function(){t(this).show();var e=[{headline:t(this)}];tt.push(e)})),g(),a()),S.hover((function(){K.scroll_pause&&s()}),(function(){K.scroll_pause&&!N.paused&&o()}))}function s(){clearInterval(et)}function o(){a()}function a(){clearInterval(et),et=setInterval((function(){for(var t=0;t<N.tick_count;t++)if(!0===tt[t][0].visible){var e="reset";"left"===K.scroll_direction||"right"===K.scroll_direction?"reset"===(e="left"===K.scroll_direction?c(t):p(t))?(e=tt[t][0].reset,tt[t][0].headline.css("opacity",0),tt[t][0].headline.stop(!0,!0).css("left",e+"px")):(tt[t][0].headline.css("opacity",1),tt[t][0].headline.stop(!0,!0).animate({left:e+"px"},100,"linear")):"reset"===(e="up"===K.scroll_direction?l(t):_(t))?(e=tt[t][0].reset,tt[t][0].headline.css("opacity",0),tt[t][0].headline.stop(!0,!0).css("top",e+"px")):(tt[t][0].headline.css("opacity",1),tt[t][0].headline.stop(!0,!0).animate({top:e+"px"},100,"linear")),tt[t][0].position=e}}),100)}function c(t){var e=parseFloat(tt[t][0].position-K.scroll_speed);return e<-(tt[t][0].headline.width()+K.offset)?e=d(t):e<parseFloat(Z-tt[t][0].headline.width()-K.scroll_spacing)&&u(t),e}function p(t){var e=tt[t][0].position+K.scroll_speed;return e>Z+K.offset?e=d(t):e>K.scroll_spacing&&u(t),e}function l(t){var e=tt[t][0].position-K.scroll_speed;return e<-(tt[t][0].headline.height()+K.offset)?e=d(t):e<$-tt[t][0].headline.height()-K.scroll_spacing&&u(t),e}function _(t){var e=tt[t][0].position+K.scroll_speed;return e>$+K.offset?e=d(t):e>K.scroll_spacing&&u(t),e}function d(e){return N.tick_count>1&&(tt[e][0].visible=!1),N.tick_count===e+1&&(P.trigger("mtphr_dnt_scroll_complete",[N,tt]),t("body").trigger("mtphr_dnt_scroll_complete",[P,N,tt])),"reset"}function f(t){!1===tt[t][0].visible&&(N.previous_tick=parseInt(t-1),N.previous_tick<0&&(N.previous_tick=parseInt(N.tick_count-1)),N.current_tick=t,N.next_tick=parseInt(t+1),N.next_tick>=N.tick_count&&(N.next_tick=0))}function u(t){t===N.tick_count-1?K.scroll_loop&&(f(0),tt[0][0].visible=!0):(f(parseInt(t+1)),tt[t+1][0].visible=!0)}function h(){for(var t=0;t<N.tick_count;t++){var e,i=tt[t][0].headline;switch(K.scroll_direction){case"left":e=Z+K.offset,!1===tt[t][0].visible&&i.css("left",e+"px");break;case"right":e=parseInt("-"+(i.width()+K.offset)),!1===tt[t][0].visible&&i.css("left",e+"px");break;case"up":it&&i.css("width",Z),e=parseInt($+K.offset),!1===tt[t][0].visible&&i.css("top",e+"px");break;case"down":it&&i.css("width",Z),e=parseInt("-"+(i.height()+K.offset)),!1===tt[t][0].visible&&i.css("top",e+"px");break}tt[t][0].width=i.width(),tt[t][0].height=i.height(),!1===tt[t][0].visible&&(tt[t][0].position=e),tt[t][0].reset=e}}function g(){for(var t,e,i=0;i<N.tick_count;i++)if(tt[i]){switch(e=tt[i][0].headline,K.scroll_direction){case"left":t=Z+K.offset,e.stop(!0,!0).css("left",t+"px");break;case"right":t=parseInt("-"+(e.width()+K.offset)),e.stop(!0,!0).css("left",t+"px");break;case"up":it&&e.css("width",Z),t=parseInt($+K.offset),e.stop(!0,!0).css("top",t+"px");break;case"down":it&&e.css("width",Z),t=parseInt("-"+(e.height()+K.offset)),e.stop(!0,!0).css("top",t+"px");break}tt[i][0].width=e.width(),tt[i][0].height=e.height(),tt[i][0].position=t,tt[i][0].reset=t,tt[i][0].visible=!1}if(N.current_tick=0,tt[N.current_tick][0].visible=!0,K.scroll_init)for("left"===K.scroll_direction?t=.1*Z:"right"===K.scroll_direction?t=.9*Z:"up"===K.scroll_direction?t=.1*$:"down"===K.scroll_direction&&(t=.9*$),i=0;i<N.tick_count;i++)switch(e=tt[i][0].headline,K.scroll_direction){case"left":t<Z&&(e.stop(!0,!0).css("left",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t=t+tt[i][0].width+K.scroll_spacing);break;case"right":t>0&&(t-=tt[i][0].width,e.stop(!0,!0).css("left",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t-=K.scroll_spacing);break;case"up":t<$&&(e.stop(!0,!0).css("top",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t=t+tt[i][0].height+K.scroll_spacing);break;case"down":t>0&&(t-=tt[i][0].height,e.stop(!0,!0).css("top",t+"px"),tt[i][0].position=t,tt[i][0].visible=!0,t-=K.scroll_spacing);break}}function v(){m()}function k(){clearInterval(nt)}function y(){switch(S.find(".mtphr-dnt-tick").each((function(){tt.push(t(this)),t(this).imagesLoaded((function(){F()}))})),F(),S.find(".mtphr-dnt-tick").show(),K.rotate_type){case"fade":C(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":z(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":T(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":A(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":R(S,tt,parseInt(100*K.rotate_speed),K.rotate_ease);break}w(0),K.auto_rotate&&v(),S.hover((function(){K.auto_rotate&&K.rotate_pause&&!N.running&&k()}),(function(){K.auto_rotate&&K.rotate_pause&&!N.running&&!N.paused&&v()}))}function m(){k(),nt=setInterval((function(){var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),b(t)}),parseInt(1e3*K.rotate_delay))}function b(e){N.current_tick!==e&&(K.auto_rotate&&k(),N.next_tick=e,K.before_change.call(P,S),P.trigger("mtphr_dnt_before_change_single",[N,tt]),t("body").trigger("mtphr_dnt_before_change",[P,N,tt]),N.running=1,I(e),x(e),N.previous_tick=N.current_tick,N.current_tick=e,st=setTimeout((function(){K.after_change.call(P,S),P.trigger("mtphr_dnt_after_change_single",[N,tt]),t("body").trigger("mtphr_dnt_after_change",[P,N,tt]),rt=K.rotate_type,N.reverse=0,N.running=0,K.auto_rotate&&!N.paused&&m()}),parseInt(100*K.rotate_speed)))}function w(t){X&&(X.children("a").removeClass("active"),X.children('a[href="'+t+'"]').addClass("active"))}function x(e){switch(w(e),rt){case"fade":D(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":L(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":j(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":M(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":q(S,t(tt[e]),t(tt[N.current_tick]),parseInt(100*K.rotate_speed),K.rotate_ease);break}}function I(e){switch(rt){case"fade":W(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_left":O(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_right":E(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_down":Q(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break;case"slide_up":B(S,t(tt[N.current_tick]),t(tt[e]),parseInt(100*K.rotate_speed),K.rotate_ease);break}}function F(){for(var e=0;e<N.tick_count;e++)t(tt[e]).width(Z+"px"),N.current_tick!==e&&t(tt[e]).css({left:parseFloat(Z+K.offset)+"px"});var i=t(tt[N.current_tick]).height();S.stop().css("height",i+"px")}function C(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,left:"auto"})}function D(t,e,i,n,r){e.css({opacity:0,left:"auto"}),e.stop().animate({opacity:1},n,r);var s=e.height();t.stop().animate({height:s+"px"},n,r)}function W(e,i,n,r,s){i.stop().animate({opacity:0},r,s,(function(){t(this).css({left:parseFloat(Z+K.offset)+"px"}),i.remove(),e.append(i)}))}function z(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,left:0})}function L(t,e,i,n,r){var s=e.height();e.css({opacity:1,left:parseFloat(Z+K.offset)+"px"}),t.stop().animate({height:s+"px"},n,r,(function(){})),e.stop().animate({left:"0"},n,r,(function(){}))}function O(t,e,i,n,r){e.stop().animate({left:"-"+parseFloat(Z+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function T(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,left:0})}function j(t,e,i,n,r){var s=e.height();e.css({opacity:1,left:"-"+parseFloat(Z+K.offset)+"px"}),t.stop().animate({height:s+"px"},n,r,(function(){})),e.stop().animate({left:"0"},n,r)}function E(t,e,i,n,r){e.stop().animate({left:parseFloat(Z+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function A(t,e){var i=e[0],n=i.height();t.css("height",n+"px"),i.css({opacity:1,top:0,left:"auto"})}function M(t,e,i,n,r){var s=e.height();e.css({opacity:1,top:"-"+parseFloat(s+K.offset)+"px",left:"auto"}),t.stop().animate({height:s+"px"},n,r),e.stop().animate({top:"0"},n,r)}function Q(t,e,i,n,r){var s=i.height();e.stop().animate({top:parseFloat(s+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function R(t,e){var i=e[0],n=i.height();t.css({height:n+"px",left:"auto"}),i.css({opacity:1,top:0})}function q(t,e,i,n,r){var s=e.height();e.css({opacity:1,top:parseFloat(i.height()+K.offset)+"px",left:"auto"}),t.stop().animate({height:s+"px"},n,r),e.stop().animate({top:"0"},n,r)}function B(t,e,i,n,r){var s=e.height();e.stop().animate({top:"-"+parseFloat(s+K.offset)+"px"},n,r,(function(){e.css({opacity:0}),e.remove(),t.append(e)}))}function G(){if(N.running)return!1;var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),b(t)}function H(){if(N.running)return!1;var t=parseInt(N.current_tick-1);t<0&&(t=N.tick_count-1),K.nav_reverse&&("slide_left"===K.rotate_type?rt="slide_right":"slide_right"===K.rotate_type?rt="slide_left":"slide_down"===K.rotate_type?rt="slide_up":"slide_up"===K.rotate_type&&(rt="slide_down"),N.reverse=1),b(t)}function J(t){t?(N.paused=!1,Y.removeClass("paused"),"scroll"===K.type?o():v()):(N.paused=!0,Y.addClass("paused"),"scroll"===K.type?s():k()),P.trigger("mtphr_dnt_play_pause",[N,tt])}var K={id:"",type:"scroll",scroll_direction:"left",scroll_speed:10,scroll_pause:0,scroll_spacing:40,scroll_units:10,scroll_init:0,scroll_loop:1,rotate_type:"fade",auto_rotate:0,rotate_delay:10,rotate_pause:0,rotate_speed:10,rotate_ease:"easeOutExpo",nav_reverse:0,disable_touchswipe:0,offset:20,before_change:function(){},after_change:function(){},after_load:function(){}},N={id:K.id,tick_count:0,previous_tick:0,current_tick:0,next_tick:0,reverse:0,running:0,paused:0};e&&t.extend(K,e);var P=t(this),S=P.find(".mtphr-dnt-tick-contents"),U=P.find(".mtphr-dnt-nav-prev"),V=P.find(".mtphr-dnt-nav-next"),X=P.find(".mtphr-dnt-control-links"),Y=P.find(".mtphr-dnt-play-pause"),Z=S.outerWidth(!0),$=0,tt=[],et,it=!0,nt,rt=K.rotate_type,st;if(S.data("ditty:vars",N),U&&"rotate"===K.type&&(U.bind("click",(function(t){t.preventDefault(),H()})),V.bind("click",(function(t){t.preventDefault(),G()}))),X&&"rotate"===K.type&&X.children("a").bind("click",(function(e){e.preventDefault();var i=parseInt(t(this).attr("href"));if(N.running)return!1;if(i===N.current_tick)return!1;var n=i<N.current_tick?1:0;K.nav_reverse&&n&&("slide_left"===K.rotate_type?rt="slide_right":"slide_right"===K.rotate_type?rt="slide_left":"slide_down"===K.rotate_type?rt="slide_up":"slide_up"===K.rotate_type&&(rt="slide_down"),N.reverse=1),b(i)})),Y.bind("click",(function(t){t.preventDefault(),J(N.paused)})),"rotate"!==K.type||K.disable_touchswipe||S.swipe({triggerOnTouchEnd:!0,swipeLeft:function(){if(N.running)return!1;var t=parseInt(N.current_tick+1);t===N.tick_count&&(t=0),"slide_left"!==K.rotate_type&&"slide_right"!==K.rotate_type||(rt="slide_left"),b(t)},swipeRight:function(){if(N.running)return!1;var t=parseInt(N.current_tick-1);t<0&&(t=N.tick_count-1),"slide_left"!==K.rotate_type&&"slide_right"!==K.rotate_type||(rt="slide_right"),K.nav_reverse&&("slide_down"===K.rotate_type?rt="slide_up":"slide_up"===K.rotate_type&&(rt="slide_down"),N.reverse=1),b(t)}}),P.on("mtphr_dnt_next",(function(){G()})),P.on("mtphr_dnt_prev",(function(){H()})),P.on("mtphr_dnt_goto",(function(t,e){b(parseInt(e))})),P.on("mtphr_dnt_pause",(function(){J()})),P.on("mtphr_dnt_play",(function(){J(!0)})),t(window).resize((function(){S.outerWidth()!==Z&&(Z=S.outerWidth(!0),"scroll"===K.type?("up"===K.scroll_direction||"down"===K.scroll_direction)&&it?g():h():"rotate"===K.type&&F())})),P.on("mtphr_dnt_resize_single",(function(){"scroll"===K.type?h():"rotate"===K.type&&F()})),t("body").on("mtphr_dnt_resize",(function(t,e){e&&e.indexOf(K.id)>=0&&("scroll"===K.type?h():"rotate"===K.type&&F())})),P.on("mtphr_dnt_replace_ticks",(function(e,n,r){clearInterval(et),P.find(".mtphr-dnt-tick").remove(),n.each((function(){S.append(t(this))})),setTimeout((function(){i()}),r)})),0===P.width())var ot=setInterval((function(){P.width()>10&&(clearInterval(ot),Z=S.outerWidth(!0),i())}),100);else i()}))}};t.fn.ditty_news_ticker=function(i){return e[i]?e[i].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist in ditty_news_ticker"):e.init.apply(this,arguments)}}(jQuery);
inc/static/sass/style.scss CHANGED
@@ -33,6 +33,7 @@
33
  overflow: hidden;
34
  }
35
  .mtphr-dnt-tick {
 
36
  margin: 0;
37
  img.emoji {
38
  max-width: none;
33
  overflow: hidden;
34
  }
35
  .mtphr-dnt-tick {
36
+ opacity: 0;
37
  margin: 0;
38
  img.emoji {
39
  max-width: none;
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.13 =
76
  * Resolved wp_editor bug when sorting
77
 
@@ -525,4 +528,4 @@ The most common cause for an unresponsive ticker (when using scroll or rotate mo
525
 
526
  == Upgrade Notice ==
527
 
528
- Resolved wp_editor bug when sorting
72
 
73
  == Changelog ==
74
 
75
+ = 2.2.14 =
76
+ * Resolved display issue with tickers using external fonts
77
+
78
  = 2.2.13 =
79
  * Resolved wp_editor bug when sorting
80
 
528
 
529
  == Upgrade Notice ==
530
 
531
+ Resolved display issue with tickers using external fonts