WP News and Scrolling Widgets - Version 3.2.7

Version Description

  • Added excerpt functionality in post description.
  • Resolved display post content issue.
Download this release

Release Info

Developer anoopranawat
Plugin Icon 128x128 WP News and Scrolling Widgets
Version 3.2.7
Comparing to
See all releases

Code changes from version 3.2.2 to 3.2.7

Files changed (52) hide show
  1. css/stylenews.css +62 -27
  2. images/Calendar-Empty-icon.png +0 -0
  3. images/back.png +0 -0
  4. images/forword.png +0 -0
  5. images/newspaper-add-icon.png +0 -0
  6. images/play.png +0 -0
  7. images/stop.png +0 -0
  8. js/jcarousellite.js +1 -8
  9. js/jquery.newstape.js +12 -0
  10. languages/sp-news-and-widget-de_DE.mo +0 -0
  11. languages/sp-news-and-widget-de_DE.po +200 -0
  12. languages/sp-news-and-widget-fr_FR.mo +0 -0
  13. languages/sp-news-and-widget-fr_FR.po +200 -0
  14. languages/sp-news-and-widget-pl_PL.mo +0 -0
  15. languages/sp-news-and-widget-pl_PL.po +200 -0
  16. news_menu_function.php +68 -70
  17. pro-designs/News_banner.png +0 -0
  18. pro-designs/news-design-1.jpg +0 -0
  19. pro-designs/news-design-10.jpg +0 -0
  20. pro-designs/news-design-11.jpg +0 -0
  21. pro-designs/news-design-12.jpg +0 -0
  22. pro-designs/news-design-13.jpg +0 -0
  23. pro-designs/news-design-14.jpg +0 -0
  24. pro-designs/news-design-15.jpg +0 -0
  25. pro-designs/news-design-16.jpg +0 -0
  26. pro-designs/news-design-17.jpg +0 -0
  27. pro-designs/news-design-18.jpg +0 -0
  28. pro-designs/news-design-19.jpg +0 -0
  29. pro-designs/news-design-2.jpg +0 -0
  30. pro-designs/news-design-20.jpg +0 -0
  31. pro-designs/news-design-21.jpg +0 -0
  32. pro-designs/news-design-22.jpg +0 -0
  33. pro-designs/news-design-23.jpg +0 -0
  34. pro-designs/news-design-24.jpg +0 -0
  35. pro-designs/news-design-25.jpg +0 -0
  36. pro-designs/news-design-26.jpg +0 -0
  37. pro-designs/news-design-27.jpg +0 -0
  38. pro-designs/news-design-28.jpg +0 -0
  39. pro-designs/news-design-29.jpg +0 -0
  40. pro-designs/news-design-3.jpg +0 -0
  41. pro-designs/news-design-31.jpg +0 -0
  42. pro-designs/news-design-32.jpg +0 -0
  43. pro-designs/news-design-33.jpg +0 -0
  44. pro-designs/news-design-34.jpg +0 -0
  45. pro-designs/news-design-4.jpg +0 -0
  46. pro-designs/news-design-5.jpg +0 -0
  47. pro-designs/news-design-7.jpg +0 -0
  48. pro-designs/news-design-8.jpg +0 -0
  49. pro-designs/news-design-9.jpg +0 -0
  50. readme.txt +94 -66
  51. sp-news-and-widget.php +83 -284
  52. widget_function.php +100 -44
css/stylenews.css CHANGED
@@ -1,9 +1,11 @@
1
- .news-col-3, .news-col-4, .news-col-2{-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
2
- -moz-box-sizing: border-box; /* Firefox, other Gecko */
3
- box-sizing: border-box; }
4
  .news{margin-bottom:40px !important; clear:both;}
5
- .news-col-1{padding-bottom:40px; border-bottom:1px solid #d1d1d1;}
6
- .news .news-title{margin-top:0px; margin-bottom:10px !important;}
 
 
 
 
7
  .news-cat{margin-bottom:10px ;}
8
  .news-content{float:left; width:100%; clear:both;}
9
  .date-post{width: 11%;float: left;text-align: center;}
@@ -12,42 +14,75 @@ box-sizing: border-box; }
12
  .date-post p{margin: 0px;text-transform: uppercase;color: #333; text-align:center !important}
13
  .post-content-text{width:87%; margin-left:2%; float:left;}
14
  .news-thumb{float:left; width:100%; margin-bottom:25px;}
15
- /*.news-thumb img{width:100%; height:auto; margin:0px !important;}*/
16
 
17
- .news_li{border-bottom:1px solid #ddd; margin:0 !important; list-style:none !important}
18
- .newstickerthumb .news_li{float:left; width:100%;}
19
- .news_thumb_left{width:80px; float:left;}
20
- .news_thumb_left img{width:100%; margin:8px 0;}
21
- .news_thumb_right{margin-left:85px;}
22
- .news_pagination{clear:both; padding:20px 0; float:left; width:100%}
23
- .button-news-p{width:49%; float:right; text-align:right}
24
- .button-news-n{width:49%; float:left; text-align:left}
25
- .recent-news-items{clear:both;}
26
- .recent-news-items.no_p h6{margin:5px 0 !important;}
27
- .recent-news-items p{font-size:13px !important; margin-bottom:10px !important}
28
  .news-col-4{width:25%; float:left; clear:none !important; padding:0 15px;}
29
  .news-col-3{width:33%; float:left; clear:none !important; padding:0 15px;}
30
  .news-col-2{width:50%; float:left; clear:none !important; padding:0 15px;}
31
- .news-col-1{width:100%; float:left;}
32
 
33
- .news-col-1 .news-thumb img{width:100%; height:auto;}
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- .grid-news-thumb{float: left; height: 170px;line-height: 0; overflow: hidden; position: relative; width: 100%;background: #f1f1f1; }
36
- .grid-news-thumb img{transition: all 0.2s ease-in-out 0s; left: -9999px; margin: 0 auto;
37
- opacity: 1; position: absolute; right: -9999px; width:auto !important; max-width:600px !important; }
38
- .news-col-2 .grid-news-thumb img{ max-width:600px !important; width:auto !important}
 
39
  .news_li h6{clear: none !important; margin-bottom:5px !important; margin-top:8px !important; padding-bottom:0px !important; }
40
  .news_li h6 a.post-title{font-size:auto !important; font-size:16px !important;}
41
  .news_li p{padding-bottom:0px !important}
42
- .news-col-3 .news-thumb, .news-col-2 .news-thumb, .news-col-4 .news-thumb{margin-bottom:5px;}
43
- .news-col-3 .post-content-text, .news-col-2 .post-content-text, .news-col-4 .post-content-text{width:100%; margin:0px;}p.news-short-content{margin-bottom:5px !important}.first.last {clear: both !important;}
 
44
  .news.first{clear: both !important;}
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  .news-col-1.has-no-date .post-content-text{margin-left:0px; width:100%;}
 
47
  @media all and (max-width: 768px) {
48
- .news-col-3, .news-col-2, .news-col-4{width:100%;}
 
49
  }
50
 
 
 
51
 
 
52
 
53
-
 
 
 
 
 
 
 
 
 
1
+ .news-col-3, .news-col-4, .news-col-2{-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
 
 
2
  .news{margin-bottom:40px !important; clear:both;}
3
+ .news-col-1, .news-col-list{padding-bottom:40px; border-bottom:1px solid #d1d1d1;}
4
+ .news-col-list{padding-bottom:20px;}
5
+ .news .news-title{margin-top:0px !important; margin-bottom:10px !important;}
6
+
7
+ .news .news-title a{font-size:22px; line-height:26px;}
8
+
9
  .news-cat{margin-bottom:10px ;}
10
  .news-content{float:left; width:100%; clear:both;}
11
  .date-post{width: 11%;float: left;text-align: center;}
14
  .date-post p{margin: 0px;text-transform: uppercase;color: #333; text-align:center !important}
15
  .post-content-text{width:87%; margin-left:2%; float:left;}
16
  .news-thumb{float:left; width:100%; margin-bottom:25px;}
 
17
 
18
+ .grid-date-post, .grid-date-post a{font-size:13px; margin-bottom:5px;}
19
+ .widget-date-post, .widget-date-post a{font-size:13px; margin-top:5px;}
20
+
 
 
 
 
 
 
 
 
21
  .news-col-4{width:25%; float:left; clear:none !important; padding:0 15px;}
22
  .news-col-3{width:33%; float:left; clear:none !important; padding:0 15px;}
23
  .news-col-2{width:50%; float:left; clear:none !important; padding:0 15px;}
24
+ .news-col-1, .news-col-list{width:100%; float:left;}
25
 
26
+ .grid-news-thumb{float: left; height: 200px;line-height: 0; overflow: hidden; position: relative; width: 100%;background: #f1f1f1; }
27
+ .grid-news-thumb img{transition: all 0.2s ease-in-out 0s; left: -9999px; margin: 0 auto !important;
28
+ opacity: 1; position: absolute; right: -9999px; width:auto !important; }
29
+
30
+ .news-col-1 .grid-news-thumb{height:400px;}
31
+ .news-col-2 .grid-news-thumb{height: 250px;}
32
+
33
+ .news-col-list .grid-news-thumb img{ max-width:370px !important; width:auto !important}
34
+ .news-col-1 .grid-news-thumb img{ max-width:1100px !important; width:auto !important}
35
+ .news-col-2 .grid-news-thumb img{ max-width:530px !important; width:auto !important}
36
+ .news-col-3 .grid-news-thumb img{ max-width:350px !important; width:auto !important}
37
+ .news-col-4 .grid-news-thumb img{ max-width:300px !important; width:auto !important}
38
 
39
+ .news-col-list .news-thumb{float:left; width:33%;}
40
+ .news-col-list .news-content{float:left; margin-left:2% ; width:65%; clear:none; }.no-thumb.blog-col-0 .blog-content{ margin-left:0 ; width:100%; }
41
+ .news-col-list .news-content .post-content-text{margin-left:0px;}
42
+
43
+ /* widget */
44
  .news_li h6{clear: none !important; margin-bottom:5px !important; margin-top:8px !important; padding-bottom:0px !important; }
45
  .news_li h6 a.post-title{font-size:auto !important; font-size:16px !important;}
46
  .news_li p{padding-bottom:0px !important}
47
+ .news-col-3 .news-thumb, .news-col-2 .news-thumb, .news-col-4 .news-thumb{margin-bottom:10px;}
48
+ .news-col-3 .post-content-text, .news-col-2 .post-content-text, .news-col-4 .post-content-text{width:100%; margin:0px;}
49
+ p.news-short-content{margin-bottom:5px !important}.first.last {clear: both !important;}
50
  .news.first{clear: both !important;}
51
 
52
+
53
+ .recent-news-items .news_li{padding:5px 0 !important; clear:both;}
54
+ .news_li{border-bottom:1px solid #ddd; margin:0 !important; list-style:none !important}
55
+ .newstickerthumb .news_li{float:left; width:100%;}
56
+ .news_thumb_left{display:table-cell; vertical-align:top; }
57
+ .news_thumb_left img{margin-right:10px;}
58
+ .news_thumb_right{display:table-cell; vertical-align:top;}
59
+
60
+ .news_pagination{clear:both; padding:20px 0; float:left; width:100%}
61
+ .button-news-p{width:49%; float:right; text-align:right}
62
+ .button-news-n{width:49%; float:left; text-align:left}
63
+ .recent-news-items{clear:both;}
64
+ .recent-news-items.no_p h6{margin:5px 0 !important;}
65
+ .recent-news-items p{font-size:13px !important; margin-bottom:10px !important}
66
+
67
  .news-col-1.has-no-date .post-content-text{margin-left:0px; width:100%;}
68
+
69
  @media all and (max-width: 768px) {
70
+ .news-col-3, .news-col-4{width:50%;}
71
+ .news.first{clear: none !important;}
72
  }
73
 
74
+ @media all and (max-width: 640px) {
75
+ .news-col-3, .news-col-2, .news-col-4{width:100%;}
76
 
77
+ }
78
 
79
+ @media all and (max-width: 500px) {
80
+
81
+ .news-col-list .news-thumb{float:left; width:100%;}
82
+ .news-col-list .news-content{float:left; margin-left:0% ; width:100%; clear:both; }
83
+ .news-col-1 .grid-news-thumb{height:250px}
84
+ }
85
+
86
+ @media all and (max-width: 400px) {
87
+ .news-col-1 .grid-news-thumb{height:200px}
88
+ }
images/Calendar-Empty-icon.png DELETED
Binary file
images/back.png DELETED
Binary file
images/forword.png DELETED
Binary file
images/newspaper-add-icon.png DELETED
Binary file
images/play.png DELETED
Binary file
images/stop.png DELETED
Binary file
js/jcarousellite.js CHANGED
@@ -1,8 +1 @@
1
- /*!
2
- * jCarouselLite - v1.1 - 2014-09-28
3
- * http://www.gmarwaha.com/jquery/jcarousellite/
4
- * Copyright (c) 2014 Ganeshji Marwaha
5
- * Licensed MIT (https://github.com/ganeshmax/jcarousellite/blob/master/LICENSE)
6
- */
7
-
8
- !function(a){a.jCarouselLite={version:"1.1"},a.fn.jCarouselLite=function(b){return b=a.extend({},a.fn.jCarouselLite.options,b||{}),this.each(function(){function c(a){return n||(clearTimeout(A),z=a,b.beforeStart&&b.beforeStart.call(this,i()),b.circular?j(a):k(a),m({start:function(){n=!0},done:function(){b.afterEnd&&b.afterEnd.call(this,i()),b.auto&&h(),n=!1}}),b.circular||l()),!1}function d(){if(n=!1,o=b.vertical?"top":"left",p=b.vertical?"height":"width",q=B.find(">ul"),r=q.find(">li"),x=r.size(),w=x<b.visible?x:b.visible,b.circular){var c=r.slice(x-w).clone(),d=r.slice(0,w).clone();q.prepend(c).append(d),b.start+=w}s=a("li",q),y=s.size(),z=b.start}function e(){B.css("visibility","visible"),s.css({overflow:"hidden","float":b.vertical?"none":"left"}),q.css({margin:"0",padding:"0",position:"relative","list-style":"none","z-index":"1"}),B.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"}),!b.circular&&b.btnPrev&&0==b.start&&a(b.btnPrev).addClass("disabled")}function f(){t=b.vertical?s.outerHeight(!0):s.outerWidth(!0),u=t*y,v=t*w,s.css({width:s.width(),height:s.height()}),q.css(p,u+"px").css(o,-(z*t)),B.css(p,v+"px")}function g(){b.btnPrev&&a(b.btnPrev).click(function(){return c(z-b.scroll)}),b.btnNext&&a(b.btnNext).click(function(){return c(z+b.scroll)}),b.btnGo&&a.each(b.btnGo,function(d,e){a(e).click(function(){return c(b.circular?w+d:d)})}),b.mouseWheel&&B.mousewheel&&B.mousewheel(function(a,d){return c(d>0?z-b.scroll:z+b.scroll)}),b.auto&&h()}function h(){A=setTimeout(function(){c(z+b.scroll)},b.auto)}function i(){return s.slice(z).slice(0,w)}function j(a){var c;a<=b.start-w-1?(c=a+x+b.scroll,q.css(o,-(c*t)+"px"),z=c-b.scroll):a>=y-w+1&&(c=a-x-b.scroll,q.css(o,-(c*t)+"px"),z=c+b.scroll)}function k(a){0>a?z=0:a>y-w&&(z=y-w)}function l(){a(b.btnPrev+","+b.btnNext).removeClass("disabled"),a(z-b.scroll<0&&b.btnPrev||z+b.scroll>y-w&&b.btnNext||[]).addClass("disabled")}function m(c){n=!0,q.animate("left"==o?{left:-(z*t)}:{top:-(z*t)},a.extend({duration:b.speed,easing:b.easing},c))}var n,o,p,q,r,s,t,u,v,w,x,y,z,A,B=a(this);d(),e(),f(),g()})},a.fn.jCarouselLite.options={btnPrev:null,btnNext:null,btnGo:null,mouseWheel:!1,auto:null,speed:200,easing:null,vertical:!1,circular:!0,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null}}(jQuery);
1
+ /*!
 
 
 
 
 
 
 
js/jquery.newstape.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*--------NEWS Tab JS--------*/
3
+
4
+ (function(d){var n={speed:3000,pause:0,showItems:0,mousePause:!0,height:310,animate:!0,margin:0,padding:0,startPaused:!1},c={moveUp:function(a,b){c.animate(a,b,"up")},moveDown:function(a,b){c.animate(a,b,"down")},animate:function(a,b,e){var c=a.itemHeight,f=a.options,k=a.element,g=k.children("ul"),l="up"===e?"li:first":"li:last";k.trigger("vticker.beforeTick");var m=g.children(l).clone(!0);0<f.height&&(c=g.children("li:first").height());c+=f.margin+2*f.padding;"down"===e&&g.css("top","-"+c+"px").prepend(m);
5
+ if(b&&b.animate){if(a.animating)return;a.animating=!0;g.animate("up"===e?{top:"-="+c+"px"}:{top:0},f.speed,function(){d(g).children(l).remove();d(g).css("top","0px");a.animating=!1;k.trigger("vticker.afterTick")})}else g.children(l).remove(),g.css("top","0px"),k.trigger("vticker.afterTick");"up"===e&&m.appendTo(g)},nextUsePause:function(){var a=d(this).data("state"),b=a.options;a.isPaused||2>a.itemCount||f.next.call(this,{animate:b.animate})},startInterval:function(){var a=d(this).data("state"),b=
6
+ this;a.intervalId=setInterval(function(){c.nextUsePause.call(b)},a.options.pause)},stopInterval:function(){var a=d(this).data("state");a&&(a.intervalId&&clearInterval(a.intervalId),a.intervalId=void 0)},restartInterval:function(){c.stopInterval.call(this);c.startInterval.call(this)}},f={init:function(a){f.stop.call(this);var b=jQuery.extend({},n);a=d.extend(b,a);var b=d(this),e={itemCount:b.children("ul").children("li").length,itemHeight:0,itemMargin:0,element:b,animating:!1,options:a,isPaused:a.startPaused?
7
+ !0:!1,pausedByCode:!1};d(this).data("state",e);b.css({overflow:"hidden",position:"relative"}).children("ul").css({position:"absolute",margin:0,padding:0}).children("li").css({margin:a.margin,padding:a.padding});isNaN(a.height)||0===a.height?(b.children("ul").children("li").each(function(){var a=d(this);a.height()>e.itemHeight&&(e.itemHeight=a.height())}),b.children("ul").children("li").each(function(){d(this).height(e.itemHeight)}),b.height((e.itemHeight+(a.margin+2*a.padding))*a.showItems+a.margin)):
8
+ b.height(a.height);var h=this;a.startPaused||c.startInterval.call(h);a.mousePause&&b.bind("mouseenter",function(){!0!==e.isPaused&&(e.pausedByCode=!0,c.stopInterval.call(h),f.pause.call(h,!0))}).bind("mouseleave",function(){if(!0!==e.isPaused||e.pausedByCode)e.pausedByCode=!1,f.pause.call(h,!1),c.startInterval.call(h)})},pause:function(a){var b=d(this).data("state");if(b){if(2>b.itemCount)return!1;b.isPaused=a;b=b.element;a?(d(this).addClass("paused"),b.trigger("vticker.pause")):(d(this).removeClass("paused"),
9
+ b.trigger("vticker.resume"))}},next:function(a){var b=d(this).data("state");if(b){if(b.animating||2>b.itemCount)return!1;c.restartInterval.call(this);c.moveUp(b,a)}},prev:function(a){var b=d(this).data("state");if(b){if(b.animating||2>b.itemCount)return!1;c.restartInterval.call(this);c.moveDown(b,a)}},stop:function(){d(this).data("state")&&c.stopInterval.call(this)},remove:function(){var a=d(this).data("state");a&&(c.stopInterval.call(this),a=a.element,a.unbind(),a.remove())}};d.fn.vTicker=function(a){if(f[a])return f[a].apply(this,
10
+ Array.prototype.slice.call(arguments,1));if("object"!==typeof a&&a)d.error("Method "+a+" does not exist on jQuery.vTicker");else return f.init.apply(this,arguments)}})(jQuery);
11
+
12
+ /*--------END NEWS Tab JS--------*/
languages/sp-news-and-widget-de_DE.mo ADDED
Binary file
languages/sp-news-and-widget-de_DE.po ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Development (trunk) in German
2
+ # This file is distributed under the same license as the Development (trunk) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2016-01-05 17:15+0530\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: Poedit 1.8.6\n"
11
+ "Project-Id-Version: Development (trunk)\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: de_DE\n"
16
+
17
+ #: sp-news-and-widget.php:91 sp-news-and-widget.php:92
18
+ msgctxt "sp-news-and-widget"
19
+ msgid "Category"
20
+ msgstr ""
21
+
22
+ #: widget_function.php:176
23
+ msgid "Pause:"
24
+ msgstr "Pause:"
25
+
26
+ #: widget_function.php:180
27
+ msgid "Speed:"
28
+ msgstr ""
29
+
30
+ #: widget_function.php:297
31
+ msgid "Displayed Latest News Items in a sidebar with thumbnails"
32
+ msgstr ""
33
+
34
+ #: widget_function.php:299
35
+ msgid "Latest News with thumb"
36
+ msgstr ""
37
+
38
+ #. Plugin Name of the plugin/theme
39
+ msgid "WP News and three widgets(static, scrolling and with thumbs)"
40
+ msgstr ""
41
+
42
+ #. Description of the plugin/theme
43
+ msgid "A simple News and three widgets(static, scrolling and with thumbs) plugin"
44
+ msgstr ""
45
+
46
+ #. Author of the plugin/theme
47
+ msgid "WP Online Support"
48
+ msgstr ""
49
+
50
+ #. Author URI of the plugin/theme
51
+ msgid "http://www.wponlinesupport.com/"
52
+ msgstr ""
53
+
54
+ #: widget_function.php:134
55
+ msgid "Scroll Latest News Items from the News in a sidebar"
56
+ msgstr ""
57
+
58
+ #: widget_function.php:136
59
+ msgid "Latest News Scrolling Widget"
60
+ msgstr ""
61
+
62
+ #: widget_function.php:172
63
+ msgid "Height:"
64
+ msgstr "Höhe:"
65
+
66
+ #: widget_function.php:24 widget_function.php:155 widget_function.php:316
67
+ msgid "Number of Items: "
68
+ msgstr ""
69
+
70
+ #: widget_function.php:27 widget_function.php:158 widget_function.php:319
71
+ msgid "Display Date"
72
+ msgstr "Anzeigedatum"
73
+
74
+ #: widget_function.php:31 widget_function.php:162 widget_function.php:323
75
+ msgid "Display Category"
76
+ msgstr ""
77
+
78
+ #: widget_function.php:34 widget_function.php:165 widget_function.php:326
79
+ msgid "Category:"
80
+ msgstr "Kategorie:"
81
+
82
+ #: widget_function.php:36 widget_function.php:167 widget_function.php:328
83
+ msgid "All"
84
+ msgstr "Alles"
85
+
86
+ #: widget_function.php:5
87
+ msgid "Displayed Latest News Items from the News in a sidebar"
88
+ msgstr ""
89
+
90
+ #: widget_function.php:7
91
+ msgid "Latest News Widget"
92
+ msgstr ""
93
+
94
+ #: widget_function.php:23 widget_function.php:154 widget_function.php:315
95
+ msgid "Title:"
96
+ msgstr "Überschrift:"
97
+
98
+ #: sp-news-and-widget.php:332
99
+ msgid "Posts"
100
+ msgstr "Beiträgen"
101
+
102
+ #: sp-news-and-widget.php:330
103
+ msgid "News Category Shortcode"
104
+ msgstr ""
105
+
106
+ #: sp-news-and-widget.php:331
107
+ msgid "Slug"
108
+ msgstr "URL-Anpassung"
109
+
110
+ #: sp-news-and-widget.php:329
111
+ msgid "Name"
112
+ msgstr "Name"
113
+
114
+ #: sp-news-and-widget.php:101
115
+ msgid "News Category"
116
+ msgstr ""
117
+
118
+ #: sp-news-and-widget.php:278
119
+ msgid "Read More"
120
+ msgstr "Lesen Sie weiter"
121
+
122
+ #: sp-news-and-widget.php:100
123
+ msgid "New Category Name"
124
+ msgstr "Neuer Kategorie Name"
125
+
126
+ #: sp-news-and-widget.php:99
127
+ msgid "Add New Category"
128
+ msgstr "Terminkategorie hinzufügen"
129
+
130
+ #: sp-news-and-widget.php:98
131
+ msgid "Update Category"
132
+ msgstr "Aktualisiere Kategorie"
133
+
134
+ #: sp-news-and-widget.php:96
135
+ msgid "Parent Category:"
136
+ msgstr "Eltern Kategorie:"
137
+
138
+ #: sp-news-and-widget.php:97
139
+ msgid "Edit Category"
140
+ msgstr "Bearbeite Kategorie"
141
+
142
+ #: sp-news-and-widget.php:93
143
+ msgid "Search Category"
144
+ msgstr ""
145
+
146
+ #: sp-news-and-widget.php:94
147
+ msgid "All Category"
148
+ msgstr ""
149
+
150
+ #: sp-news-and-widget.php:95
151
+ msgid "Parent Category"
152
+ msgstr "Eltern Kategorie"
153
+
154
+ #: sp-news-and-widget.php:51
155
+ msgctxt "sp-news-and-widget"
156
+ msgid "News"
157
+ msgstr ""
158
+
159
+ #: sp-news-and-widget.php:52
160
+ msgctxt "sp-news-and-widget"
161
+ msgid "news"
162
+ msgstr ""
163
+
164
+ #: sp-news-and-widget.php:53
165
+ msgctxt "sp-news-and-widget"
166
+ msgid "Add News Item"
167
+ msgstr ""
168
+
169
+ #: sp-news-and-widget.php:54
170
+ msgid "Add New News Item"
171
+ msgstr ""
172
+
173
+ #: sp-news-and-widget.php:55
174
+ msgid "Edit News Item"
175
+ msgstr ""
176
+
177
+ #: sp-news-and-widget.php:56
178
+ msgid "New News Item"
179
+ msgstr ""
180
+
181
+ #: sp-news-and-widget.php:57
182
+ msgid "View News Item"
183
+ msgstr ""
184
+
185
+ #: sp-news-and-widget.php:58
186
+ msgid "Search News Items"
187
+ msgstr ""
188
+
189
+ #: sp-news-and-widget.php:59
190
+ msgid "No News Items found"
191
+ msgstr ""
192
+
193
+ #: sp-news-and-widget.php:60
194
+ msgid "No News Items found in Trash"
195
+ msgstr ""
196
+
197
+ #: sp-news-and-widget.php:63
198
+ msgctxt "admin menu"
199
+ msgid "News"
200
+ msgstr ""
languages/sp-news-and-widget-fr_FR.mo ADDED
Binary file
languages/sp-news-and-widget-fr_FR.po ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Development (trunk) in French (France)
2
+ # This file is distributed under the same license as the Development (trunk) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2016-01-05 17:15+0530\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n > 1;\n"
10
+ "X-Generator: Poedit 1.8.6\n"
11
+ "Project-Id-Version: Development (trunk)\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: fr_FR\n"
16
+
17
+ #: sp-news-and-widget.php:91 sp-news-and-widget.php:92
18
+ msgctxt "sp-news-and-widget"
19
+ msgid "Category"
20
+ msgstr ""
21
+
22
+ #: widget_function.php:176
23
+ msgid "Pause:"
24
+ msgstr "Pause :"
25
+
26
+ #: widget_function.php:180
27
+ msgid "Speed:"
28
+ msgstr ""
29
+
30
+ #: widget_function.php:297
31
+ msgid "Displayed Latest News Items in a sidebar with thumbnails"
32
+ msgstr ""
33
+
34
+ #: widget_function.php:299
35
+ msgid "Latest News with thumb"
36
+ msgstr ""
37
+
38
+ #. Plugin Name of the plugin/theme
39
+ msgid "WP News and three widgets(static, scrolling and with thumbs)"
40
+ msgstr ""
41
+
42
+ #. Description of the plugin/theme
43
+ msgid "A simple News and three widgets(static, scrolling and with thumbs) plugin"
44
+ msgstr ""
45
+
46
+ #. Author of the plugin/theme
47
+ msgid "WP Online Support"
48
+ msgstr ""
49
+
50
+ #. Author URI of the plugin/theme
51
+ msgid "http://www.wponlinesupport.com/"
52
+ msgstr ""
53
+
54
+ #: widget_function.php:134
55
+ msgid "Scroll Latest News Items from the News in a sidebar"
56
+ msgstr ""
57
+
58
+ #: widget_function.php:136
59
+ msgid "Latest News Scrolling Widget"
60
+ msgstr ""
61
+
62
+ #: widget_function.php:172
63
+ msgid "Height:"
64
+ msgstr "Hauteur&nbsp;:"
65
+
66
+ #: widget_function.php:24 widget_function.php:155 widget_function.php:316
67
+ msgid "Number of Items: "
68
+ msgstr ""
69
+
70
+ #: widget_function.php:27 widget_function.php:158 widget_function.php:319
71
+ msgid "Display Date"
72
+ msgstr "Affichage de la date"
73
+
74
+ #: widget_function.php:31 widget_function.php:162 widget_function.php:323
75
+ msgid "Display Category"
76
+ msgstr ""
77
+
78
+ #: widget_function.php:34 widget_function.php:165 widget_function.php:326
79
+ msgid "Category:"
80
+ msgstr "Catégories :"
81
+
82
+ #: widget_function.php:36 widget_function.php:167 widget_function.php:328
83
+ msgid "All"
84
+ msgstr "Historique complet"
85
+
86
+ #: widget_function.php:5
87
+ msgid "Displayed Latest News Items from the News in a sidebar"
88
+ msgstr ""
89
+
90
+ #: widget_function.php:7
91
+ msgid "Latest News Widget"
92
+ msgstr ""
93
+
94
+ #: widget_function.php:23 widget_function.php:154 widget_function.php:315
95
+ msgid "Title:"
96
+ msgstr "Titre:"
97
+
98
+ #: sp-news-and-widget.php:332
99
+ msgid "Posts"
100
+ msgstr "Billets"
101
+
102
+ #: sp-news-and-widget.php:330
103
+ msgid "News Category Shortcode"
104
+ msgstr ""
105
+
106
+ #: sp-news-and-widget.php:331
107
+ msgid "Slug"
108
+ msgstr "Code&nbsp;"
109
+
110
+ #: sp-news-and-widget.php:329
111
+ msgid "Name"
112
+ msgstr " Nom"
113
+
114
+ #: sp-news-and-widget.php:101
115
+ msgid "News Category"
116
+ msgstr ""
117
+
118
+ #: sp-news-and-widget.php:278
119
+ msgid "Read More"
120
+ msgstr "En savoir plus"
121
+
122
+ #: sp-news-and-widget.php:100
123
+ msgid "New Category Name"
124
+ msgstr "Nom Catégorie"
125
+
126
+ #: sp-news-and-widget.php:99
127
+ msgid "Add New Category"
128
+ msgstr "Ajouter Catégorie"
129
+
130
+ #: sp-news-and-widget.php:98
131
+ msgid "Update Category"
132
+ msgstr "Mettre à jour la catégorie"
133
+
134
+ #: sp-news-and-widget.php:96
135
+ msgid "Parent Category:"
136
+ msgstr "Catégorie parente :"
137
+
138
+ #: sp-news-and-widget.php:97
139
+ msgid "Edit Category"
140
+ msgstr "Modifier Catégorie"
141
+
142
+ #: sp-news-and-widget.php:93
143
+ msgid "Search Category"
144
+ msgstr "Chercher la catégorie"
145
+
146
+ #: sp-news-and-widget.php:94
147
+ msgid "All Category"
148
+ msgstr ""
149
+
150
+ #: sp-news-and-widget.php:95
151
+ msgid "Parent Category"
152
+ msgstr "Catégorie parente"
153
+
154
+ #: sp-news-and-widget.php:51
155
+ msgctxt "sp-news-and-widget"
156
+ msgid "News"
157
+ msgstr ""
158
+
159
+ #: sp-news-and-widget.php:52
160
+ msgctxt "sp-news-and-widget"
161
+ msgid "news"
162
+ msgstr ""
163
+
164
+ #: sp-news-and-widget.php:53
165
+ msgctxt "sp-news-and-widget"
166
+ msgid "Add News Item"
167
+ msgstr ""
168
+
169
+ #: sp-news-and-widget.php:54
170
+ msgid "Add New News Item"
171
+ msgstr ""
172
+
173
+ #: sp-news-and-widget.php:55
174
+ msgid "Edit News Item"
175
+ msgstr ""
176
+
177
+ #: sp-news-and-widget.php:56
178
+ msgid "New News Item"
179
+ msgstr ""
180
+
181
+ #: sp-news-and-widget.php:57
182
+ msgid "View News Item"
183
+ msgstr ""
184
+
185
+ #: sp-news-and-widget.php:58
186
+ msgid "Search News Items"
187
+ msgstr ""
188
+
189
+ #: sp-news-and-widget.php:59
190
+ msgid "No News Items found"
191
+ msgstr ""
192
+
193
+ #: sp-news-and-widget.php:60
194
+ msgid "No News Items found in Trash"
195
+ msgstr ""
196
+
197
+ #: sp-news-and-widget.php:63
198
+ msgctxt "admin menu"
199
+ msgid "News"
200
+ msgstr ""
languages/sp-news-and-widget-pl_PL.mo ADDED
Binary file
languages/sp-news-and-widget-pl_PL.po ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of Development (trunk) in Polish
2
+ # This file is distributed under the same license as the Development (trunk) package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2016-01-05 17:15+0530\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
10
+ "X-Generator: Poedit 1.8.6\n"
11
+ "Project-Id-Version: Development (trunk)\n"
12
+ "POT-Creation-Date: \n"
13
+ "Last-Translator: \n"
14
+ "Language-Team: \n"
15
+ "Language: pl_PL\n"
16
+
17
+ #: sp-news-and-widget.php:91 sp-news-and-widget.php:92
18
+ msgctxt "sp-news-and-widget"
19
+ msgid "Category"
20
+ msgstr ""
21
+
22
+ #: widget_function.php:176
23
+ msgid "Pause:"
24
+ msgstr "Wstrzymaj:"
25
+
26
+ #: widget_function.php:180
27
+ msgid "Speed:"
28
+ msgstr "Prędkość obrotowa:"
29
+
30
+ #: widget_function.php:297
31
+ msgid "Displayed Latest News Items in a sidebar with thumbnails"
32
+ msgstr ""
33
+
34
+ #: widget_function.php:299
35
+ msgid "Latest News with thumb"
36
+ msgstr ""
37
+
38
+ #. Plugin Name of the plugin/theme
39
+ msgid "WP News and three widgets(static, scrolling and with thumbs)"
40
+ msgstr ""
41
+
42
+ #. Description of the plugin/theme
43
+ msgid "A simple News and three widgets(static, scrolling and with thumbs) plugin"
44
+ msgstr ""
45
+
46
+ #. Author of the plugin/theme
47
+ msgid "WP Online Support"
48
+ msgstr ""
49
+
50
+ #. Author URI of the plugin/theme
51
+ msgid "http://www.wponlinesupport.com/"
52
+ msgstr ""
53
+
54
+ #: widget_function.php:134
55
+ msgid "Scroll Latest News Items from the News in a sidebar"
56
+ msgstr ""
57
+
58
+ #: widget_function.php:136
59
+ msgid "Latest News Scrolling Widget"
60
+ msgstr ""
61
+
62
+ #: widget_function.php:172
63
+ msgid "Height:"
64
+ msgstr "wysokość:"
65
+
66
+ #: widget_function.php:24 widget_function.php:155 widget_function.php:316
67
+ msgid "Number of Items: "
68
+ msgstr ""
69
+
70
+ #: widget_function.php:27 widget_function.php:158 widget_function.php:319
71
+ msgid "Display Date"
72
+ msgstr "Wyświetl datę wpisu"
73
+
74
+ #: widget_function.php:31 widget_function.php:162 widget_function.php:323
75
+ msgid "Display Category"
76
+ msgstr "Wyświetlić kategorię?"
77
+
78
+ #: widget_function.php:34 widget_function.php:165 widget_function.php:326
79
+ msgid "Category:"
80
+ msgstr "Kategoria: "
81
+
82
+ #: widget_function.php:36 widget_function.php:167 widget_function.php:328
83
+ msgid "All"
84
+ msgstr "Wszystkie"
85
+
86
+ #: widget_function.php:5
87
+ msgid "Displayed Latest News Items from the News in a sidebar"
88
+ msgstr ""
89
+
90
+ #: widget_function.php:7
91
+ msgid "Latest News Widget"
92
+ msgstr ""
93
+
94
+ #: widget_function.php:23 widget_function.php:154 widget_function.php:315
95
+ msgid "Title:"
96
+ msgstr "Tytuł:"
97
+
98
+ #: sp-news-and-widget.php:332
99
+ msgid "Posts"
100
+ msgstr "Posty"
101
+
102
+ #: sp-news-and-widget.php:330
103
+ msgid "News Category Shortcode"
104
+ msgstr ""
105
+
106
+ #: sp-news-and-widget.php:331
107
+ msgid "Slug"
108
+ msgstr "Uproszczona nazwa"
109
+
110
+ #: sp-news-and-widget.php:329
111
+ msgid "Name"
112
+ msgstr "Nazwisko i imiona"
113
+
114
+ #: sp-news-and-widget.php:101
115
+ msgid "News Category"
116
+ msgstr ""
117
+
118
+ #: sp-news-and-widget.php:278
119
+ msgid "Read More"
120
+ msgstr "Czytaj więcej"
121
+
122
+ #: sp-news-and-widget.php:100
123
+ msgid "New Category Name"
124
+ msgstr "Nazwa nowej kategorii"
125
+
126
+ #: sp-news-and-widget.php:99
127
+ msgid "Add New Category"
128
+ msgstr "Dodaj nową kategorię"
129
+
130
+ #: sp-news-and-widget.php:98
131
+ msgid "Update Category"
132
+ msgstr "Uaktualnij kategorię"
133
+
134
+ #: sp-news-and-widget.php:96
135
+ msgid "Parent Category:"
136
+ msgstr "Kategoria nadrzędna"
137
+
138
+ #: sp-news-and-widget.php:97
139
+ msgid "Edit Category"
140
+ msgstr "Edytuj kategorię"
141
+
142
+ #: sp-news-and-widget.php:93
143
+ msgid "Search Category"
144
+ msgstr ""
145
+
146
+ #: sp-news-and-widget.php:94
147
+ msgid "All Category"
148
+ msgstr ""
149
+
150
+ #: sp-news-and-widget.php:95
151
+ msgid "Parent Category"
152
+ msgstr "Kategoria nadrzędna"
153
+
154
+ #: sp-news-and-widget.php:51
155
+ msgctxt "sp-news-and-widget"
156
+ msgid "News"
157
+ msgstr ""
158
+
159
+ #: sp-news-and-widget.php:52
160
+ msgctxt "sp-news-and-widget"
161
+ msgid "news"
162
+ msgstr ""
163
+
164
+ #: sp-news-and-widget.php:53
165
+ msgctxt "sp-news-and-widget"
166
+ msgid "Add News Item"
167
+ msgstr ""
168
+
169
+ #: sp-news-and-widget.php:54
170
+ msgid "Add New News Item"
171
+ msgstr ""
172
+
173
+ #: sp-news-and-widget.php:55
174
+ msgid "Edit News Item"
175
+ msgstr ""
176
+
177
+ #: sp-news-and-widget.php:56
178
+ msgid "New News Item"
179
+ msgstr ""
180
+
181
+ #: sp-news-and-widget.php:57
182
+ msgid "View News Item"
183
+ msgstr ""
184
+
185
+ #: sp-news-and-widget.php:58
186
+ msgid "Search News Items"
187
+ msgstr ""
188
+
189
+ #: sp-news-and-widget.php:59
190
+ msgid "No News Items found"
191
+ msgstr ""
192
+
193
+ #: sp-news-and-widget.php:60
194
+ msgid "No News Items found in Trash"
195
+ msgstr ""
196
+
197
+ #: sp-news-and-widget.php:63
198
+ msgctxt "admin menu"
199
+ msgid "News"
200
+ msgstr ""
news_menu_function.php CHANGED
@@ -7,78 +7,76 @@ function free_register_newsdesigns_submenu_page() {
7
  }
8
 
9
  function free_newsdesigns_page_callback() {
 
 
 
 
 
 
 
 
10
 
11
- $result ='<div class="wrap"><div id="icon-tools" class="icon32"></div><h2 style="padding:15px 0">Pro News Designs</h2></div>
12
- <a href="http://wponlinesupport.com/sp_plugin/sp-news-and-scrolling-widgets/" target="_blank"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/News_banner.png"></a>
13
- <div class="medium-12 columns"><h3>News Slider/Carousel</h3>
14
- <p><b>Complete shortcode is:</b><br /><code>[sp_news_slider design="design-1" slides_column="1" slides_scroll="1" dots="true" arrows="true" autoplay="true" autoplay_interval="3000" speed="300"
15
- loop="true" limit="5" category="5" category_name="Sports" show_read_more="false" show_date="true" show_category_name="true" show_content="true" content_words_limit="20"]</code></div>
16
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-1.jpg"><p><code>[sp_news_slider design="design-1" slides_column="1"]</code></p></div></div>
17
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-2.jpg"><p><code>[sp_news_slider design="design-2" slides_column="1"]</code></p></div></div>
18
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-3.jpg"><p><code>[sp_news_slider design="design-3" slides_column="1"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
19
- <div class="medium-3 columns" ><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-4.jpg"><p><code>[sp_news_slider design="design-4" slides_column="1"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
20
- <div class="medium-3 columns" style="clear:both"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-5.jpg"><p><code>[sp_news_slider design="design-5" slides_column="1"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
21
- <div class="medium-3 columns" ><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-7.jpg"><p><code>[sp_news_slider design="design-7" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</p></div></div>
22
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-8.jpg"><p><code>[sp_news_slider design="design-8" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
23
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-9.jpg"><p><code>[sp_news_slider design="design-9" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
24
- <div class="medium-3 columns" style="clear:both"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-10.jpg"><p><code>[sp_news_slider design="design-10" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
25
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-11.jpg"><p><code>[sp_news_slider design="design-11" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
26
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-12.jpg"><p><code>[sp_news_slider design="design-12" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
27
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-13.jpg"><p><code>[sp_news_slider design="design-13" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
28
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-14.jpg"><p><code>[sp_news_slider design="design-14" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
29
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-15.jpg"><p><code>[sp_news_slider design="design-15" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
30
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-32.jpg"><p><code>[sp_news_slider design="design-32" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
31
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-33.jpg"><p><code>[sp_news_slider design="design-33" slides_column="3"]</code></p>Where slides_column is 1,2,3,4 etc</div></div>
32
-
33
- <div class="medium-12 columns"><h3>News Grid View and Block View</h3>
34
- <a href="http://wponlinesupport.com/sp_plugin/sp-news-and-scrolling-widgets/" target="_blank"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/News_banner.png"></a>
35
- <p><b>Complete shortcode is:</b><br /><code>[sp_news design="design-16" limit="5" grid="2" category="5" category_name="Sports" pagination="true" show_date="true"
36
- show_category_name="true" show_content="true" show_full_content="true" content_words_limit="20" show_read_more="false"]</code></div>
37
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-16.jpg"><p><code>[sp_news design="design-16" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
38
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-17.jpg"><p><code>[sp_news design="design-17" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
39
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-18.jpg"><p><code>[sp_news design="design-18" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
40
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-19.jpg"><p><code>[sp_news design="design-19" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
41
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-20.jpg"><p><code>[sp_news design="design-20" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
42
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-21.jpg"><p><code>[sp_news design="design-21" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
43
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-22.jpg"><p><code>[sp_news design="design-22" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
44
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-23.jpg"><p><code>[sp_news design="design-23" limit="3" pagination="false"]</code></p>Use same paramater as given</div></div>
45
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-24.jpg"><p><code>[sp_news design="design-24"]</code></p>Only List View</div></div>
46
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-25.jpg"><p><code>[sp_news design="design-25" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
47
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-26.jpg"><p><code>[sp_news design="design-26"]</code></p>Only List View</div></div>
48
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-27.jpg"><p><code>[sp_news design="design-27"]</code></p>Only List View</div></div>
49
- <div class="medium-3 columns" style="clear:both"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-28.jpg"><p><code>[sp_news design="design-28" limit="4" pagination="false"]</code></p>Use same paramater as given</div></div>
50
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-29.jpg"><p><code>[sp_news design="design-29" limit="4" pagination="false"]</code></p>Use same paramater as given</div></div>
51
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-31.jpg"><p><code>[sp_news design="design-31" limit="4" pagination="false"]</code></p>Use same paramater as given</div></div>
52
- <div class="medium-3 columns"><div class="postdesigns"><img src="'.plugin_dir_url( __FILE__ ).'pro-designs/news-design-34.jpg"><p><code>[sp_news design="design-34" grid="2"]</code></p>Where grid is 1,2,3,4 etc</div></div>
53
- <div class="medium-12 columns"><h2>Check the demo</h2>
54
- <p><strong>Check Demo Link</strong> <a href="http://demo.wponlinesupport.com/prodemo/news-plugin-pro/" target="_blank">Pro WP News and Widget Plugin</a></div></div>';
55
 
56
- echo $result;
 
 
57
  }
58
- function free_newsdesign_admin_style(){
59
- ?>
60
- <style type="text/css">
61
- .postdesigns{-moz-box-shadow: 0 0 5px #ddd;-webkit-box-shadow: 0 0 5px#ddd;box-shadow: 0 0 5px #ddd; background:#fff; padding:10px; margin-bottom:15px;}
62
- .column, .columns {-webkit-box-sizing: border-box;-moz-box-sizing: border-box; box-sizing: border-box;}
63
- .postdesigns img{width:100%; height:auto;}
64
- @media only screen and (min-width: 40.0625em) {
65
- .column,
66
- .columns {position: relative;padding-left:10px;padding-right:10px;float: left; }
67
- .medium-1 { width: 8.33333%; }
68
- .medium-2 { width: 16.66667%; }
69
- .medium-3 { width: 25%; }
70
- .medium-4 { width: 33.33333%; }
71
- .medium-5 { width: 41.66667%; }
72
- .medium-6 { width: 50%; }
73
- .medium-7 { width: 58.33333%; }
74
- .medium-8 { width: 66.66667%; }
75
- .medium-9 { width: 75%; }
76
- .medium-10 { width: 83.33333%; }
77
- .medium-11 { width: 91.66667%; }
78
- .medium-12 { width: 100%; }
79
 
80
- }
81
- </style>
82
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
- add_action('admin_head', 'free_newsdesign_admin_style');
 
 
 
 
 
 
 
 
 
 
7
  }
8
 
9
  function free_newsdesigns_page_callback() {
10
+ $wpnw_feed_tabs = array(
11
+ 'design-feed' => __('Plugin Designs', 'sp-news-and-widget'),
12
+ 'plugins-feed' => __('Our Plugins', 'sp-news-and-widget')
13
+ );
14
+
15
+
16
+ $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'design-feed';
17
+ ?>
18
 
19
+ <div class="wrap wpnw-wrap">
20
+
21
+ <h2 class="nav-tab-wrapper">
22
+ <?php
23
+ foreach ($wpnw_feed_tabs as $tab_key => $tab_val) {
24
+
25
+ $active_cls = ($tab_key == $active_tab) ? 'nav-tab-active' : '';
26
+ $tab_link = add_query_arg( array('post_type' => WPNW_POST_TYPE, 'page' => 'newsdesigns-submenu-page', 'tab' => $tab_key), admin_url('edit.php') );
27
+ ?>
28
+
29
+ <a class="nav-tab <?php echo $active_cls; ?>" href="<?php echo $tab_link; ?>"><?php echo $tab_val; ?></a>
30
+
31
+ <?php } ?>
32
+ </h2>
33
+
34
+ <div class="wpnw-tab-cnt-wrp">
35
+ <?php
36
+ if( isset($_GET['tab']) && $_GET['tab'] == 'plugins-feed' ) {
37
+ echo wpnw_get_design( 'plugins-feed' );
38
+ } else {
39
+ echo wpnw_get_design();
40
+ }
41
+ ?>
42
+ </div><!-- end .wpnw-tab-cnt-wrp -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
+ </div><!-- end .wpnw-wrap -->
45
+
46
+ <?php
47
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
+ /**
50
+ * Gets the plugin design part feed
51
+ *
52
+ * @package WP News and three widgets
53
+ * @since 3.2.6
54
+ */
55
+ function wpnw_get_design( $feed_type = '' ) {
56
+
57
+ $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'design-feed';
58
+
59
+ $cache = get_transient( 'wpnw_' . $active_tab );
60
+
61
+ if ( false === $cache ) {
62
+
63
+ // Feed URL
64
+ if( $feed_type == 'plugins-feed' ) {
65
+ $url = 'http://wponlinesupport.com/plugin-data-api/plugins-data.php';
66
+ } else {
67
+ $url = 'http://wponlinesupport.com/plugin-data-api/wp-news-and-widget/wp-news-and-widget.php';
68
+ }
69
+
70
+ $feed = wp_remote_get( esc_url_raw( $url ), array( 'timeout' => 120, 'sslverify' => false ) );
71
 
72
+ if ( ! is_wp_error( $feed ) ) {
73
+ if ( isset( $feed['body'] ) && strlen( $feed['body'] ) > 0 ) {
74
+ $cache = wp_remote_retrieve_body( $feed );
75
+ set_transient( 'wpnw_' . $active_tab, $cache, 172800 );
76
+ }
77
+ } else {
78
+ $cache = '<div class="error"><p>' . __( 'There was an error retrieving the data from the server. Please try again later.', 'sp-news-and-widget' ) . '</div>';
79
+ }
80
+ }
81
+ return $cache;
82
+ }
pro-designs/News_banner.png DELETED
Binary file
pro-designs/news-design-1.jpg DELETED
Binary file
pro-designs/news-design-10.jpg DELETED
Binary file
pro-designs/news-design-11.jpg DELETED
Binary file
pro-designs/news-design-12.jpg DELETED
Binary file
pro-designs/news-design-13.jpg DELETED
Binary file
pro-designs/news-design-14.jpg DELETED
Binary file
pro-designs/news-design-15.jpg DELETED
Binary file
pro-designs/news-design-16.jpg DELETED
Binary file
pro-designs/news-design-17.jpg DELETED
Binary file
pro-designs/news-design-18.jpg DELETED
Binary file
pro-designs/news-design-19.jpg DELETED
Binary file
pro-designs/news-design-2.jpg DELETED
Binary file
pro-designs/news-design-20.jpg DELETED
Binary file
pro-designs/news-design-21.jpg DELETED
Binary file
pro-designs/news-design-22.jpg DELETED
Binary file
pro-designs/news-design-23.jpg DELETED
Binary file
pro-designs/news-design-24.jpg DELETED
Binary file
pro-designs/news-design-25.jpg DELETED
Binary file
pro-designs/news-design-26.jpg DELETED
Binary file
pro-designs/news-design-27.jpg DELETED
Binary file
pro-designs/news-design-28.jpg DELETED
Binary file
pro-designs/news-design-29.jpg DELETED
Binary file
pro-designs/news-design-3.jpg DELETED
Binary file
pro-designs/news-design-31.jpg DELETED
Binary file
pro-designs/news-design-32.jpg DELETED
Binary file
pro-designs/news-design-33.jpg DELETED
Binary file
pro-designs/news-design-34.jpg DELETED
Binary file
pro-designs/news-design-4.jpg DELETED
Binary file
pro-designs/news-design-5.jpg DELETED
Binary file
pro-designs/news-design-7.jpg DELETED
Binary file
pro-designs/news-design-8.jpg DELETED
Binary file
pro-designs/news-design-9.jpg DELETED
Binary file
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: wponlinesupport, anoopranawat
3
  Tags: wordpress news plugin, main news page scrolling , wordpress vertical news plugin widget, wordpress horizontal news plugin widget , Free scrolling news wordpress plugin, Free scrolling news widget wordpress plugin, WordPress set post or page as news, WordPress dynamic news, news, latest news, custom post type, cpt, widget, vertical news scrolling widget, news widget
4
  Requires at least: 3.1
5
- Tested up to: 4.4
6
  Author URI: http://wponlinesupport.com
7
  Stable tag: trunk
8
  License: GPLv2 or later
@@ -12,16 +12,13 @@ A quick, easy way to add an News custom post type, News widget, vertical scrolli
12
 
13
  == Description ==
14
 
15
- Every CMS site needs a news section. SP News allows you add, manage and display news, date archives, widget, vertical and horizontal news scrolling widget on your website.
16
 
17
- View [DEMO](http://wponlinesupport.com/sp_plugin/sp-news-and-scrolling-widgets/) for additional information.
18
 
19
- View [PRO DEMO and Features](http://wponlinesupport.com/sp_plugin/sp-news-and-scrolling-widgets/) for additional information.
20
 
21
- View [screenshots](http://wordpress.org/plugins/sp-news-and-widget/screenshots/) for additional information.
22
-
23
- = Installation help and support =
24
- * Please check [Installation and Document ](http://wponlinesupport.com/sp_plugin/sp-news-and-scrolling-widgets/) on our website.
25
 
26
  = Important Note For How to Install =
27
  * Please make sure that Permalink link should not be "/news" Otherwise all your news will go to archive page. You can give it other name like "/ournews, /latestnews etc"
@@ -34,75 +31,79 @@ View [screenshots](http://wordpress.org/plugins/sp-news-and-widget/screenshots/)
34
  * Also you can Display the news post with Multiple categories wise
35
  <code> Sports news :
36
  [sp_news category="category_id"]
37
-
38
  Arts news
39
  [sp_news category="category_id"]
40
  </code>
41
-
42
  * **Complete shortcode example:**
43
  <code>[sp_news limit="10" category="category_id" grid="2"
44
  show_content="true" show_full_content="true" show_category_name="true"
45
  show_date="false" content_words_limit="30" ]</code>
46
-
47
  * Comments for the news
48
-
49
  * Added Widget Options like Show News date, Show News Categories, Select News Categories.
 
 
 
50
 
51
  = Following are News Parameters: =
52
 
53
  * **limit :** [sp_news limit="10"] (Display latest 10 news and then pagination).
54
  * **category :** [sp_news category="category_id"] (Display News categories wise).
55
- * **grid :** [sp_news grid="2"] (Display News in Grid formats).
56
  * **show_date :** [sp_news show_date="false"] (Display News date OR not. By default value is "True". Options are "ture OR false")
57
  * **show_content :** [sp_news show_content="true" ] (Display News Short content OR not. By default value is "True". Options are "ture OR false").
58
  * **show_full_content :** [sp_news show_full_content="true"] (Display Full news content on main page if you do not want word limit. By default value is "false")
59
  * **show_category_name :** [sp_news show_category_name="true" ] (Display News category name OR not. By default value is "True". Options are "ture OR false").
60
  * **content_words_limit :** [sp_news content_words_limit="30" ] (Control News short content Words limt. By default limit is 20 words).
61
 
62
-
63
- This plugin add a News custom post type, News widget, vertical and horizontal news scrolling widget( With setting page 'setting -> News Widget Setting') to your Wordpress site.
64
-
65
  The plugin adds a News tab to your admin menu, which allows you to enter news items just as you would regular posts.
66
 
67
  If you are getting any kind of problum with news page means your are not able to see all news items then please remodify your permalinks Structure for example
68
  first select "Default" and save then again select "Custom Structure " and save.
69
 
 
 
70
 
71
  = Added New Features : =
 
 
 
72
  * Added Widget Options like Show News date, Show News Categories, Select News Categories.
73
- * Shortcode <code> [sp_news] </code> for news page.
74
  * Category wise News <code> Sports news [sp_news category="category_id"] </code>
75
- * Display News with Grid [sp_news grid="2"]
76
  * Added pagination [sp_news limit="10"]
77
- * Added new shortcode parameters ie show_content, show_category_name and content_words_limit
78
- * Added new shortcode parameters show_date
 
79
 
80
  = PRO Features : =
81
- * Added 2 shortcodes
82
- <code>[sp_news] and [sp_news_slider]</code>
83
- * Recent News Slider
84
- * Recent News carousel slider
85
- * Recent News in Grid view
86
- * 5 Latest News widgets
87
- * News display with categories
88
- * Create a News Page OR News website
89
- * Added 30 layouts and designs
90
-
91
- View [PRO DEMO and Features](http://wponlinesupport.com/sp_plugin/sp-news-and-scrolling-widgets/) for additional information.
92
-
93
- = Features include: =
94
- * Just create a news page with any name and add the shortcode <code> [sp_news] </code>
95
- * Vertical and horizontal (Also added thumbnail option) news widget with setting page
96
- * Setting page
97
- * Easy to configure
98
- * Smoothly integrates into any theme
99
- * Yearly, Monthly and Daily archives
100
- * News Categories
101
- * News Tags
102
- * 3 News widgets
103
- * CSS and JS file for custmization
104
- * Widget Options like Show date, Show Categories, Select News Categories.
105
-
 
 
 
106
 
107
  == Installation ==
108
 
@@ -110,14 +111,13 @@ View [PRO DEMO and Features](http://wponlinesupport.com/sp_plugin/sp-news-and-sc
110
  1. Activate the SP News plugin through the 'Plugins' menu in WordPress.
111
  1. Add and manage news items on your site by clicking on the 'News' tab that appears in your admin menu.
112
  1. Create a page with the any name and paste this short code <code> [sp_news] </code>.
113
- 1. (Optional) Add and configure the News Items widget, vertical and horizontal news scrolling widget for one or more your sidebars.
114
- 1. Go to admin 'Setting page -> News Widget Setting' and enter your settings for vertical and horizontal news scrolling widgets eg Scrolling Direction, Number of news items, delay etc.
 
115
 
116
- == Frequently Asked Questions ==
117
 
118
- = What news templates are available? =
119
 
120
- This plugin use your theme file content.php file
121
 
122
  = Can I filter the list of news items by date? + =
123
 
@@ -139,23 +139,40 @@ Yse <code> [sp_news] </code>.
139
  4. Add new news
140
  5. Single News view
141
  6. Widgets
142
- 7. Admin setting page
143
- 8. Widgets Options
144
 
145
- == Changelog ==
146
 
147
- = 3.2.2 =
 
 
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  * Added Pro version
150
  * Fixed some bugs
151
 
152
  = 3.2.1 =
153
-
154
  * Added new shortcode parameters show_date.
155
  * Fixed some bugs.
156
 
157
  = 3.2 =
158
-
159
  * Widget Options like Show News date, Show News Categories, Select News Categories.
160
 
161
  = 3.1.1 =
@@ -173,12 +190,10 @@ Yse <code> [sp_news] </code>.
173
  = 2.2.1 =
174
  * fixed the bug : Shows news on top of static page
175
 
176
-
177
  = 2.2 =
178
  * Call the news post with shortcode
179
  * Call the news post with category wise
180
 
181
-
182
  = 2.1 =
183
  * Scroll main page news
184
  * Setting page for enable or disable main page news scrolling
@@ -196,23 +211,38 @@ Yse <code> [sp_news] </code>.
196
  * Adds Letest news widget
197
  * Adds Vertical news scrolling widget
198
 
 
199
 
 
 
 
200
 
201
- == Upgrade Notice ==
 
 
202
 
203
- = 3.2.2 =
 
204
 
 
 
 
 
 
 
 
 
 
 
 
205
  * Added Pro version
206
  * Fixed some bugs
207
 
208
  = 3.2.1 =
209
-
210
  * Added new shortcode parameters show_date.
211
  * Fixed some bugs.
212
 
213
-
214
  = 3.2 =
215
-
216
  * Widget Options like Show News date, Show News Categories, Select News Categories.
217
 
218
  = 3.1.1 =
@@ -243,6 +273,4 @@ Setting page for main news page vertical and horizontal news scrolling
243
  Added Vertical and horizontal news scrolling widget with setting page
244
 
245
  = 1.0 =
246
- Initial release
247
-
248
-
2
  Contributors: wponlinesupport, anoopranawat
3
  Tags: wordpress news plugin, main news page scrolling , wordpress vertical news plugin widget, wordpress horizontal news plugin widget , Free scrolling news wordpress plugin, Free scrolling news widget wordpress plugin, WordPress set post or page as news, WordPress dynamic news, news, latest news, custom post type, cpt, widget, vertical news scrolling widget, news widget
4
  Requires at least: 3.1
5
+ Tested up to: 4.5.2
6
  Author URI: http://wponlinesupport.com
7
  Stable tag: trunk
8
  License: GPLv2 or later
12
 
13
  == Description ==
14
 
15
+ Every CMS site needs a news section. SP News allows you add, manage and display news, date archives, widget, vertical news scrolling widget on your website.
16
 
17
+ View [DEMO](http://wponlinesupport.com/wp-plugin/sp-news-and-scrolling-widgets/) for additional information.
18
 
19
+ View [PRO DEMO and Features](http://wponlinesupport.com/wp-plugin/sp-news-and-scrolling-widgets/) for additional information.
20
 
21
+ View [Masonry Add-on](http://wponlinesupport.com/wordpress-plugin-addon/masonry-addon-wp-news-widgets/) with 12 designs and 7 effects.
 
 
 
22
 
23
  = Important Note For How to Install =
24
  * Please make sure that Permalink link should not be "/news" Otherwise all your news will go to archive page. You can give it other name like "/ournews, /latestnews etc"
31
  * Also you can Display the news post with Multiple categories wise
32
  <code> Sports news :
33
  [sp_news category="category_id"]
 
34
  Arts news
35
  [sp_news category="category_id"]
36
  </code>
 
37
  * **Complete shortcode example:**
38
  <code>[sp_news limit="10" category="category_id" grid="2"
39
  show_content="true" show_full_content="true" show_category_name="true"
40
  show_date="false" content_words_limit="30" ]</code>
 
41
  * Comments for the news
 
42
  * Added Widget Options like Show News date, Show News Categories, Select News Categories.
43
+ * Template code :
44
+ <code><?php echo do_shortcode('[sp_news]'); ?></code>
45
+ * [Check video](https://wordpress.org/plugins/sp-news-and-widget/installation/) How to install.
46
 
47
  = Following are News Parameters: =
48
 
49
  * **limit :** [sp_news limit="10"] (Display latest 10 news and then pagination).
50
  * **category :** [sp_news category="category_id"] (Display News categories wise).
51
+ * **grid :** [sp_news grid="2"] OR [sp_news grid="list"] (Display News in Grid formats. To display News in list view, Use grid="list").
52
  * **show_date :** [sp_news show_date="false"] (Display News date OR not. By default value is "True". Options are "ture OR false")
53
  * **show_content :** [sp_news show_content="true" ] (Display News Short content OR not. By default value is "True". Options are "ture OR false").
54
  * **show_full_content :** [sp_news show_full_content="true"] (Display Full news content on main page if you do not want word limit. By default value is "false")
55
  * **show_category_name :** [sp_news show_category_name="true" ] (Display News category name OR not. By default value is "True". Options are "ture OR false").
56
  * **content_words_limit :** [sp_news content_words_limit="30" ] (Control News short content Words limt. By default limit is 20 words).
57
 
 
 
 
58
  The plugin adds a News tab to your admin menu, which allows you to enter news items just as you would regular posts.
59
 
60
  If you are getting any kind of problum with news page means your are not able to see all news items then please remodify your permalinks Structure for example
61
  first select "Default" and save then again select "Custom Structure " and save.
62
 
63
+ = Languages Support : =
64
+ * Added translation in German, French (France), Polish languages (Beta)
65
 
66
  = Added New Features : =
67
+ * Added List view <code>[sp_news grid="list"] </code>
68
+ * Added translation in German, French (France), Polish languages (Beta)
69
+ * Widget News Scrolling setting page removed and added setting in widget only.
70
  * Added Widget Options like Show News date, Show News Categories, Select News Categories.
 
71
  * Category wise News <code> Sports news [sp_news category="category_id"] </code>
72
+ * Display News with Grid <code>[sp_news grid="2"]</code> and List <code>[sp_news grid="list"]</code>
73
  * Added pagination [sp_news limit="10"]
74
+ * Added new shortcode parameters ie **show_content, show_category_name and content_words_limit**
75
+ * Added new shortcode parameters **show_date**
76
+ * Added shortcode parameter **show_full_content**
77
 
78
  = PRO Features : =
79
+ > <strong>Premium Version</strong><br>
80
+ >
81
+ > * Added 2 shortcodes with various parameters.
82
+ > <code>[sp_news] and [sp_news_slider]</code>
83
+ > * Recent News Slider.
84
+ > * Recent News carousel slider.
85
+ > * Recent News in Grid view.
86
+ > * 6 different types of Latest News widgets.
87
+ > * News display with categories.
88
+ > * Added 50 stunning and cool layouts.
89
+ > * Popular grid slider feature.
90
+ > * Custom Read More link for News Post.
91
+ > * Create a News Page OR News website.
92
+ > * Drag & Drop feature to display News post in your desired order and other 6 types of order parameter.
93
+ > * 'Publicize' support with Jetpack to publish your News post on your social network.
94
+ > * 100% Multilanguage.
95
+ > * Template code :
96
+ > <code><?php echo do_shortcode('[sp_news]'); ?> </code>
97
+ > <code> <?php echo do_shortcode('[sp_news_slider]'); ?> </code>
98
+ >
99
+ > View [PRO DEMO and Features](http://wponlinesupport.com/wp-plugin/sp-news-and-scrolling-widgets/) for additional information.
100
+ >
101
+ > View [Masonry Add-on](http://wponlinesupport.com/wordpress-plugin-addon/masonry-addon-wp-news-widgets/) with 12 designs and 7 effects.
102
+ >
103
+
104
+ = How to install : =
105
+ [youtube https://www.youtube.com/watch?v=07IRBn1oXrU]
106
+
107
 
108
  == Installation ==
109
 
111
  1. Activate the SP News plugin through the 'Plugins' menu in WordPress.
112
  1. Add and manage news items on your site by clicking on the 'News' tab that appears in your admin menu.
113
  1. Create a page with the any name and paste this short code <code> [sp_news] </code>.
114
+
115
+ = How to install : =
116
+ [youtube https://www.youtube.com/watch?v=07IRBn1oXrU]
117
 
 
118
 
 
119
 
120
+ == Frequently Asked Questions ==
121
 
122
  = Can I filter the list of news items by date? + =
123
 
139
  4. Add new news
140
  5. Single News view
141
  6. Widgets
142
+ 7. Widgets Options
 
143
 
144
+ == Changelog ==
145
 
146
+ = 3.2.7 =
147
+ * Added excerpt functionality in post description.
148
+ * Resolved display post content issue.
149
 
150
+ = 3.2.6 =
151
+ * Fixed some css issues
152
+ * Updated PRO plugin design page.
153
+
154
+ = 3.2.5 =
155
+ * Fixed some css issues.
156
+
157
+ = 3.2.4 =
158
+ * Added translation in German, French (France), Polish languages (Beta)
159
+ * Fixed some bug
160
+ * Added 2 new design for pro version
161
+
162
+ = 3.2.3 =
163
+ * Added textdomain
164
+ * Widget scrolling setting page renoved and added setting in widget only.
165
+ * Fixed some bug
166
+
167
+ = 3.2.2 =
168
  * Added Pro version
169
  * Fixed some bugs
170
 
171
  = 3.2.1 =
 
172
  * Added new shortcode parameters show_date.
173
  * Fixed some bugs.
174
 
175
  = 3.2 =
 
176
  * Widget Options like Show News date, Show News Categories, Select News Categories.
177
 
178
  = 3.1.1 =
190
  = 2.2.1 =
191
  * fixed the bug : Shows news on top of static page
192
 
 
193
  = 2.2 =
194
  * Call the news post with shortcode
195
  * Call the news post with category wise
196
 
 
197
  = 2.1 =
198
  * Scroll main page news
199
  * Setting page for enable or disable main page news scrolling
211
  * Adds Letest news widget
212
  * Adds Vertical news scrolling widget
213
 
214
+ == Upgrade Notice ==
215
 
216
+ = 3.2.7 =
217
+ * Added excerpt functionality in post description.
218
+ * Resolved display post content issue.
219
 
220
+ = 3.2.6 =
221
+ * Fixed some css issues
222
+ * Updated PRO plugin design page.
223
 
224
+ = 3.2.5 =
225
+ * Fixed some css issues.
226
 
227
+ = 3.2.4 =
228
+ * Added translation in German, French (France), Polish languages (Beta)
229
+ * Fixed some bug
230
+ * Added 2 new design for pro version
231
+
232
+ = 3.2.3 =
233
+ * Added textdomain
234
+ * Widget scrolling setting page renoved and added setting in widget only.
235
+ * Fixed some bug
236
+
237
+ = 3.2.2 =
238
  * Added Pro version
239
  * Fixed some bugs
240
 
241
  = 3.2.1 =
 
242
  * Added new shortcode parameters show_date.
243
  * Fixed some bugs.
244
 
 
245
  = 3.2 =
 
246
  * Widget Options like Show News date, Show News Categories, Select News Categories.
247
 
248
  = 3.1.1 =
273
  Added Vertical and horizontal news scrolling widget with setting page
274
 
275
  = 1.0 =
276
+ Initial release
 
 
sp-news-and-widget.php CHANGED
@@ -2,17 +2,22 @@
2
  /*
3
  Plugin Name: WP News and three widgets(static, scrolling and with thumbs)
4
  Plugin URL: http://www.wponlinesupport.com/
 
 
5
  Description: A simple News and three widgets(static, scrolling and with thumbs) plugin
6
- Version: 3.2.2
7
  Author: WP Online Support
8
  Author URI: http://www.wponlinesupport.com/
9
  Contributors: WP Online Support
10
  */
11
- /*
12
- * Register CPT sp_News
13
- *
14
- */
15
-
 
 
 
16
  register_activation_hook( __FILE__, 'install_newsfree_version' );
17
  function install_newsfree_version(){
18
  if( is_plugin_active('wp-news-and-widget-pro/sp-news-and-widget.php') ){
@@ -35,24 +40,30 @@ function freenews_admin_notice() {
35
  }
36
  }
37
  }
 
 
 
 
 
 
38
  // Initialization function
39
  add_action('init', 'sp_cpt_news_init');
40
  function sp_cpt_news_init() {
41
  // Create new News custom post type
42
  $news_labels = array(
43
- 'name' => _x('News', 'post type general name'),
44
- 'singular_name' => _x('News', 'post type singular name'),
45
- 'add_new' => _x('Add News Item', 'news'),
46
- 'add_new_item' => __('Add New News Item'),
47
- 'edit_item' => __('Edit News Item'),
48
- 'new_item' => __('New News Item'),
49
- 'view_item' => __('View News Item'),
50
- 'search_items' => __('Search News Items'),
51
- 'not_found' => __('No News Items found'),
52
- 'not_found_in_trash' => __('No News Items found in Trash'),
53
  '_builtin' => false,
54
  'parent_item_colon' => '',
55
- 'menu_name' => 'News'
56
  );
57
  $news_args = array(
58
  'labels' => $news_labels,
@@ -80,17 +91,17 @@ function sp_cpt_news_init() {
80
  add_action( 'init', 'news_taxonomies');
81
  function news_taxonomies() {
82
  $labels = array(
83
- 'name' => _x( 'Category', 'taxonomy general name' ),
84
- 'singular_name' => _x( 'Category', 'taxonomy singular name' ),
85
- 'search_items' => __( 'Search Category' ),
86
- 'all_items' => __( 'All Category' ),
87
- 'parent_item' => __( 'Parent Category' ),
88
- 'parent_item_colon' => __( 'Parent Category:' ),
89
- 'edit_item' => __( 'Edit Category' ),
90
- 'update_item' => __( 'Update Category' ),
91
- 'add_new_item' => __( 'Add New Category' ),
92
- 'new_item_name' => __( 'New Category Name' ),
93
- 'menu_name' => __( 'News Category' ),
94
  );
95
 
96
  $args = array(
@@ -105,21 +116,21 @@ function news_taxonomies() {
105
  register_taxonomy( 'news-category', array( 'news' ), $args );
106
  }
107
 
108
- function my_rewrite_flush() {
109
  sp_cpt_news_init();
110
  flush_rewrite_rules();
111
  }
112
- register_activation_hook( __FILE__, 'my_rewrite_flush' );
113
- add_action( 'wp_enqueue_scripts','style_css_script' );
114
- function style_css_script() {
115
- wp_enqueue_style( 'cssnews', plugin_dir_url( __FILE__ ). 'css/stylenews.css' );
116
- wp_enqueue_script( 'vticker', plugin_dir_url( __FILE__ ) . 'js/jcarousellite.js', array( 'jquery' ));
117
  }
118
 
119
  require_once( 'widget_function.php' );
120
  require_once( 'news_menu_function.php' );
121
 
122
- function get_news( $atts, $content = null ){
123
  // setup the query
124
  extract(shortcode_atts(array(
125
  "limit" => '',
@@ -196,6 +207,7 @@ function get_news( $atts, $content = null ){
196
  $args['tax_query'] = array( array( 'taxonomy' => 'news-category', 'field' => 'id', 'terms' => $cat) );
197
  }
198
  $query = new WP_Query($args);
 
199
  $post_count = $query->post_count;
200
  $count = 0;
201
  if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
@@ -219,10 +231,12 @@ function get_news( $atts, $content = null ){
219
  <div id="post-<?php the_ID(); ?>" class="news type-news news-col-<?php echo $gridcol.' '.$css_class.' '.$date_class; ?>">
220
  <div class="news-thumb">
221
  <?php
222
- // Post thumbnail.
223
  if ( has_post_thumbnail()) {
224
  if($gridcol == '1'){ ?>
 
225
  <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('url'); ?></a>
 
226
  <?php } else if($gridcol > '2') { ?>
227
  <div class="grid-news-thumb">
228
  <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('large'); ?></a>
@@ -245,13 +259,13 @@ function get_news( $atts, $content = null ){
245
 
246
  ?>
247
  <div class="grid-date-post">
248
- <?php echo ($showDate == "true")? get_the_date('j, M y') : "" ;?>
249
- <?php echo ($showDate == "true" && $showCategory == "true" && $cate_name != '') ? " , " : "";?>
250
  <?php echo ($showCategory == 'true' && $cate_name != '') ? $cate_name : ""?>
251
  </div>
252
  <?php } ?>
253
  <div class="post-content-text">
254
- <?php the_title( sprintf( '<h4 class="news-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h4>' ); ?>
255
 
256
  <?php if($showCategory == 'true' && $gridcol == '1'){ ?>
257
  <div class="news-cat">
@@ -262,9 +276,9 @@ function get_news( $atts, $content = null ){
262
  <div class="news-content-excerpt">
263
  <?php if($showFullContent == "false" ) {
264
  $excerpt = get_the_content();?>
265
- <p class="news-short-content"><?php echo string_limit_newswords($excerpt,$words_limit); ?>...</p>
266
-
267
- <a href="<?php the_permalink(); ?>" class="more-link">Read More</a>
268
  <?php } else {
269
  the_content();
270
  } ?>
@@ -288,61 +302,32 @@ function get_news( $atts, $content = null ){
288
 
289
  return ob_get_clean();
290
  }
291
- add_shortcode('sp_news','get_news');
292
- function string_limit_newswords($string, $word_limit)
293
- {
294
- $words = explode(' ', $string, ($word_limit + 1));
295
- if(count($words) > $word_limit)
296
- array_pop($words);
297
- return implode(' ', $words);
298
- }
299
- function mynewsscript() {
300
- $option = 'NewsWidget_option';
301
- $newsscrollingoptionadmin = get_option( $option);
302
- $customscrollpost = $newsscrollingoptionadmin['news_width'];
303
- $customscrollpostheight = $newsscrollingoptionadmin['news_height'];
304
- $customscrollpostdelay = $newsscrollingoptionadmin['news_delay'];
305
- $customscrollpostspeed = $newsscrollingoptionadmin['news_speed'];
306
-
307
- if ($customscrollpost == 0 )
308
- {
309
- $vtrue = 'true';
310
- } else { $vtrue = 'false';
311
- }
312
- if ($customscrollpostheight == '' )
313
- {
314
- $vvisible = 3;
315
- } else { $vvisible = $customscrollpostheight;
316
- }
317
- if ($customscrollpostdelay == '' )
318
- {
319
- $vdelay = 500;
320
- } else { $vdelay = $customscrollpostdelay;
321
- }
322
- if ($customscrollpostspeed == '' )
323
- {
324
- $vspeed = 2000;
325
- } else { $vspeed = $customscrollpostspeed;
326
- }
327
- ?>
328
- <script type="text/javascript">
329
-
330
- jQuery(function() {
331
- jQuery(".newsticker-jcarousellite").jCarouselLite({
332
- vertical: <?php echo $vtrue; ?>,
333
- hoverPause:true,
334
- visible: <?php echo $vvisible; ?>,
335
- auto: <?php echo $vdelay; ?>,
336
- speed:<?php echo $vspeed; ?>,
337
-
338
- });
339
-
340
- });
341
- </script>
342
- <?php
343
- }
344
- add_action('wp_head', 'mynewsscript');
345
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
 
347
  function spnews_display_tags( $query ) {
348
  if( is_tag() && $query->is_main_query() ) {
@@ -361,7 +346,7 @@ function news_category_manage_columns($theme_columns) {
361
  $new_columns = array(
362
  'cb' => '<input type="checkbox" />',
363
  'name' => __('Name'),
364
- 'news_shortcode' => __( 'News Category Shortcode', 'news' ),
365
  'slug' => __('Slug'),
366
  'posts' => __('Posts')
367
  );
@@ -385,190 +370,4 @@ function news_category_columns($out, $column_name, $theme_id) {
385
  }
386
  return $out;
387
 
388
- }
389
-
390
-
391
- class SP_News_setting
392
- {
393
- /**
394
- * Holds the values to be used in the fields callbacks
395
- */
396
- private $options;
397
-
398
- /**
399
- * Start up
400
- */
401
- public function __construct()
402
- {
403
- add_action( 'admin_menu', array( $this, 'add_news_page' ) );
404
- add_action( 'admin_init', array( $this, 'page_init_news' ) );
405
- }
406
-
407
- /**
408
- * Add options page
409
- */
410
- public function add_news_page()
411
- {
412
- // This page will be under "Settings"
413
- add_options_page(
414
- 'Settings Admin',
415
- 'News Widget Settings',
416
- 'manage_options',
417
- 'news-setting-admin',
418
- array( $this, 'create_newsadmin_page' )
419
- );
420
- }
421
-
422
- /**
423
- * Options page callback
424
- */
425
- public function create_newsadmin_page()
426
- {
427
- // Set class property
428
- $this->options = get_option( 'NewsWidget_option' );
429
- ?>
430
- <div class="wrap">
431
- <?php screen_icon(); ?>
432
- <h2>Scrolling News Widget Setting</h2>
433
- <form method="post" action="options.php">
434
- <?php
435
- // This prints out all hidden setting fields
436
- settings_fields( 'news_option_group' );
437
- do_settings_sections( 'news-setting-admin' );
438
- submit_button();
439
- ?>
440
- </form>
441
- </div>
442
- <?php
443
- }
444
-
445
- /**
446
- * Register and add settings
447
- */
448
- public function page_init_news()
449
- {
450
- register_setting(
451
- 'news_option_group', // Option group
452
- 'NewsWidget_option', // Option name
453
- array( $this, 'sanitize' ) // Sanitize
454
- );
455
-
456
- add_settings_section(
457
- 'setting_section_id', // ID
458
- 'Scorlling News Widget Settings', // Title
459
- array( $this, 'print_section_info' ), // Callback
460
- 'news-setting-admin' // Page
461
- );
462
-
463
- add_settings_field(
464
- 'news_width', // ID
465
- 'Widget Scrolling Direction (Vertical OR Horizontal) ', // Title
466
- array( $this, 'news_width_callback' ), // Callback
467
- 'news-setting-admin', // Page
468
- 'setting_section_id' // Section
469
- );
470
-
471
- add_settings_field(
472
- 'news_height',
473
- 'Number of news visible at a time',
474
- array( $this, 'news_height_callback' ),
475
- 'news-setting-admin',
476
- 'setting_section_id'
477
- );
478
- add_settings_field(
479
- 'news_delay', // ID
480
- 'Enter delay ', // Title
481
- array( $this, 'news_delay_callback' ), // Callback
482
- 'news-setting-admin', // Page
483
- 'setting_section_id' // Section
484
- );
485
-
486
- add_settings_field(
487
- 'news_speed',
488
- 'Enter speed',
489
- array( $this, 'news_speed_callback' ),
490
- 'news-setting-admin',
491
- 'setting_section_id'
492
- );
493
-
494
- }
495
-
496
- /**
497
- * Sanitize each setting field as needed
498
- *
499
- * @param array $input Contains all settings fields as array keys
500
- */
501
- public function sanitize( $input )
502
- {
503
- $new_input = array();
504
- if( isset( $input['news_width'] ) )
505
- $new_input['news_width'] = sanitize_text_field( $input['news_width'] );
506
-
507
- if( isset( $input['news_height'] ) )
508
- $new_input['news_height'] = sanitize_text_field( $input['news_height'] );
509
-
510
- if( isset( $input['news_delay'] ) )
511
- $new_input['news_delay'] = sanitize_text_field( $input['news_delay'] );
512
-
513
- if( isset( $input['news_speed'] ) )
514
- $new_input['news_speed'] = sanitize_text_field( $input['news_speed'] );
515
-
516
- return $new_input;
517
- }
518
-
519
- /**
520
- * Print the Section text
521
- */
522
- public function print_section_info()
523
- {
524
- print 'Enter your settings below:';
525
- }
526
-
527
- /**
528
- * Get the settings option array and print one of its values
529
- */
530
- public function news_width_callback()
531
- {
532
- printf(
533
- '<input type="text" id="news_width" name="NewsWidget_option[news_width]" value="%s" />',
534
- isset( $this->options['news_width'] ) ? esc_attr( $this->options['news_width']) : ''
535
- );
536
- printf(' Enter "0" for <b>Vertical Scrolling</b> and "1" for <b>Horizontal Scrolling</b>');
537
- }
538
-
539
- /**
540
- * Get the settings option array and print one of its values
541
- */
542
- public function news_height_callback()
543
- {
544
- printf(
545
- '<input type="text" id="news_height" name="NewsWidget_option[news_height]" value="%s" />',
546
- isset( $this->options['news_height'] ) ? esc_attr( $this->options['news_height']) : ''
547
- );
548
- printf(' ie 1, 2, 3, 4 etc');
549
- }
550
- public function news_delay_callback()
551
- {
552
- printf(
553
- '<input type="text" id="news_delay" name="NewsWidget_option[news_delay]" value="%s" />',
554
- isset( $this->options['news_delay'] ) ? esc_attr( $this->options['news_delay']) : ''
555
- );
556
- printf(' ie 500, 1000 milliseconds delay');
557
- }
558
-
559
- /**
560
- * Get the settings option array and print one of its values
561
- */
562
- public function news_speed_callback()
563
- {
564
- printf(
565
- '<input type="text" id="news_speed" name="NewsWidget_option[news_speed]" value="%s" />',
566
- isset( $this->options['news_speed'] ) ? esc_attr( $this->options['news_speed']) : ''
567
- );
568
- printf(' ie 500, 1000 milliseconds speed');
569
- }
570
- }
571
-
572
- if( is_admin() )
573
- $my_newssettings_page = new SP_News_setting();
574
-
2
  /*
3
  Plugin Name: WP News and three widgets(static, scrolling and with thumbs)
4
  Plugin URL: http://www.wponlinesupport.com/
5
+ Text Domain: sp-news-and-widget
6
+ Domain Path: /languages/
7
  Description: A simple News and three widgets(static, scrolling and with thumbs) plugin
8
+ Version: 3.2.7
9
  Author: WP Online Support
10
  Author URI: http://www.wponlinesupport.com/
11
  Contributors: WP Online Support
12
  */
13
+
14
+ if( !defined( 'WPNW_VERSION' ) ) {
15
+ define( 'WPNW_VERSION', '3.2.7' ); // Version of plugin
16
+ }
17
+ if( !defined( 'WPNW_POST_TYPE' ) ) {
18
+ define( 'WPNW_POST_TYPE', 'news' ); // Plugin post type
19
+ }
20
+
21
  register_activation_hook( __FILE__, 'install_newsfree_version' );
22
  function install_newsfree_version(){
23
  if( is_plugin_active('wp-news-and-widget-pro/sp-news-and-widget.php') ){
40
  }
41
  }
42
  }
43
+
44
+ add_action('plugins_loaded', 'sp_news_load_textdomain');
45
+ function sp_news_load_textdomain() {
46
+ load_plugin_textdomain( 'sp-news-and-widget', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
47
+ }
48
+
49
  // Initialization function
50
  add_action('init', 'sp_cpt_news_init');
51
  function sp_cpt_news_init() {
52
  // Create new News custom post type
53
  $news_labels = array(
54
+ 'name' => _x('News', 'sp-news-and-widget'),
55
+ 'singular_name' => _x('news', 'sp-news-and-widget'),
56
+ 'add_new' => _x('Add News Item', 'sp-news-and-widget'),
57
+ 'add_new_item' => __('Add New News Item', 'sp-news-and-widget'),
58
+ 'edit_item' => __('Edit News Item', 'sp-news-and-widget'),
59
+ 'new_item' => __('New News Item', 'sp-news-and-widget'),
60
+ 'view_item' => __('View News Item', 'sp-news-and-widget'),
61
+ 'search_items' => __('Search News Items','sp-news-and-widget'),
62
+ 'not_found' => __('No News Items found', 'sp-news-and-widget'),
63
+ 'not_found_in_trash' => __('No News Items found in Trash', 'sp-news-and-widget'),
64
  '_builtin' => false,
65
  'parent_item_colon' => '',
66
+ 'menu_name' => _x( 'News', 'admin menu', 'sp-news-and-widget' )
67
  );
68
  $news_args = array(
69
  'labels' => $news_labels,
91
  add_action( 'init', 'news_taxonomies');
92
  function news_taxonomies() {
93
  $labels = array(
94
+ 'name' => _x( 'Category', 'sp-news-and-widget' ),
95
+ 'singular_name' => _x( 'Category', 'sp-news-and-widget' ),
96
+ 'search_items' => __( 'Search Category', 'sp-news-and-widget' ),
97
+ 'all_items' => __( 'All Category', 'sp-news-and-widget' ),
98
+ 'parent_item' => __( 'Parent Category', 'sp-news-and-widget' ),
99
+ 'parent_item_colon' => __( 'Parent Category:', 'sp-news-and-widget' ),
100
+ 'edit_item' => __( 'Edit Category', 'sp-news-and-widget' ),
101
+ 'update_item' => __( 'Update Category', 'sp-news-and-widget' ),
102
+ 'add_new_item' => __( 'Add New Category', 'sp-news-and-widget' ),
103
+ 'new_item_name' => __( 'New Category Name', 'sp-news-and-widget' ),
104
+ 'menu_name' => __( 'News Category', 'sp-news-and-widget' ),
105
  );
106
 
107
  $args = array(
116
  register_taxonomy( 'news-category', array( 'news' ), $args );
117
  }
118
 
119
+ function wpnaw_rewrite_flush() {
120
  sp_cpt_news_init();
121
  flush_rewrite_rules();
122
  }
123
+ register_activation_hook( __FILE__, 'wpnaw_rewrite_flush' );
124
+ add_action( 'wp_enqueue_scripts','wpnawstyle_css_script' );
125
+ function wpnawstyle_css_script() {
126
+ wp_enqueue_style( 'cssnews', plugin_dir_url( __FILE__ ). 'css/stylenews.css', array(), WPNW_VERSION );
127
+ wp_enqueue_script( 'vnewsticker', plugin_dir_url( __FILE__ ) . 'js/jquery.newstape.js', array( 'jquery' ), WPNW_VERSION);
128
  }
129
 
130
  require_once( 'widget_function.php' );
131
  require_once( 'news_menu_function.php' );
132
 
133
+ function wpnaw_get_news( $atts, $content = null ){
134
  // setup the query
135
  extract(shortcode_atts(array(
136
  "limit" => '',
207
  $args['tax_query'] = array( array( 'taxonomy' => 'news-category', 'field' => 'id', 'terms' => $cat) );
208
  }
209
  $query = new WP_Query($args);
210
+ global $post;
211
  $post_count = $query->post_count;
212
  $count = 0;
213
  if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
231
  <div id="post-<?php the_ID(); ?>" class="news type-news news-col-<?php echo $gridcol.' '.$css_class.' '.$date_class; ?>">
232
  <div class="news-thumb">
233
  <?php
234
+
235
  if ( has_post_thumbnail()) {
236
  if($gridcol == '1'){ ?>
237
+ <div class="grid-news-thumb">
238
  <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('url'); ?></a>
239
+ </div>
240
  <?php } else if($gridcol > '2') { ?>
241
  <div class="grid-news-thumb">
242
  <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('large'); ?></a>
259
 
260
  ?>
261
  <div class="grid-date-post">
262
+ <?php echo ($showDate == "true")? get_the_date() : "" ;?>
263
+ <?php echo ($showDate == "true" && $showCategory == "true" && $cate_name != '') ? " / " : "";?>
264
  <?php echo ($showCategory == 'true' && $cate_name != '') ? $cate_name : ""?>
265
  </div>
266
  <?php } ?>
267
  <div class="post-content-text">
268
+ <?php the_title( sprintf( '<h3 class="news-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' ); ?>
269
 
270
  <?php if($showCategory == 'true' && $gridcol == '1'){ ?>
271
  <div class="news-cat">
276
  <div class="news-content-excerpt">
277
  <?php if($showFullContent == "false" ) {
278
  $excerpt = get_the_content();?>
279
+ <p class="news-short-content"><?php echo string_limit_newswords( $post->ID, $excerpt, $words_limit, '...'); ?></p>
280
+
281
+ <a href="<?php the_permalink(); ?>" class="more-link"><?php _e( 'Read More', 'sp-news-and-widget' ); ?></a>
282
  <?php } else {
283
  the_content();
284
  } ?>
302
 
303
  return ob_get_clean();
304
  }
305
+ add_shortcode('sp_news','wpnaw_get_news');
306
+
307
+ function string_limit_newswords( $post_id = null, $content = '', $word_length = '55', $more = '...' ) {
308
+
309
+ $has_excerpt = false;
310
+ $word_length = !empty($word_length) ? $word_length : '55';
311
+
312
+ // If post id is passed
313
+ if( !empty($post_id) ) {
314
+ if (has_excerpt($post_id)) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
 
316
+ $has_excerpt = true;
317
+ $content = get_the_excerpt();
318
+
319
+ } else {
320
+ $content = !empty($content) ? $content : get_the_content();
321
+ }
322
+ }
323
+
324
+ if( !empty($content) && (!$has_excerpt) ) {
325
+ $content = strip_shortcodes( $content ); // Strip shortcodes
326
+ $content = wp_trim_words( $content, $word_length, $more );
327
+ }
328
+
329
+ return $content;
330
+ }
331
 
332
  function spnews_display_tags( $query ) {
333
  if( is_tag() && $query->is_main_query() ) {
346
  $new_columns = array(
347
  'cb' => '<input type="checkbox" />',
348
  'name' => __('Name'),
349
+ 'news_shortcode' => __( 'News Category Shortcode', 'sp-news-and-widget' ),
350
  'slug' => __('Slug'),
351
  'posts' => __('Posts')
352
  );
370
  }
371
  return $out;
372
 
373
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
widget_function.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php class SP_News_Widget extends WP_Widget {
2
 
3
- function SP_News_Widget() {
4
 
5
- $widget_ops = array('classname' => 'SP_News_Widget', 'description' => __('Displayed Latest News Items from the News in a sidebar', 'news_cpt') );
6
  $control_ops = array( 'width' => 350, 'height' => 450, 'id_base' => 'sp_news_widget' );
7
- $this->WP_Widget( 'sp_news_widget', __('Latest News Widget', 'news_cpt'), $widget_ops, $control_ops );
8
  }
9
 
10
  function form($instance) {
@@ -20,20 +20,20 @@
20
  $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
21
  $num_items = isset($instance['num_items']) ? absint($instance['num_items']) : 5;
22
  ?>
23
- <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
24
- <p><label for="<?php echo $this->get_field_id('num_items'); ?>">Number of Items: <input class="widefat" id="<?php echo $this->get_field_id('num_items'); ?>" name="<?php echo $this->get_field_name('num_items'); ?>" type="text" value="<?php echo attribute_escape($num_items); ?>" /></label></p>
25
  <p>
26
  <input id="<?php echo $this->get_field_id( 'date' ); ?>" name="<?php echo $this->get_field_name( 'date' ); ?>" type="checkbox"<?php checked( $instance['date'], 1 ); ?> />
27
- <label for="<?php echo $this->get_field_id( 'date' ); ?>"><?php _e( 'Display Date', 'news' ); ?></label>
28
  </p>
29
  <p>
30
  <input id="<?php echo $this->get_field_id( 'show_category' ); ?>" name="<?php echo $this->get_field_name( 'show_category' ); ?>" type="checkbox"<?php checked( $instance['show_category'], 1 ); ?> />
31
- <label for="<?php echo $this->get_field_id( 'show_category' ); ?>"><?php _e( 'Display Category', 'news' ); ?></label>
32
  </p>
33
  <p>
34
- <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category:', 'news' ); ?></label>
35
  <?php
36
- $dropdown_args = array( 'taxonomy' => 'news-category', 'class' => 'widefat', 'show_option_all' => __( 'All', 'news' ), 'id' => $this->get_field_id( 'category' ), 'name' => $this->get_field_name( 'category' ), 'selected' => $instance['category'] );
37
  wp_dropdown_categories( $dropdown_args );
38
  ?>
39
  </p>
@@ -66,7 +66,9 @@
66
  ?>
67
  <h4 class="widget-title"><?php echo $title ?></h4>
68
  <!--visual-columns-->
69
- <?php if($date == "false" && $show_category == "false"){
 
 
70
  $no_p = "no_p";
71
  }?>
72
  <div class="recent-news-items <?php echo $no_p?>">
@@ -82,6 +84,7 @@
82
  $news_args['tax_query'] = array( array( 'taxonomy' => 'news-category', 'field' => 'id', 'terms' => $category) );
83
  }
84
  $cust_loop = new WP_Query($news_args);
 
85
  $post_count = $cust_loop->post_count;
86
  $count = 0;
87
 
@@ -99,10 +102,14 @@
99
  $cate_name = join( ", ", $news_links );
100
  ?>
101
  <li class="news_li">
102
- <h6> <a class="post-title" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h6>
103
- <?php echo ($date == "true")? '<p>'.get_the_date('j, M y') : "" ;?>
 
 
104
  <?php echo ($date == "true" && $show_category == "true" && $cate_name != '') ? " , " : "";?>
105
- <?php echo ($show_category == 'true' && $cate_name != '') ? $cate_name.'</p>' : ""?>
 
 
106
  </li>
107
  <?php endwhile;
108
  endif;
@@ -120,42 +127,58 @@ function sp_news_widget_load_widgets() {
120
  }
121
  /* Load the widget */
122
  add_action( 'widgets_init', 'sp_news_widget_load_widgets' );
 
123
  /* scrolling news */
124
  class SP_News_scrolling_Widget extends WP_Widget {
125
- function SP_News_scrolling_Widget() {
126
- $widget_ops = array('classname' => 'SP_News_scrolling_Widget', 'description' => __('Displayed Latest News Items from the News in a sidebar', 'news_cpt') );
127
  $control_ops = array( 'width' => 350, 'height' => 450, 'id_base' => 'sp_news_s_widget' );
128
- $this->WP_Widget( 'sp_news_s_widget', __('Latest News Scrolling Widget', 'news_cpt'), $widget_ops, $control_ops );
129
  }
130
  function form($instance) {
131
  $defaults = array(
132
  'limit' => 5,
133
  'title' => '',
134
- "date" => false,
135
  'show_category' => false,
136
  'category' => 0,
 
 
 
137
  );
138
 
139
  $instance = wp_parse_args( (array) $instance, $defaults );
140
  $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
141
  $num_items = isset($instance['num_items']) ? absint($instance['num_items']) : 5;
142
  ?>
143
- <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
144
- <p><label for="<?php echo $this->get_field_id('num_items'); ?>">Number of Items: <input class="widefat" id="<?php echo $this->get_field_id('num_items'); ?>" name="<?php echo $this->get_field_name('num_items'); ?>" type="text" value="<?php echo attribute_escape($num_items); ?>" /></label></p>
145
  <p>
146
  <input id="<?php echo $this->get_field_id( 'date' ); ?>" name="<?php echo $this->get_field_name( 'date' ); ?>" type="checkbox"<?php checked( $instance['date'], 1 ); ?> />
147
- <label for="<?php echo $this->get_field_id( 'date' ); ?>"><?php _e( 'Display Date', 'news' ); ?></label>
148
  </p>
149
  <p>
150
  <input id="<?php echo $this->get_field_id( 'show_category' ); ?>" name="<?php echo $this->get_field_name( 'show_category' ); ?>" type="checkbox"<?php checked( $instance['show_category'], 1 ); ?> />
151
- <label for="<?php echo $this->get_field_id( 'show_category' ); ?>"><?php _e( 'Display Category', 'news' ); ?></label>
152
  </p>
153
  <p>
154
- <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category:', 'news' ); ?></label>
155
  <?php
156
- $dropdown_args = array( 'taxonomy' => 'news-category', 'class' => 'widefat', 'show_option_all' => __( 'All', 'news' ), 'id' => $this->get_field_id( 'category' ), 'name' => $this->get_field_name( 'category' ), 'selected' => $instance['category'] );
157
  wp_dropdown_categories( $dropdown_args );
158
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
159
  </p>
160
  <?php
161
  }
@@ -166,7 +189,10 @@ class SP_News_scrolling_Widget extends WP_Widget {
166
  $instance['num_items'] = $new_instance['num_items'];
167
  $instance['date'] = (bool) esc_attr( $new_instance['date'] );
168
  $instance['show_category'] = (bool) esc_attr( $new_instance['show_category'] );
169
- $instance['category'] = intval( $new_instance['category'] );
 
 
 
170
  return $instance;
171
  }
172
  function widget($news_args, $instance) {
@@ -177,6 +203,9 @@ class SP_News_scrolling_Widget extends WP_Widget {
177
  if ( isset( $instance['date'] ) && ( 1 == $instance['date'] ) ) { $date = "true"; } else { $date = "false"; }
178
  if ( isset( $instance['show_category'] ) && ( 1 == $instance['show_category'] ) ) { $show_category = "true"; } else { $show_category = "false"; }
179
  if ( isset( $instance['category'] ) && is_numeric( $instance['category'] ) ) $category = intval( $instance['category'] );
 
 
 
180
  $postcount = 0;
181
 
182
  echo $before_widget;
@@ -184,10 +213,12 @@ class SP_News_scrolling_Widget extends WP_Widget {
184
  ?>
185
  <h4 class="widget-title"><?php echo $title ?></h4>
186
  <!--visual-columns-->
187
- <?php if($date == "false" && $show_category == "false"){
 
 
188
  $no_p = "no_p";
189
  }?>
190
- <div class="recent-news-items <?php echo $no_p;?>">
191
  <div class="newsticker-jcarousellite">
192
  <ul>
193
  <?php // setup the query
@@ -200,6 +231,7 @@ class SP_News_scrolling_Widget extends WP_Widget {
200
  $news_args['tax_query'] = array( array( 'taxonomy' => 'news-category', 'field' => 'id', 'terms' => $category) );
201
  }
202
  $cust_loop = new WP_Query($news_args);
 
203
  $post_count = $cust_loop->post_count;
204
  $count = 0;
205
 
@@ -217,10 +249,14 @@ class SP_News_scrolling_Widget extends WP_Widget {
217
  $cate_name = join( ", ", $news_links );
218
  ?>
219
  <li class="news_li">
220
- <h6><a class="post-title" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h6>
221
- <?php echo ($date == "true")? '<p>'.get_the_date('j, M y') : "" ;?>
 
 
222
  <?php echo ($date == "true" && $show_category == "true" && $cate_name != '') ? " , " : "";?>
223
- <?php echo ($show_category == 'true' && $cate_name != '') ? $cate_name.'</p>' : ""?>
 
 
224
  </li>
225
  <?php endwhile;
226
  endif;
@@ -228,6 +264,18 @@ class SP_News_scrolling_Widget extends WP_Widget {
228
  </ul>
229
  </div>
230
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
231
  <?php
232
  echo $after_widget;
233
  }
@@ -244,11 +292,11 @@ add_action( 'widgets_init', 'sp_news_scroll_widget_load_widgets' );
244
  /* news with thumb */
245
  class SP_News_thmb_Widget extends WP_Widget {
246
 
247
- function SP_News_thmb_Widget() {
248
 
249
- $widget_ops = array('classname' => 'SP_News_thmb_Widget', 'description' => __('Displayed Latest News Items in a sidebar with thumbnails', 'news_cpt') );
250
  $control_ops = array( 'width' => 350, 'height' => 450, 'id_base' => 'sp_news_sthumb_widget' );
251
- $this->WP_Widget( 'sp_news_sthumb_widget', __('Latest News with thumb', 'news_cpt'), $widget_ops, $control_ops );
252
  }
253
 
254
  function form($instance) {
@@ -264,20 +312,20 @@ class SP_News_thmb_Widget extends WP_Widget {
264
  $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
265
  $num_items = isset($instance['num_items']) ? absint($instance['num_items']) : 5;
266
  ?>
267
- <p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
268
- <p><label for="<?php echo $this->get_field_id('num_items'); ?>">Number of Items: <input class="widefat" id="<?php echo $this->get_field_id('num_items'); ?>" name="<?php echo $this->get_field_name('num_items'); ?>" type="text" value="<?php echo attribute_escape($num_items); ?>" /></label></p>
269
  <p>
270
  <input id="<?php echo $this->get_field_id( 'date' ); ?>" name="<?php echo $this->get_field_name( 'date' ); ?>" type="checkbox"<?php checked( $instance['date'], 1 ); ?> />
271
- <label for="<?php echo $this->get_field_id( 'date' ); ?>"><?php _e( 'Display Date', 'news' ); ?></label>
272
  </p>
273
  <p>
274
  <input id="<?php echo $this->get_field_id( 'show_category' ); ?>" name="<?php echo $this->get_field_name( 'show_category' ); ?>" type="checkbox"<?php checked( $instance['show_category'], 1 ); ?> />
275
- <label for="<?php echo $this->get_field_id( 'show_category' ); ?>"><?php _e( 'Display Category', 'news' ); ?></label>
276
  </p>
277
  <p>
278
- <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category:', 'news' ); ?></label>
279
  <?php
280
- $dropdown_args = array( 'taxonomy' => 'news-category', 'class' => 'widefat', 'show_option_all' => __( 'All', 'news' ), 'id' => $this->get_field_id( 'category' ), 'name' => $this->get_field_name( 'category' ), 'selected' => $instance['category'] );
281
  wp_dropdown_categories( $dropdown_args );
282
  ?>
283
  </p>
@@ -308,11 +356,13 @@ class SP_News_thmb_Widget extends WP_Widget {
308
  ?>
309
  <h4 class="widget-title"><?php echo $title ?></h4>
310
  <!--visual-columns-->
311
- <?php if($date == "false" && $show_category == "false"){
 
 
312
  $no_p = "no_p";
313
  }?>
314
  <div class="recent-news-items <?php echo $no_p;?>">
315
- <div class="newstickerthumb">
316
  <ul>
317
  <?php // setup the query
318
  $news_args = array( 'suppress_filters' => true,
@@ -325,6 +375,7 @@ class SP_News_thmb_Widget extends WP_Widget {
325
  }
326
 
327
  $cust_loop = new WP_Query($news_args);
 
328
  $post_count = $cust_loop->post_count;
329
  $count = 0;
330
  if ($cust_loop->have_posts()) : while ($cust_loop->have_posts()) : $cust_loop->the_post(); $postcount++;
@@ -350,10 +401,15 @@ class SP_News_thmb_Widget extends WP_Widget {
350
  }
351
  ?> </a></div>
352
  <div class="news_thumb_right">
353
- <h6><a class="post-title" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h6>
354
- <?php echo ($date == "true")? '<p>'.get_the_date('j, M y') : "" ;?>
 
 
355
  <?php echo ($date == "true" && $show_category == "true" && $cate_name != '') ? " , " : "";?>
356
- <?php echo ($show_category == 'true' && $cate_name != '') ? $cate_name.'</p>' : ""?></div>
 
 
 
357
 
358
  </li>
359
  <?php endwhile;
@@ -361,7 +417,7 @@ class SP_News_thmb_Widget extends WP_Widget {
361
  wp_reset_query(); ?>
362
 
363
  </ul>
364
- </div> </div>
365
  <?php
366
  echo $after_widget;
367
  }
1
  <?php class SP_News_Widget extends WP_Widget {
2
 
3
+ function __construct() {
4
 
5
+ $widget_ops = array('classname' => 'SP_News_Widget', 'description' => __('Displayed Latest News Items from the News in a sidebar', 'sp-news-and-widget') );
6
  $control_ops = array( 'width' => 350, 'height' => 450, 'id_base' => 'sp_news_widget' );
7
+ parent::__construct( 'sp_news_widget', __('Latest News Widget', 'sp-news-and-widget'), $widget_ops, $control_ops );
8
  }
9
 
10
  function form($instance) {
20
  $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
21
  $num_items = isset($instance['num_items']) ? absint($instance['num_items']) : 5;
22
  ?>
23
+ <p><label for="<?php echo $this->get_field_id('title'); ?>"> <?php _e( 'Title:', 'sp-news-and-widget' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>
24
+ <p><label for="<?php echo $this->get_field_id('num_items'); ?>"><?php _e( 'Number of Items: ', 'sp-news-and-widget' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('num_items'); ?>" name="<?php echo $this->get_field_name('num_items'); ?>" type="text" value="<?php echo esc_attr($num_items); ?>" /></label></p>
25
  <p>
26
  <input id="<?php echo $this->get_field_id( 'date' ); ?>" name="<?php echo $this->get_field_name( 'date' ); ?>" type="checkbox"<?php checked( $instance['date'], 1 ); ?> />
27
+ <label for="<?php echo $this->get_field_id( 'date' ); ?>"><?php _e( 'Display Date', 'sp-news-and-widget' ); ?></label>
28
  </p>
29
  <p>
30
  <input id="<?php echo $this->get_field_id( 'show_category' ); ?>" name="<?php echo $this->get_field_name( 'show_category' ); ?>" type="checkbox"<?php checked( $instance['show_category'], 1 ); ?> />
31
+ <label for="<?php echo $this->get_field_id( 'show_category' ); ?>"><?php _e( 'Display Category', 'sp-news-and-widget' ); ?></label>
32
  </p>
33
  <p>
34
+ <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category:', 'sp-news-and-widget' ); ?></label>
35
  <?php
36
+ $dropdown_args = array( 'taxonomy' => 'news-category', 'class' => 'widefat', 'show_option_all' => __( 'All', 'sp-news-and-widget' ), 'id' => $this->get_field_id( 'category' ), 'name' => $this->get_field_name( 'category' ), 'selected' => $instance['category'] );
37
  wp_dropdown_categories( $dropdown_args );
38
  ?>
39
  </p>
66
  ?>
67
  <h4 class="widget-title"><?php echo $title ?></h4>
68
  <!--visual-columns-->
69
+ <?php
70
+ $no_p = '';
71
+ if($date == "false" && $show_category == "false"){
72
  $no_p = "no_p";
73
  }?>
74
  <div class="recent-news-items <?php echo $no_p?>">
84
  $news_args['tax_query'] = array( array( 'taxonomy' => 'news-category', 'field' => 'id', 'terms' => $category) );
85
  }
86
  $cust_loop = new WP_Query($news_args);
87
+ global $post;
88
  $post_count = $cust_loop->post_count;
89
  $count = 0;
90
 
102
  $cate_name = join( ", ", $news_links );
103
  ?>
104
  <li class="news_li">
105
+ <a class="newspost-title" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
106
+ <?php if($date == "true" || $show_category == "true"){ ?>
107
+ <div class="widget-date-post">
108
+ <?php echo ($date == "true")? get_the_date() : "" ;?>
109
  <?php echo ($date == "true" && $show_category == "true" && $cate_name != '') ? " , " : "";?>
110
+ <?php echo ($show_category == 'true' && $cate_name != '') ? $cate_name : "" ?>
111
+ </div>
112
+ <?php } ?>
113
  </li>
114
  <?php endwhile;
115
  endif;
127
  }
128
  /* Load the widget */
129
  add_action( 'widgets_init', 'sp_news_widget_load_widgets' );
130
+
131
  /* scrolling news */
132
  class SP_News_scrolling_Widget extends WP_Widget {
133
+ function __construct() {
134
+ $widget_ops = array('classname' => 'SP_News_scrolling_Widget', 'description' => __('Scroll Latest News Items from the News in a sidebar', 'sp-news-and-widget') );
135
  $control_ops = array( 'width' => 350, 'height' => 450, 'id_base' => 'sp_news_s_widget' );
136
+ parent::__construct( 'sp_news_s_widget', __('Latest News Scrolling Widget', 'sp-news-and-widget'), $widget_ops, $control_ops );
137
  }
138
  function form($instance) {
139
  $defaults = array(
140
  'limit' => 5,
141
  'title' => '',
142
+ 'date' => false,
143
  'show_category' => false,
144
  'category' => 0,
145
+ 'height' => 400,
146
+ 'pause' => 2000,
147
+ 'speed' => 500,
148
  );
149
 
150
  $instance = wp_parse_args( (array) $instance, $defaults );
151
  $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
152
  $num_items = isset($instance['num_items']) ? absint($instance['num_items']) : 5;
153
  ?>
154
+ <p><label for="<?php echo $this->get_field_id('title'); ?>"> <?php _e( 'Title:', 'sp-news-and-widget' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>
155
+ <p><label for="<?php echo $this->get_field_id('num_items'); ?>"><?php _e( 'Number of Items: ', 'sp-news-and-widget' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('num_items'); ?>" name="<?php echo $this->get_field_name('num_items'); ?>" type="text" value="<?php echo esc_attr($num_items); ?>" /></label></p>
156
  <p>
157
  <input id="<?php echo $this->get_field_id( 'date' ); ?>" name="<?php echo $this->get_field_name( 'date' ); ?>" type="checkbox"<?php checked( $instance['date'], 1 ); ?> />
158
+ <label for="<?php echo $this->get_field_id( 'date' ); ?>"><?php _e( 'Display Date', 'sp-news-and-widget' ); ?></label>
159
  </p>
160
  <p>
161
  <input id="<?php echo $this->get_field_id( 'show_category' ); ?>" name="<?php echo $this->get_field_name( 'show_category' ); ?>" type="checkbox"<?php checked( $instance['show_category'], 1 ); ?> />
162
+ <label for="<?php echo $this->get_field_id( 'show_category' ); ?>"><?php _e( 'Display Category', 'sp-news-and-widget' ); ?></label>
163
  </p>
164
  <p>
165
+ <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category:', 'sp-news-and-widget' ); ?></label>
166
  <?php
167
+ $dropdown_args = array( 'taxonomy' => 'news-category', 'class' => 'widefat', 'show_option_all' => __( 'All', 'sp-news-and-widget' ), 'id' => $this->get_field_id( 'category' ), 'name' => $this->get_field_name( 'category' ), 'selected' => $instance['category'] );
168
  wp_dropdown_categories( $dropdown_args );
169
  ?>
170
+ </p>
171
+ <p>
172
+ <label for="<?php echo $this->get_field_id( 'height' ); ?>"><?php _e( 'Height:', 'sp-news-and-widget' ); ?></label>
173
+ <input type="text" name="<?php echo $this->get_field_name( 'height' ); ?>" value="<?php echo $instance['height']; ?>" class="widefat" id="<?php echo $this->get_field_id( 'height' ); ?>" />
174
+ </p>
175
+ <p>
176
+ <label for="<?php echo $this->get_field_id( 'pause' ); ?>"><?php _e( 'Pause:', 'sp-news-and-widget' ); ?></label>
177
+ <input type="text" name="<?php echo $this->get_field_name( 'pause' ); ?>" value="<?php echo $instance['pause']; ?>" class="widefat" id="<?php echo $this->get_field_id( 'pause' ); ?>" />
178
+ </p>
179
+ <p>
180
+ <label for="<?php echo $this->get_field_id( 'speed' ); ?>"><?php _e( 'Speed:', 'sp-news-and-widget' ); ?></label>
181
+ <input type="text" name="<?php echo $this->get_field_name( 'speed' ); ?>" value="<?php echo $instance['speed']; ?>" class="widefat" id="<?php echo $this->get_field_id( 'speed' ); ?>" />
182
  </p>
183
  <?php
184
  }
189
  $instance['num_items'] = $new_instance['num_items'];
190
  $instance['date'] = (bool) esc_attr( $new_instance['date'] );
191
  $instance['show_category'] = (bool) esc_attr( $new_instance['show_category'] );
192
+ $instance['category'] = intval( $new_instance['category'] );
193
+ $instance['height'] = intval( $new_instance['height'] );
194
+ $instance['pause'] = intval( $new_instance['pause'] );
195
+ $instance['speed'] = intval( $new_instance['speed'] );
196
  return $instance;
197
  }
198
  function widget($news_args, $instance) {
203
  if ( isset( $instance['date'] ) && ( 1 == $instance['date'] ) ) { $date = "true"; } else { $date = "false"; }
204
  if ( isset( $instance['show_category'] ) && ( 1 == $instance['show_category'] ) ) { $show_category = "true"; } else { $show_category = "false"; }
205
  if ( isset( $instance['category'] ) && is_numeric( $instance['category'] ) ) $category = intval( $instance['category'] );
206
+ if ( isset( $instance['height'] ) && ( 0 < count( $instance['height'] ) ) ) { $args['height'] = intval( $instance['height'] ); }
207
+ if ( isset( $instance['pause'] ) && ( 0 < count( $instance['pause'] ) ) ) { $args['pause'] = intval( $instance['pause'] ); }
208
+ if ( isset( $instance['speed'] ) && ( 0 < count( $instance['speed'] ) ) ) { $args['speed'] = intval( $instance['speed'] ); }
209
  $postcount = 0;
210
 
211
  echo $before_widget;
213
  ?>
214
  <h4 class="widget-title"><?php echo $title ?></h4>
215
  <!--visual-columns-->
216
+ <?php
217
+ $no_p = '';
218
+ if($date == "false" && $show_category == "false"){
219
  $no_p = "no_p";
220
  }?>
221
+ <div class="recent-news-items-scroll <?php echo $no_p;?>">
222
  <div class="newsticker-jcarousellite">
223
  <ul>
224
  <?php // setup the query
231
  $news_args['tax_query'] = array( array( 'taxonomy' => 'news-category', 'field' => 'id', 'terms' => $category) );
232
  }
233
  $cust_loop = new WP_Query($news_args);
234
+ global $post;
235
  $post_count = $cust_loop->post_count;
236
  $count = 0;
237
 
249
  $cate_name = join( ", ", $news_links );
250
  ?>
251
  <li class="news_li">
252
+ <a class="newspost-title" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
253
+ <?php if($date == "true" || $show_category == "true"){ ?>
254
+ <div class="widget-date-post">
255
+ <?php echo ($date == "true")? get_the_date() : "" ;?>
256
  <?php echo ($date == "true" && $show_category == "true" && $cate_name != '') ? " , " : "";?>
257
+ <?php echo ($show_category == 'true' && $cate_name != '') ? $cate_name : "" ?>
258
+ </div>
259
+ <?php } ?>
260
  </li>
261
  <?php endwhile;
262
  endif;
264
  </ul>
265
  </div>
266
  </div>
267
+ <script>
268
+ jQuery(function() {
269
+ jQuery('.newsticker-jcarousellite').vTicker(
270
+ {
271
+ speed:<?php echo $instance['speed']?>,
272
+ height:<?php echo $instance['height']?>,
273
+ padding:5,
274
+ pause:<?php echo $instance['pause']?>
275
+
276
+ });
277
+ });
278
+ </script>
279
  <?php
280
  echo $after_widget;
281
  }
292
  /* news with thumb */
293
  class SP_News_thmb_Widget extends WP_Widget {
294
 
295
+ function __construct() {
296
 
297
+ $widget_ops = array('classname' => 'SP_News_thmb_Widget', 'description' => __('Displayed Latest News Items in a sidebar with thumbnails', 'sp-news-and-widget') );
298
  $control_ops = array( 'width' => 350, 'height' => 450, 'id_base' => 'sp_news_sthumb_widget' );
299
+ parent::__construct( 'sp_news_sthumb_widget', __('Latest News with thumb', 'sp-news-and-widget'), $widget_ops, $control_ops );
300
  }
301
 
302
  function form($instance) {
312
  $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
313
  $num_items = isset($instance['num_items']) ? absint($instance['num_items']) : 5;
314
  ?>
315
+ <p><label for="<?php echo $this->get_field_id('title'); ?>"> <?php _e( 'Title:', 'sp-news-and-widget' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>
316
+ <p><label for="<?php echo $this->get_field_id('num_items'); ?>"><?php _e( 'Number of Items: ', 'sp-news-and-widget' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('num_items'); ?>" name="<?php echo $this->get_field_name('num_items'); ?>" type="text" value="<?php echo esc_attr($num_items); ?>" /></label></p>
317
  <p>
318
  <input id="<?php echo $this->get_field_id( 'date' ); ?>" name="<?php echo $this->get_field_name( 'date' ); ?>" type="checkbox"<?php checked( $instance['date'], 1 ); ?> />
319
+ <label for="<?php echo $this->get_field_id( 'date' ); ?>"><?php _e( 'Display Date', 'sp-news-and-widget' ); ?></label>
320
  </p>
321
  <p>
322
  <input id="<?php echo $this->get_field_id( 'show_category' ); ?>" name="<?php echo $this->get_field_name( 'show_category' ); ?>" type="checkbox"<?php checked( $instance['show_category'], 1 ); ?> />
323
+ <label for="<?php echo $this->get_field_id( 'show_category' ); ?>"><?php _e( 'Display Category', 'sp-news-and-widget' ); ?></label>
324
  </p>
325
  <p>
326
+ <label for="<?php echo $this->get_field_id( 'category' ); ?>"><?php _e( 'Category:', 'sp-news-and-widget' ); ?></label>
327
  <?php
328
+ $dropdown_args = array( 'taxonomy' => 'news-category', 'class' => 'widefat', 'show_option_all' => __( 'All', 'sp-news-and-widget' ), 'id' => $this->get_field_id( 'category' ), 'name' => $this->get_field_name( 'category' ), 'selected' => $instance['category'] );
329
  wp_dropdown_categories( $dropdown_args );
330
  ?>
331
  </p>
356
  ?>
357
  <h4 class="widget-title"><?php echo $title ?></h4>
358
  <!--visual-columns-->
359
+ <?php
360
+ $no_p = '';
361
+ if($date == "false" && $show_category == "false"){
362
  $no_p = "no_p";
363
  }?>
364
  <div class="recent-news-items <?php echo $no_p;?>">
365
+
366
  <ul>
367
  <?php // setup the query
368
  $news_args = array( 'suppress_filters' => true,
375
  }
376
 
377
  $cust_loop = new WP_Query($news_args);
378
+ global $post;
379
  $post_count = $cust_loop->post_count;
380
  $count = 0;
381
  if ($cust_loop->have_posts()) : while ($cust_loop->have_posts()) : $cust_loop->the_post(); $postcount++;
401
  }
402
  ?> </a></div>
403
  <div class="news_thumb_right">
404
+ <a class="post-title" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
405
+ <?php if($date == "true" || $show_category == "true"){ ?>
406
+ <div class="widget-date-post">
407
+ <?php echo ($date == "true")? get_the_date() : "" ;?>
408
  <?php echo ($date == "true" && $show_category == "true" && $cate_name != '') ? " , " : "";?>
409
+ <?php echo ($show_category == 'true' && $cate_name != '') ? $cate_name : "" ?>
410
+ </div>
411
+ <?php } ?>
412
+ </div>
413
 
414
  </li>
415
  <?php endwhile;
417
  wp_reset_query(); ?>
418
 
419
  </ul>
420
+ </div>
421
  <?php
422
  echo $after_widget;
423
  }