Version Description
Download this release
Release Info
Developer | vaakash |
Plugin | Super RSS Reader |
Version | 4.0 |
Comparing to | |
See all releases |
Code changes from version 3.2 to 4.0
- admin/css/style-widget.css +215 -0
- admin/css/style.css +0 -105
- admin/images/coffee.svg +0 -99
- admin/js/script-widget.js +39 -0
- admin/js/script.js +0 -9
- includes/feed.php +75 -24
- includes/options.php +89 -37
- includes/widget-admin.php +131 -107
- includes/widget.php +13 -5
- public/css/style.css +49 -28
- public/css/style.min.css +1 -1
- public/js/script.js +3 -4
- public/js/script.min.js +1 -6
- readme.txt +69 -31
- super-rss-reader.php +4 -4
admin/css/style-widget.css
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.srr_settings h4{
|
2 |
+
border-bottom: 1px solid #DFDFDF;
|
3 |
+
margin: 15px 0 10px 0;
|
4 |
+
padding: 0 0 10px 0;
|
5 |
+
font-size: 14px;
|
6 |
+
}
|
7 |
+
.srr_settings td {
|
8 |
+
padding: 5px 0;
|
9 |
+
}
|
10 |
+
.srr_small_text{
|
11 |
+
font-size: 11px;
|
12 |
+
color: #666666;
|
13 |
+
}
|
14 |
+
|
15 |
+
.srr_row{
|
16 |
+
display: flex;
|
17 |
+
flex-wrap: nowrap;
|
18 |
+
padding: 10px 0;
|
19 |
+
}
|
20 |
+
.srr_label{
|
21 |
+
width: 60%;
|
22 |
+
padding-right: 15px;
|
23 |
+
box-sizing: border-box;
|
24 |
+
}
|
25 |
+
.srr_label.srr_sm{
|
26 |
+
width: 30%
|
27 |
+
}
|
28 |
+
.srr_label.srr_xsm{
|
29 |
+
width: 20%
|
30 |
+
}
|
31 |
+
.srr_field{
|
32 |
+
flex: 1;
|
33 |
+
}
|
34 |
+
|
35 |
+
.srr_tab_list {
|
36 |
+
display: flex;
|
37 |
+
background: #f7f7f7;
|
38 |
+
margin: 15px -15px;
|
39 |
+
padding: 0 15px;
|
40 |
+
border-top: 1px solid #dfdfdf;
|
41 |
+
}
|
42 |
+
.srr_tab_list li{
|
43 |
+
margin: 0;
|
44 |
+
}
|
45 |
+
.srr_tab_list a{
|
46 |
+
padding: 10px 15px;
|
47 |
+
text-decoration: none;
|
48 |
+
border-bottom: 3px solid transparent;
|
49 |
+
display: inline-block;
|
50 |
+
}
|
51 |
+
.srr_tab_list a.active{
|
52 |
+
border-bottom-color: inherit;
|
53 |
+
}
|
54 |
+
.srr_tab_list a:hover{
|
55 |
+
border-bottom-color: #dfdfdf;
|
56 |
+
}
|
57 |
+
.srr_settings > section{
|
58 |
+
display: none;
|
59 |
+
}
|
60 |
+
.srr_settings > section.active{
|
61 |
+
display: block;
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
.srr_tt{
|
66 |
+
position: relative;
|
67 |
+
display: inline-block;
|
68 |
+
margin-left: 5px;
|
69 |
+
cursor: help;
|
70 |
+
}
|
71 |
+
.srr_tt:hover, .srr_tt:focus{
|
72 |
+
color: #000;
|
73 |
+
}
|
74 |
+
.srr_tt:hover .srr_tt_text, .srr_tt:focus .srr_tt_text{
|
75 |
+
display: block;
|
76 |
+
}
|
77 |
+
.srr_tt_text{
|
78 |
+
display: none;
|
79 |
+
width: 300px;
|
80 |
+
position: absolute;
|
81 |
+
top: 0;
|
82 |
+
left: 30px;
|
83 |
+
}
|
84 |
+
.srr_tt > .srr_tt_text span {
|
85 |
+
background: #333;
|
86 |
+
color: #fff;
|
87 |
+
padding: 5px 10px;
|
88 |
+
border-radius: 3px;
|
89 |
+
box-shadow: 0 0 4px 0px rgb(0 0 0 / 0.5);
|
90 |
+
display: inline-block;
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
.srr_note{
|
95 |
+
border: 1px solid #FFD893;
|
96 |
+
padding: 10px;
|
97 |
+
background: #FFFEDA;
|
98 |
+
margin: 10px 0 0;
|
99 |
+
display: block;
|
100 |
+
border-radius: 3px;
|
101 |
+
}
|
102 |
+
.srr_survey p {
|
103 |
+
border: 1px solid #dfdfdf;
|
104 |
+
padding: 15px;
|
105 |
+
font-size: 12px;
|
106 |
+
background: #fffbe8;
|
107 |
+
margin: 0 -15px;
|
108 |
+
border-width: 1px 0;
|
109 |
+
}
|
110 |
+
.srr_survey p span{
|
111 |
+
background: #ffe660;
|
112 |
+
padding: 2px 5px;
|
113 |
+
border-radius: 3px;
|
114 |
+
margin: 0 5px 0 0;
|
115 |
+
}
|
116 |
+
.srr_survey .button-primary{
|
117 |
+
float: right;
|
118 |
+
margin: 10px 0 0 10px;
|
119 |
+
}
|
120 |
+
.srr_info{
|
121 |
+
border: 1px solid #dfdfdf;
|
122 |
+
margin: 15px -15px;
|
123 |
+
padding: 10px 15px;
|
124 |
+
background: #fafafa;
|
125 |
+
border-width: 0 0 1px 0;
|
126 |
+
}
|
127 |
+
.srr_info p{
|
128 |
+
margin: 0;
|
129 |
+
}
|
130 |
+
.srr_info a{
|
131 |
+
text-decoration: none;
|
132 |
+
}
|
133 |
+
.srr_info a:hover {
|
134 |
+
text-decoration: underline;
|
135 |
+
}
|
136 |
+
|
137 |
+
.srr_pro {
|
138 |
+
border: 1px solid #ece9a5;
|
139 |
+
margin: 20px -15px -16px -15px;
|
140 |
+
padding: 10px 15px;
|
141 |
+
background: #fffdf0;
|
142 |
+
border-width: 1px 0 2px 0;
|
143 |
+
color: #011936;
|
144 |
+
}
|
145 |
+
.srr_pro_label {
|
146 |
+
background: gold;
|
147 |
+
font-weight: bold;
|
148 |
+
font-style: italic;
|
149 |
+
padding: 5px 7px;
|
150 |
+
border-radius: 5px;
|
151 |
+
display: inline-block;
|
152 |
+
margin: 0.25em 10px 0 0;
|
153 |
+
}
|
154 |
+
.srr_pro_intro {
|
155 |
+
display: flex;
|
156 |
+
flex-wrap: nowrap;
|
157 |
+
cursor: pointer;
|
158 |
+
margin: -10px -15px;
|
159 |
+
padding: 10px 15px;
|
160 |
+
}
|
161 |
+
.srr_pro_intro:hover {
|
162 |
+
box-shadow: 0 0 4px 0px #FFC107;
|
163 |
+
position: relative;
|
164 |
+
}
|
165 |
+
.srr_pro_intro > p {
|
166 |
+
margin: 0 0 0 5px;
|
167 |
+
flex-basis: 100%;
|
168 |
+
}
|
169 |
+
.srr_pro_intro > p span{
|
170 |
+
font-style: italic;
|
171 |
+
}
|
172 |
+
.srr_pro_intro.srr_pro_expand .srr_pro_more{
|
173 |
+
transform: rotate(180deg);
|
174 |
+
}
|
175 |
+
.srr_pro_intro.srr_pro_expand {
|
176 |
+
border-bottom: 1px dashed #ece9a5;
|
177 |
+
}
|
178 |
+
|
179 |
+
.srr_pro_details {
|
180 |
+
display: none;
|
181 |
+
margin: 0 0 0 35px;
|
182 |
+
padding-top: 10px;
|
183 |
+
}
|
184 |
+
.srr_pro_features {
|
185 |
+
margin: 20px 0;
|
186 |
+
}
|
187 |
+
.srr_pro_features li {
|
188 |
+
margin: 0 0 15px 20px;
|
189 |
+
position: relative;
|
190 |
+
font-weight: bold;
|
191 |
+
}
|
192 |
+
.srr_pro_features li:before{
|
193 |
+
font-family: Dashicons;
|
194 |
+
content: "\f147";
|
195 |
+
font-size: 20px;
|
196 |
+
position: absolute;
|
197 |
+
top: -4px;
|
198 |
+
left: -25px;
|
199 |
+
color: lightseagreen;
|
200 |
+
}
|
201 |
+
.srr_pro_features li span{
|
202 |
+
font-weight: normal;
|
203 |
+
font-style: italic;
|
204 |
+
}
|
205 |
+
.srr_pro_details .button-primary{
|
206 |
+
background: #009688;
|
207 |
+
border-color: #026f65;
|
208 |
+
margin-right: 5px;
|
209 |
+
}
|
210 |
+
|
211 |
+
div[id*="super_rss_reader"] .widget-title h3 {
|
212 |
+
background-image: url(../images/super-rss-reader-sm.png);
|
213 |
+
background-position: right;
|
214 |
+
background-repeat: no-repeat;
|
215 |
+
}
|
admin/css/style.css
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
.srr_settings h4{
|
2 |
-
border-bottom: 1px solid #DFDFDF;
|
3 |
-
margin: 15px 0 10px 0;
|
4 |
-
padding: 0 0 10px 0;
|
5 |
-
font-size: 14px;
|
6 |
-
}
|
7 |
-
.srr_settings td {
|
8 |
-
padding: 5px 0;
|
9 |
-
}
|
10 |
-
.srr_small_text{
|
11 |
-
font-size: 11px;
|
12 |
-
color: #666666;
|
13 |
-
}
|
14 |
-
|
15 |
-
.srr_row{
|
16 |
-
display: flex;
|
17 |
-
flex-wrap: nowrap;
|
18 |
-
padding: 10px 0;
|
19 |
-
}
|
20 |
-
.srr_label{
|
21 |
-
width: 60%;
|
22 |
-
padding-right: 15px;
|
23 |
-
box-sizing: border-box;
|
24 |
-
}
|
25 |
-
.srr_label.srr_sm{
|
26 |
-
width: 30%
|
27 |
-
}
|
28 |
-
.srr_label.srr_xsm{
|
29 |
-
width: 20%
|
30 |
-
}
|
31 |
-
.srr_field{
|
32 |
-
flex: 1;
|
33 |
-
}
|
34 |
-
|
35 |
-
.srr_coffee {
|
36 |
-
border: 1px solid #dfdfdf;
|
37 |
-
padding: 10px 240px 10px 60px;
|
38 |
-
background: #f9fff7 url(../images/coffee.svg) 12px no-repeat;
|
39 |
-
background-size: 7%;
|
40 |
-
position: relative;
|
41 |
-
margin: 20px -15px -1px -15px;
|
42 |
-
border-width: 1px 0;
|
43 |
-
}
|
44 |
-
.srr_coffee p{
|
45 |
-
margin: 0;
|
46 |
-
font-size: 11px;
|
47 |
-
}
|
48 |
-
.srr_coffee_wrap{
|
49 |
-
position: absolute;
|
50 |
-
top: 11px;
|
51 |
-
right: 15px;
|
52 |
-
}
|
53 |
-
.srr_coffee_wrap p{
|
54 |
-
display: inline-block;
|
55 |
-
}
|
56 |
-
.srr_coffee_btn{
|
57 |
-
margin-left: 5px !important;
|
58 |
-
}
|
59 |
-
.srr_note{
|
60 |
-
border: 1px solid #FFD893;
|
61 |
-
padding: 10px;
|
62 |
-
background: #FFFEDA;
|
63 |
-
margin: 10px 0 0;
|
64 |
-
display: block;
|
65 |
-
border-radius: 3px;
|
66 |
-
}
|
67 |
-
.srr_survey p {
|
68 |
-
border: 1px solid #dfdfdf;
|
69 |
-
padding: 15px;
|
70 |
-
font-size: 12px;
|
71 |
-
background: #fffbe8;
|
72 |
-
margin: 0 -15px;
|
73 |
-
border-width: 1px 0;
|
74 |
-
}
|
75 |
-
.srr_survey p span{
|
76 |
-
background: #ffe660;
|
77 |
-
padding: 2px 5px;
|
78 |
-
border-radius: 3px;
|
79 |
-
margin: 0 5px 0 0;
|
80 |
-
}
|
81 |
-
.srr_survey .button-primary{
|
82 |
-
float: right;
|
83 |
-
margin: 10px 0 0 10px;
|
84 |
-
}
|
85 |
-
.srr_info{
|
86 |
-
border-bottom: 1px solid #dfdfdf;
|
87 |
-
margin: 0px -15px 20px -15px;
|
88 |
-
padding: 10px 15px;
|
89 |
-
background: #fafafa;
|
90 |
-
}
|
91 |
-
.srr_info p{
|
92 |
-
margin: 0;
|
93 |
-
}
|
94 |
-
.srr_info a{
|
95 |
-
text-decoration: none;
|
96 |
-
}
|
97 |
-
.srr_info a:hover {
|
98 |
-
text-decoration: underline;
|
99 |
-
}
|
100 |
-
|
101 |
-
#available-widgets [id*="super_rss_reader"] .widget-title h3 {
|
102 |
-
background-image: url(../images/super-rss-reader-sm.png);
|
103 |
-
background-position: 94%;
|
104 |
-
background-repeat: no-repeat;
|
105 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/images/coffee.svg
DELETED
@@ -1,99 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
-
<svg
|
3 |
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
4 |
-
xmlns:cc="http://creativecommons.org/ns#"
|
5 |
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
6 |
-
xmlns:svg="http://www.w3.org/2000/svg"
|
7 |
-
xmlns="http://www.w3.org/2000/svg"
|
8 |
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
9 |
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
10 |
-
height="128"
|
11 |
-
version="1.1"
|
12 |
-
viewBox="0 0 128 128"
|
13 |
-
width="128"
|
14 |
-
id="svg4495"
|
15 |
-
sodipodi:docname="1494109658_food-drink-cup-coffee-tea-drink-outline-stroke.svg"
|
16 |
-
inkscape:version="0.92.0 r15299">
|
17 |
-
<metadata
|
18 |
-
id="metadata4499">
|
19 |
-
<rdf:RDF>
|
20 |
-
<cc:Work
|
21 |
-
rdf:about="">
|
22 |
-
<dc:format>image/svg+xml</dc:format>
|
23 |
-
<dc:type
|
24 |
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
25 |
-
<dc:title></dc:title>
|
26 |
-
</cc:Work>
|
27 |
-
</rdf:RDF>
|
28 |
-
</metadata>
|
29 |
-
<sodipodi:namedview
|
30 |
-
pagecolor="#ffffff"
|
31 |
-
bordercolor="#666666"
|
32 |
-
borderopacity="1"
|
33 |
-
objecttolerance="10"
|
34 |
-
gridtolerance="10"
|
35 |
-
guidetolerance="10"
|
36 |
-
inkscape:pageopacity="0"
|
37 |
-
inkscape:pageshadow="2"
|
38 |
-
inkscape:window-width="1920"
|
39 |
-
inkscape:window-height="1013"
|
40 |
-
id="namedview4497"
|
41 |
-
showgrid="false"
|
42 |
-
inkscape:zoom="2.2265625"
|
43 |
-
inkscape:cx="60.701019"
|
44 |
-
inkscape:cy="100.20618"
|
45 |
-
inkscape:window-x="-9"
|
46 |
-
inkscape:window-y="-9"
|
47 |
-
inkscape:window-maximized="1"
|
48 |
-
inkscape:current-layer="Layer_2" />
|
49 |
-
<desc
|
50 |
-
id="desc4487" />
|
51 |
-
<defs
|
52 |
-
id="defs4489" />
|
53 |
-
<g
|
54 |
-
id="miu"
|
55 |
-
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
|
56 |
-
transform="matrix(5.5327011,0,0,5.5327011,-1.3569238,10.877533)">
|
57 |
-
<g
|
58 |
-
id="Artboard-1"
|
59 |
-
transform="translate(-503,-515)">
|
60 |
-
<g
|
61 |
-
id="slice"
|
62 |
-
transform="translate(215,119)" />
|
63 |
-
<path
|
64 |
-
d="m 521.02703,523.35506 c 0.009,-0.39125 0.004,-0.77169 -0.0131,-1.1361 C 521.00824,522.09555 521,521.50003 521,521.5 v 0 c 0,-1.28644 -2.85422,-2 -6.5,-2 -3.64578,0 -6.5,0.71356 -6.5,2 0,10e-6 -0.008,0.59555 -0.014,0.71896 -0.0659,1.41455 0.0458,3.07056 0.4816,4.66302 0.86614,3.1649 2.79873,5.11802 6.03238,5.11802 2.27915,0 3.91196,-0.97026 4.98059,-2.65121 2.90061,-0.0524 6.22639,-2.61697 5.22565,-4.88902 -0.40287,-0.91465 -1.1392,-1.36254 -2.05478,-1.39971 -0.50445,-0.0205 -1.02662,0.0826 -1.542,0.26513 -0.0281,0.01 -0.0556,0.0199 -0.0824,0.0299 z m -0.0645,1.11607 c -0.0739,0.79385 -0.21104,1.61037 -0.4301,2.41085 -0.138,0.50424 -0.30306,0.97772 -0.49615,1.41744 2.14097,-0.32376 4.32372,-2.145 3.75485,-3.43656 -0.24026,-0.54547 -0.62779,-0.7812 -1.18019,-0.80363 -0.35902,-0.0146 -0.76224,0.065 -1.16757,0.20859 -0.21942,0.0777 -0.38848,0.1545 -0.48084,0.20331 z m -0.9347,-1.83112 c 0.0265,1.23414 -0.094,2.64091 -0.45994,3.97801 C 518.80907,529.39062 517.21661,531 514.5,531 c -2.71661,0 -4.30907,-1.60938 -5.06784,-4.38198 -0.36593,-1.3371 -0.48646,-2.74387 -0.45994,-3.97801 1.13669,0.56058 3.16617,0.85999 5.52778,0.85999 2.36161,0 4.39109,-0.29941 5.52778,-0.85999 v 0 z M 509,521.5 c 0,-0.37041 2.51836,-1 5.5,-1 2.98164,0 5.5,0.62959 5.5,1 0,0.37041 -2.51836,1 -5.5,1 -2.98164,0 -5.5,-0.62959 -5.5,-1 z m -4.5,11.5 c 0,0 -0.5,0 -0.5,0.5 0,0.5 0.5,0.5 0.5,0.5 h 21 c 0,0 0.5,0 0.5,-0.5 0,-0.5 -0.5,-0.5 -0.5,-0.5 z"
|
65 |
-
id="food-drink-cup-coffee-tea-drink-outline-stroke"
|
66 |
-
inkscape:connector-curvature="0"
|
67 |
-
style="fill:#000000" />
|
68 |
-
</g>
|
69 |
-
</g>
|
70 |
-
<g
|
71 |
-
id="g4561"
|
72 |
-
transform="translate(180.23158,1.9807019)">
|
73 |
-
<g
|
74 |
-
id="Layer_2"
|
75 |
-
transform="translate(10.329825,-94.315789)">
|
76 |
-
<g
|
77 |
-
id="g4534"
|
78 |
-
transform="matrix(2.4713604,0,0,2.4713604,-210.98683,57.600819)">
|
79 |
-
<path
|
80 |
-
id="path4532"
|
81 |
-
d="m 33.114,51.204 v -1.315 c -0.927,-0.041 -1.827,-0.29 -2.353,-0.595 l 0.415,-1.619 c 0.582,0.318 1.398,0.608 2.297,0.608 0.789,0 1.329,-0.304 1.329,-0.857 0,-0.525 -0.443,-0.857 -1.467,-1.204 -1.481,-0.498 -2.491,-1.19 -2.491,-2.532 0,-1.219 0.858,-2.174 2.339,-2.464 V 39.91 h 1.356 v 1.219 c 0.927,0.041 1.55,0.235 2.007,0.457 l -0.401,1.563 c -0.36,-0.152 -0.997,-0.471 -1.993,-0.471 -0.899,0 -1.19,0.388 -1.19,0.774 0,0.457 0.484,0.748 1.661,1.191 1.647,0.58 2.311,1.342 2.311,2.588 0,1.231 -0.872,2.283 -2.463,2.561 v 1.411 h -1.357 z"
|
82 |
-
inkscape:connector-curvature="0"
|
83 |
-
style="fill:#92278f" />
|
84 |
-
</g>
|
85 |
-
<path
|
86 |
-
id="path4528-3"
|
87 |
-
d="m -133.27695,122.08016 c 4.05154,0 8.24277,-3.06272 8.24277,-8.18852 0,-2.81586 -1.89351,-4.22515 -3.41673,-5.35909 -1.48389,-1.10275 -2.32214,-1.7945 -2.32214,-3.18209 0,-1.45269 0.95218,-2.16073 2.50389,-3.19294 1.44184,-0.96032 3.23498,-2.15259 3.23498,-4.492359 0,-0.750083 -0.60765,-1.356389 -1.35638,-1.356389 -0.74873,0 -1.35639,0.606306 -1.35639,1.356389 0,0.802982 -0.61716,1.296708 -2.02508,2.232616 -1.56664,1.044423 -3.7138,2.471343 -3.7138,5.452683 0,2.81586 1.89351,4.22515 3.41674,5.35909 1.48389,1.10275 2.32214,1.79451 2.32214,3.18209 0,3.55645 -2.84841,5.47574 -5.53,5.47574 -0.74872,0 -1.35638,0.60631 -1.35638,1.35639 0,0.75009 0.60766,1.35639 1.35638,1.35639 z"
|
88 |
-
inkscape:connector-curvature="0"
|
89 |
-
style="fill:#ffcf06;fill-opacity:1;stroke-width:1.35638893" />
|
90 |
-
<path
|
91 |
-
id="path4530-4"
|
92 |
-
d="m -125.24305,122.08016 c 4.05153,0 8.24277,-3.06272 8.24277,-8.18852 0,-2.81586 -1.89352,-4.22515 -3.41675,-5.35909 -1.48389,-1.10275 -2.32214,-1.7945 -2.32214,-3.18209 0,-1.45269 0.95219,-2.16073 2.5039,-3.19294 1.44184,-0.96032 3.23499,-2.15259 3.23499,-4.492359 0,-0.750083 -0.60766,-1.356389 -1.35638,-1.356389 -0.74873,0 -1.3564,0.606306 -1.3564,1.356389 0,0.802982 -0.61716,1.296708 -2.02509,2.232616 -1.56662,1.044423 -3.71379,2.471343 -3.71379,5.452683 0,2.81586 1.89352,4.22515 3.41674,5.35909 1.48254,1.1041 2.32214,1.79451 2.32214,3.18209 0,3.55645 -2.84977,5.47574 -5.52999,5.47574 -0.74873,0 -1.3564,0.60631 -1.3564,1.35639 0,0.75009 0.60767,1.35639 1.3564,1.35639 z"
|
93 |
-
inkscape:connector-curvature="0"
|
94 |
-
style="fill:#ffcf06;fill-opacity:1;stroke-width:1.35638893" />
|
95 |
-
</g>
|
96 |
-
<g
|
97 |
-
id="Layer_3" />
|
98 |
-
</g>
|
99 |
-
</svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/script-widget.js
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($){
|
2 |
+
$(document).ready(function(){
|
3 |
+
|
4 |
+
$(document).on('click', '.srr_tab_list a', function(e){
|
5 |
+
e.preventDefault();
|
6 |
+
var $settings = $(this).closest('.srr_settings');
|
7 |
+
var id = $(this).data('tab');
|
8 |
+
$settings.find('.active').removeClass('active');
|
9 |
+
$(this).addClass('active');
|
10 |
+
$settings.find('section[data-tab-id="' + id + '"]').addClass('active');
|
11 |
+
});
|
12 |
+
|
13 |
+
$(document).on('mouseenter', '.srr_pro_intro', function(){
|
14 |
+
if( !$(this).hasClass('srr_pro_expand') ){
|
15 |
+
window.srr_pro_expand = window.setTimeout(function($ele) {
|
16 |
+
window.srr_pro_expand = null;
|
17 |
+
$ele.closest('.srr_pro').find('.srr_pro_details').slideDown();
|
18 |
+
$ele.addClass('srr_pro_expand');
|
19 |
+
}, 1500, $(this));
|
20 |
+
}
|
21 |
+
});
|
22 |
+
|
23 |
+
$(document).on('mouseleave', '.srr_pro_intro', function(){
|
24 |
+
clearTimeout(window.srr_pro_expand);
|
25 |
+
});
|
26 |
+
|
27 |
+
$(document).on('click', '.srr_pro_intro', function() {
|
28 |
+
var $details = $(this).closest('.srr_pro').find('.srr_pro_details');
|
29 |
+
if( !$(this).hasClass('srr_pro_expand') ){
|
30 |
+
$details.slideDown();
|
31 |
+
$(this).addClass('srr_pro_expand');
|
32 |
+
}else{
|
33 |
+
$details.slideUp();
|
34 |
+
$(this).removeClass('srr_pro_expand');
|
35 |
+
}
|
36 |
+
});
|
37 |
+
|
38 |
+
});
|
39 |
+
}(jQuery))
|
admin/js/script.js
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
(function($){
|
2 |
-
$(document).ready(function(){
|
3 |
-
$(document).on('change', '.srr_coffee_amt', function(){
|
4 |
-
var $parent = $(this).closest('.srr_coffee_wrap');
|
5 |
-
var $btn = $parent.find('.srr_coffee_btn');
|
6 |
-
$btn.attr('href', $btn.data('link') + $(this).val());
|
7 |
-
});
|
8 |
-
});
|
9 |
-
}(jQuery))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/feed.php
CHANGED
@@ -12,7 +12,7 @@ class SRR_Feed{
|
|
12 |
|
13 |
public function __construct( $options ){
|
14 |
|
15 |
-
$this->options = wp_parse_args( $options, SRR_Options::
|
16 |
|
17 |
}
|
18 |
|
@@ -32,7 +32,9 @@ class SRR_Feed{
|
|
32 |
$strip_title = intval( $this->options['strip_title'] );
|
33 |
$read_more = htmlspecialchars( $this->options['read_more'] );
|
34 |
$rich_desc = intval( $this->options['rich_desc'] );
|
35 |
-
|
|
|
|
|
36 |
$color_theme = stripslashes( $this->options['color_style'] );
|
37 |
$display_type = stripslashes( $this->options['display_type'] );
|
38 |
$visible_items = intval( $this->options['visible_items'] );
|
@@ -52,6 +54,10 @@ class SRR_Feed{
|
|
52 |
$feeds = array();
|
53 |
$html = '';
|
54 |
|
|
|
|
|
|
|
|
|
55 |
// Fetch the feed
|
56 |
for( $i=0; $i < $url_count; $i++ ){
|
57 |
$feed_url = trim( $urls[$i] );
|
@@ -104,17 +110,13 @@ class SRR_Feed{
|
|
104 |
$max_items = $feed->get_item_quantity( $count );
|
105 |
$feed_items = $feed->get_items( 0, $max_items );
|
106 |
|
107 |
-
$classes = array( 'srr-wrap', 'srr-style-' . $color_theme );
|
108 |
-
if( $display_type == 'vertical_ticker' ) array_push( $classes, 'srr-vticker' );
|
109 |
-
$class = implode( ' ', $classes );
|
110 |
-
|
111 |
// Outer wrap start
|
112 |
$html .= '<div class="' . $class . '" data-visible="' . $visible_items . '" data-speed="' . $ticker_speed . '" data-id="srr-tab-' . $id . '">';
|
113 |
$html .= '<div>';
|
114 |
|
115 |
// Check feed items
|
116 |
if ( $max_items == 0 ){
|
117 |
-
$html .= '<div>No items
|
118 |
}else{
|
119 |
$j=1;
|
120 |
// Loop through each feed item
|
@@ -141,7 +143,7 @@ class SRR_Feed{
|
|
141 |
$new_tab = $open_newtab ? ' target="_blank"' : '';
|
142 |
|
143 |
// Add no follow attribute
|
144 |
-
$no_follow = $add_nofollow ? ' rel="nofollow"' : '';
|
145 |
|
146 |
// Date
|
147 |
$date = $item->get_date( 'j F Y' );
|
@@ -149,10 +151,18 @@ class SRR_Feed{
|
|
149 |
|
150 |
// Thumbnail
|
151 |
$thumb = '';
|
152 |
-
if ( $show_thumb == 1
|
153 |
-
$thumb_url = $
|
154 |
if( !empty( $thumb_url ) ){
|
155 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
}
|
158 |
|
@@ -168,7 +178,7 @@ class SRR_Feed{
|
|
168 |
|
169 |
if( $strip_desc != 0 ){
|
170 |
$desc = wp_trim_words( $desc, $strip_desc );
|
171 |
-
$read_more_link = !empty( $read_more ) ? ' <a href="' . $link . '" title="Read more"' . $new_tab . $no_follow . '>' . $read_more . '</a>' : '';
|
172 |
|
173 |
if ( '[...]' == substr( $desc, -5 ) ){
|
174 |
$desc = substr( $desc, 0, -5 );
|
@@ -192,18 +202,23 @@ class SRR_Feed{
|
|
192 |
}
|
193 |
|
194 |
// Display the feed items
|
195 |
-
$html .= '<div class="srr-item ' . ( ( $j%2 == 0 ) ? '
|
|
|
|
|
196 |
$html .= '<div class="srr-title"><a href="' . $link . '"' . $new_tab . $no_follow . ' title="' . $title_full . '">' . $title . '</a></div>';
|
197 |
|
198 |
-
|
199 |
-
if( $show_date
|
200 |
-
$html .= '<
|
201 |
-
|
|
|
|
|
202 |
|
203 |
-
|
204 |
-
|
|
|
|
|
205 |
}
|
206 |
-
$html .= '</div>';
|
207 |
|
208 |
if ( $show_thumb ){
|
209 |
$html .= $thumb;
|
@@ -212,11 +227,11 @@ class SRR_Feed{
|
|
212 |
if( $show_desc ){
|
213 |
$html .= '<div class="srr-summary srr-clearfix">';
|
214 |
$html .= $rich_desc ? $desc : ( '<p>' . $desc . '</p>' );
|
215 |
-
$html .= '</div>';
|
216 |
}
|
217 |
|
218 |
-
$html .= '</div>';
|
219 |
-
// End
|
220 |
|
221 |
$j++;
|
222 |
}
|
@@ -225,17 +240,53 @@ class SRR_Feed{
|
|
225 |
// Outer wrap end
|
226 |
$html .= '</div></div>' ;
|
227 |
|
228 |
-
if
|
229 |
$feed->__destruct();
|
230 |
|
231 |
unset( $feed );
|
232 |
|
233 |
}
|
234 |
|
|
|
|
|
235 |
return $html;
|
236 |
|
237 |
}
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
|
241 |
?>
|
12 |
|
13 |
public function __construct( $options ){
|
14 |
|
15 |
+
$this->options = wp_parse_args( $options, SRR_Options::defaults() );
|
16 |
|
17 |
}
|
18 |
|
32 |
$strip_title = intval( $this->options['strip_title'] );
|
33 |
$read_more = htmlspecialchars( $this->options['read_more'] );
|
34 |
$rich_desc = intval( $this->options['rich_desc'] );
|
35 |
+
$thumbnail_position = htmlspecialchars( $this->options['thumbnail_position'] );
|
36 |
+
$thumbnail_size = htmlspecialchars( $this->options['thumbnail_size'] );
|
37 |
+
|
38 |
$color_theme = stripslashes( $this->options['color_style'] );
|
39 |
$display_type = stripslashes( $this->options['display_type'] );
|
40 |
$visible_items = intval( $this->options['visible_items'] );
|
54 |
$feeds = array();
|
55 |
$html = '';
|
56 |
|
57 |
+
$classes = array( 'srr-wrap', 'srr-style-' . $color_theme );
|
58 |
+
if( $display_type == 'vertical_ticker' ) array_push( $classes, 'srr-vticker' );
|
59 |
+
$class = implode( ' ', $classes );
|
60 |
+
|
61 |
// Fetch the feed
|
62 |
for( $i=0; $i < $url_count; $i++ ){
|
63 |
$feed_url = trim( $urls[$i] );
|
110 |
$max_items = $feed->get_item_quantity( $count );
|
111 |
$feed_items = $feed->get_items( 0, $max_items );
|
112 |
|
|
|
|
|
|
|
|
|
113 |
// Outer wrap start
|
114 |
$html .= '<div class="' . $class . '" data-visible="' . $visible_items . '" data-speed="' . $ticker_speed . '" data-id="srr-tab-' . $id . '">';
|
115 |
$html .= '<div>';
|
116 |
|
117 |
// Check feed items
|
118 |
if ( $max_items == 0 ){
|
119 |
+
$html .= '<div>' . __( 'No items', 'super-rss-reader' ) . '</div>';
|
120 |
}else{
|
121 |
$j=1;
|
122 |
// Loop through each feed item
|
143 |
$new_tab = $open_newtab ? ' target="_blank"' : '';
|
144 |
|
145 |
// Add no follow attribute
|
146 |
+
$no_follow = $add_nofollow ? ' rel="nofollow noopener noreferrer"' : '';
|
147 |
|
148 |
// Date
|
149 |
$date = $item->get_date( 'j F Y' );
|
151 |
|
152 |
// Thumbnail
|
153 |
$thumb = '';
|
154 |
+
if ( $show_thumb == 1 ){
|
155 |
+
$thumb_url = $this->get_thumbnail_url( $item );
|
156 |
if( !empty( $thumb_url ) ){
|
157 |
+
$thumb_styles = array(
|
158 |
+
'width' => $thumbnail_size,
|
159 |
+
'height' => $thumbnail_size
|
160 |
+
);
|
161 |
+
$thumb_style = '';
|
162 |
+
foreach( $thumb_styles as $prop => $val ){
|
163 |
+
$thumb_style .= "$prop:$val;";
|
164 |
+
}
|
165 |
+
$thumb = '<a href="' . $link . '" class="srr-thumb srr-thumb-' . $thumbnail_position . '" style="' . $thumb_style . '" ' . $new_tab . $no_follow . '><img src="' . $thumb_url . '" alt="' . $title_full . '" align="left" /></a>';
|
166 |
}
|
167 |
}
|
168 |
|
178 |
|
179 |
if( $strip_desc != 0 ){
|
180 |
$desc = wp_trim_words( $desc, $strip_desc );
|
181 |
+
$read_more_link = !empty( $read_more ) ? ' <a href="' . $link . '" title="' . __( 'Read more', 'super-rss-reader' ) . '"' . $new_tab . $no_follow . ' class="srr-read-more">' . $read_more . '</a>' : '';
|
182 |
|
183 |
if ( '[...]' == substr( $desc, -5 ) ){
|
184 |
$desc = substr( $desc, 0, -5 );
|
202 |
}
|
203 |
|
204 |
// Display the feed items
|
205 |
+
$html .= '<div class="srr-item ' . ( ( $j%2 == 0 ) ? 'srr-stripe' : '') . '">';
|
206 |
+
$html .= '<div class="srr-clearfix">';
|
207 |
+
|
208 |
$html .= '<div class="srr-title"><a href="' . $link . '"' . $new_tab . $no_follow . ' title="' . $title_full . '">' . $title . '</a></div>';
|
209 |
|
210 |
+
// Metadata
|
211 |
+
if( $show_date || $show_author ){
|
212 |
+
$html .= '<div class="srr-meta">';
|
213 |
+
if( $show_date && !empty( $date ) ){
|
214 |
+
$html .= '<time class="srr-date" title="' . $date_full . '">' . $date . '</time>';
|
215 |
+
}
|
216 |
|
217 |
+
if( $show_author && !empty( $author ) ){
|
218 |
+
$html .= ' - <cite class="srr-author">' . $author . '</cite>';
|
219 |
+
}
|
220 |
+
$html .= '</div>'; // End meta
|
221 |
}
|
|
|
222 |
|
223 |
if ( $show_thumb ){
|
224 |
$html .= $thumb;
|
227 |
if( $show_desc ){
|
228 |
$html .= '<div class="srr-summary srr-clearfix">';
|
229 |
$html .= $rich_desc ? $desc : ( '<p>' . $desc . '</p>' );
|
230 |
+
$html .= '</div>'; // End summary
|
231 |
}
|
232 |
|
233 |
+
$html .= '</div>'; // End item inner clearfix
|
234 |
+
$html .= '</div>'; // End feed item
|
235 |
|
236 |
$j++;
|
237 |
}
|
240 |
// Outer wrap end
|
241 |
$html .= '</div></div>' ;
|
242 |
|
243 |
+
if( !is_wp_error( $feed ) )
|
244 |
$feed->__destruct();
|
245 |
|
246 |
unset( $feed );
|
247 |
|
248 |
}
|
249 |
|
250 |
+
$html = '<div class="srr-main">' . $html . '</div>';
|
251 |
+
|
252 |
return $html;
|
253 |
|
254 |
}
|
255 |
|
256 |
+
function get_thumbnail_url( $item ){
|
257 |
+
|
258 |
+
// Try to get from the item enclosure
|
259 |
+
$enclosure = $item->get_enclosure();
|
260 |
+
|
261 |
+
if ( $enclosure->get_thumbnail() ) {
|
262 |
+
return $enclosure->get_thumbnail();
|
263 |
+
}
|
264 |
+
|
265 |
+
if ( $enclosure->get_link() ) {
|
266 |
+
return $enclosure->get_link();
|
267 |
+
}
|
268 |
+
|
269 |
+
// Try to get from item content
|
270 |
+
$content = $item->get_content();
|
271 |
+
|
272 |
+
preg_match_all('~<img.*?src=["\']+(.*?)["\']+~', $content, $urls);
|
273 |
+
$urls = $urls[1];
|
274 |
+
|
275 |
+
if( !empty( $urls ) ){
|
276 |
+
return $urls[0];
|
277 |
+
}
|
278 |
+
|
279 |
+
// Try to get the image tag finally if available
|
280 |
+
$image = $item->get_item_tags( '', 'image' );
|
281 |
+
|
282 |
+
if( isset( $image[0]['data'] ) ){
|
283 |
+
return $image[0]['data'];
|
284 |
+
}
|
285 |
+
|
286 |
+
return '';
|
287 |
+
|
288 |
+
}
|
289 |
+
|
290 |
}
|
291 |
|
292 |
?>
|
includes/options.php
CHANGED
@@ -10,97 +10,132 @@ class SRR_Options{
|
|
10 |
|
11 |
public static function options(){
|
12 |
|
13 |
-
return array(
|
14 |
'urls' => array(
|
15 |
'default' => '',
|
16 |
-
'description' => __( 'The URLs to display RSS feed for. Multiple RSS feed URLs can be separated by a new line or comma' )
|
17 |
),
|
18 |
'tab_titles' => array(
|
19 |
'default' => '',
|
20 |
-
'description' => __( 'The title of the tab for the respective RSS feed.' )
|
21 |
),
|
22 |
'count' => array(
|
23 |
'default' => 5,
|
24 |
-
'description' => __( 'The total number of feed items to fetch.' )
|
25 |
),
|
26 |
'show_date' => array(
|
27 |
'default' => 0,
|
28 |
-
'description' => __( 'Display the date of the feed item' )
|
|
|
|
|
|
|
|
|
29 |
),
|
30 |
'show_desc' => array(
|
31 |
'default' => 1,
|
32 |
-
'description' => __( 'Display the description/excerpt of the feed item' )
|
|
|
|
|
|
|
|
|
33 |
),
|
34 |
'show_author' => array(
|
35 |
'default' => 0,
|
36 |
-
'description' => __( 'Display the author of the feed item' )
|
|
|
|
|
|
|
|
|
37 |
),
|
38 |
'show_thumb' => array(
|
39 |
'default' => 1,
|
40 |
-
'description' => __( 'Display the thumbnail of the feed item' )
|
|
|
|
|
|
|
|
|
41 |
),
|
42 |
'strip_desc' => array(
|
43 |
'default' => 30,
|
44 |
-
'description' => __( 'Trim the description to certain number of words' )
|
45 |
),
|
46 |
'strip_title' => array(
|
47 |
'default' => 0,
|
48 |
-
'description' => __( 'Trim the title text to certain number of words.' )
|
49 |
),
|
50 |
'read_more' => array(
|
51 |
'default' => '[...]',
|
52 |
-
'description' => __( 'The read more text if the description is
|
53 |
),
|
54 |
'rich_desc' => array(
|
55 |
'default' => 0,
|
56 |
-
'description' => __( 'Display rich description with all the formatting
|
|
|
|
|
|
|
|
|
57 |
),
|
58 |
'add_nofollow' => array(
|
59 |
'default' => 1,
|
60 |
-
'description' => __( 'Add "nofollow" attribute to feed links' )
|
|
|
|
|
|
|
|
|
61 |
),
|
62 |
'open_newtab' => array(
|
63 |
'default' => 1,
|
64 |
-
'description' => __( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
),
|
66 |
'color_style' => array(
|
67 |
'default' => 'none',
|
68 |
-
'description' => __( 'The style of the feed display' )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
),
|
70 |
'display_type' => array(
|
71 |
'default' => 'vertical_ticker',
|
72 |
-
'description' => __( 'The type of feed display mode.' )
|
|
|
|
|
|
|
|
|
73 |
),
|
74 |
'visible_items' => array(
|
75 |
'default' => 5,
|
76 |
-
'description' => __( 'The number of feed items to be visible when ticker is enabled.' )
|
77 |
),
|
78 |
'ticker_speed' => array(
|
79 |
'default' => 4,
|
80 |
-
'description' => __( 'The speed of the ticker animation in seconds' )
|
81 |
),
|
82 |
-
);
|
83 |
|
84 |
}
|
85 |
|
86 |
-
public static function
|
87 |
-
return array(
|
88 |
-
'No style' => 'none',
|
89 |
-
'Grey' => 'grey',
|
90 |
-
'Dark' => 'dark',
|
91 |
-
'Orange' => 'orange',
|
92 |
-
'Simple modern' => 'smodern'
|
93 |
-
);
|
94 |
-
}
|
95 |
-
|
96 |
-
public static function display_types(){
|
97 |
-
return array(
|
98 |
-
'normal' => 'Only feed list',
|
99 |
-
'vertical_ticker' => 'Feed list + Ticker',
|
100 |
-
);
|
101 |
-
}
|
102 |
-
|
103 |
-
public static function default_options(){
|
104 |
|
105 |
$defaults = array();
|
106 |
$all_options = self::options();
|
@@ -113,6 +148,23 @@ class SRR_Options{
|
|
113 |
|
114 |
}
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
117 |
|
118 |
?>
|
10 |
|
11 |
public static function options(){
|
12 |
|
13 |
+
return apply_filters( 'srr_mod_options', array(
|
14 |
'urls' => array(
|
15 |
'default' => '',
|
16 |
+
'description' => __( 'The URLs to display RSS feed for. Multiple RSS feed URLs can be separated by a new line or comma.', 'super-rss-reader' ),
|
17 |
),
|
18 |
'tab_titles' => array(
|
19 |
'default' => '',
|
20 |
+
'description' => __( 'The title of the tab for the respective RSS feed.', 'super-rss-reader' )
|
21 |
),
|
22 |
'count' => array(
|
23 |
'default' => 5,
|
24 |
+
'description' => __( 'The total number of feed items to fetch.', 'super-rss-reader' )
|
25 |
),
|
26 |
'show_date' => array(
|
27 |
'default' => 0,
|
28 |
+
'description' => __( 'Display the date of the feed item.', 'super-rss-reader' ),
|
29 |
+
'options' => array(
|
30 |
+
0 => __( 'Hide date', 'super-rss-reader' ),
|
31 |
+
1 => __( 'Show date', 'super-rss-reader' )
|
32 |
+
)
|
33 |
),
|
34 |
'show_desc' => array(
|
35 |
'default' => 1,
|
36 |
+
'description' => __( 'Display the description/excerpt of the feed item.', 'super-rss-reader' ),
|
37 |
+
'options' => array(
|
38 |
+
0 => __( 'Hide description', 'super-rss-reader' ),
|
39 |
+
1 => __( 'Show description', 'super-rss-reader' )
|
40 |
+
)
|
41 |
),
|
42 |
'show_author' => array(
|
43 |
'default' => 0,
|
44 |
+
'description' => __( 'Display the author of the feed item.', 'super-rss-reader' ),
|
45 |
+
'options' => array(
|
46 |
+
0 => __( 'Hide author', 'super-rss-reader' ),
|
47 |
+
1 => __( 'Show author', 'super-rss-reader' )
|
48 |
+
)
|
49 |
),
|
50 |
'show_thumb' => array(
|
51 |
'default' => 1,
|
52 |
+
'description' => __( 'Display the thumbnail of the feed item.', 'super-rss-reader' ),
|
53 |
+
'options' => array(
|
54 |
+
0 => __( 'Hide thumbnail', 'super-rss-reader' ),
|
55 |
+
1 => __( 'Show thumbnail', 'super-rss-reader' )
|
56 |
+
)
|
57 |
),
|
58 |
'strip_desc' => array(
|
59 |
'default' => 30,
|
60 |
+
'description' => __( 'Trim the description to certain number of words.', 'super-rss-reader' )
|
61 |
),
|
62 |
'strip_title' => array(
|
63 |
'default' => 0,
|
64 |
+
'description' => __( 'Trim the title text to certain number of words.', 'super-rss-reader' )
|
65 |
),
|
66 |
'read_more' => array(
|
67 |
'default' => '[...]',
|
68 |
+
'description' => __( 'The read more text if the description is trimmed.', 'super-rss-reader' )
|
69 |
),
|
70 |
'rich_desc' => array(
|
71 |
'default' => 0,
|
72 |
+
'description' => __( 'Display rich description with all the formatting. Note: With rich description text cannot be trimmed.', 'super-rss-reader' ),
|
73 |
+
'options' => array(
|
74 |
+
0 => __( 'Normal description', 'super-rss-reader' ),
|
75 |
+
1 => __( 'Rich description', 'super-rss-reader' )
|
76 |
+
)
|
77 |
),
|
78 |
'add_nofollow' => array(
|
79 |
'default' => 1,
|
80 |
+
'description' => __( 'Add "nofollow" attribute to feed links.', 'super-rss-reader' ),
|
81 |
+
'options' => array(
|
82 |
+
0 => __( 'Do not add nofollow attribute', 'super-rss-reader' ),
|
83 |
+
1 => __( 'Add nofollow attribute', 'super-rss-reader' )
|
84 |
+
)
|
85 |
),
|
86 |
'open_newtab' => array(
|
87 |
'default' => 1,
|
88 |
+
'description' => __( 'Open the feed links in new tab.', 'super-rss-reader' ),
|
89 |
+
'options' => array(
|
90 |
+
0 => __( 'Open in same tab', 'super-rss-reader' ),
|
91 |
+
1 => __( 'Open in new tab', 'super-rss-reader' )
|
92 |
+
)
|
93 |
+
),
|
94 |
+
'thumbnail_position' => array(
|
95 |
+
'default' => 'align_left',
|
96 |
+
'description' => __( 'The position of the thumbnail.', 'super-rss-reader' ),
|
97 |
+
'options' => array(
|
98 |
+
'align_left' => __( 'Align left', 'super-rss-reader' ),
|
99 |
+
'align_right' => __( 'Align right', 'super-rss-reader' ),
|
100 |
+
'cover' => __( 'Cover', 'super-rss-reader' )
|
101 |
+
)
|
102 |
+
),
|
103 |
+
'thumbnail_size' => array(
|
104 |
+
'default' => '64px',
|
105 |
+
'description' => __( 'The size of the thumbnail including the units. Example: 64px, 10%', 'super-rss-reader' )
|
106 |
),
|
107 |
'color_style' => array(
|
108 |
'default' => 'none',
|
109 |
+
'description' => __( 'The style of the feed display.', 'super-rss-reader' ),
|
110 |
+
'options' => array(
|
111 |
+
'none' => 'No style',
|
112 |
+
'grey' => 'Grey',
|
113 |
+
'dark' => 'Dark',
|
114 |
+
'orange' => 'Orange',
|
115 |
+
'smodern' => 'Simple modern'
|
116 |
+
)
|
117 |
),
|
118 |
'display_type' => array(
|
119 |
'default' => 'vertical_ticker',
|
120 |
+
'description' => __( 'The type of feed display mode.', 'super-rss-reader' ),
|
121 |
+
'options' => array(
|
122 |
+
'normal' => __( 'Normal', 'super-rss-reader' ),
|
123 |
+
'vertical_ticker' => __( 'Ticker', 'super-rss-reader' ),
|
124 |
+
)
|
125 |
),
|
126 |
'visible_items' => array(
|
127 |
'default' => 5,
|
128 |
+
'description' => __( 'The number of feed items to be visible when ticker is enabled.', 'super-rss-reader' )
|
129 |
),
|
130 |
'ticker_speed' => array(
|
131 |
'default' => 4,
|
132 |
+
'description' => __( 'The speed of the ticker animation in seconds. Without units.', 'super-rss-reader' )
|
133 |
),
|
134 |
+
));
|
135 |
|
136 |
}
|
137 |
|
138 |
+
public static function defaults(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
$defaults = array();
|
141 |
$all_options = self::options();
|
148 |
|
149 |
}
|
150 |
|
151 |
+
public static function select_options(){
|
152 |
+
|
153 |
+
$select_options = array();
|
154 |
+
$all_options = self::options();
|
155 |
+
|
156 |
+
foreach( $all_options as $id => $props ){
|
157 |
+
$list = array();
|
158 |
+
if( array_key_exists( 'options', $props ) && is_array( $props[ 'options' ] ) ){
|
159 |
+
$list = $props[ 'options' ];
|
160 |
+
}
|
161 |
+
$select_options[ $id ] = $list;
|
162 |
+
}
|
163 |
+
|
164 |
+
return $select_options;
|
165 |
+
|
166 |
+
}
|
167 |
+
|
168 |
}
|
169 |
|
170 |
?>
|
includes/widget-admin.php
CHANGED
@@ -10,11 +10,11 @@ class super_rss_reader_widget extends WP_Widget{
|
|
10 |
public function __construct(){
|
11 |
$widget_ops = array(
|
12 |
'classname' => 'widget_super_rss_reader',
|
13 |
-
'description' => '
|
14 |
);
|
15 |
|
16 |
-
$control_ops = array('width' => 500, 'height' => 500);
|
17 |
-
parent::__construct('super_rss_reader', 'Super RSS Reader', $widget_ops, $control_ops);
|
18 |
}
|
19 |
|
20 |
// Display the Widget
|
@@ -30,15 +30,12 @@ class super_rss_reader_widget extends WP_Widget{
|
|
30 |
|
31 |
echo $before_widget . $title;
|
32 |
|
33 |
-
echo
|
34 |
-
|
35 |
-
<div class="super-rss-reader-widget">' . "\n";
|
36 |
|
37 |
SRR_Widget::render_feed( $instance );
|
38 |
|
39 |
-
echo
|
40 |
-
<!-- End - Super RSS Reader -->
|
41 |
-
' . "\n";
|
42 |
echo $after_widget;
|
43 |
|
44 |
}
|
@@ -63,7 +60,9 @@ class super_rss_reader_widget extends WP_Widget{
|
|
63 |
$instance[ 'add_nofollow' ] = intval( isset( $new_instance['add_nofollow'] ) ? $new_instance['add_nofollow'] : 0 );
|
64 |
$instance[ 'open_newtab' ] = intval( isset( $new_instance['open_newtab'] ) ? $new_instance['open_newtab'] : 0 );
|
65 |
$instance[ 'rich_desc' ] = intval( isset( $new_instance['rich_desc'] ) ? $new_instance['rich_desc'] : 0 );
|
66 |
-
|
|
|
|
|
67 |
$instance[ 'color_style' ] = stripslashes( $new_instance['color_style']);
|
68 |
$instance[ 'display_type' ] = stripslashes( $new_instance['display_type']);
|
69 |
$instance[ 'visible_items' ] = intval( $new_instance['visible_items']);
|
@@ -75,7 +74,7 @@ class super_rss_reader_widget extends WP_Widget{
|
|
75 |
// Widget form
|
76 |
public function form( $instance ){
|
77 |
|
78 |
-
$instance = wp_parse_args( (array) $instance, SRR_Options::
|
79 |
|
80 |
$title = htmlspecialchars( isset( $instance['title'] ) ? $instance[ 'title' ] : '' );
|
81 |
$urls = htmlspecialchars($instance['urls']);
|
@@ -92,12 +91,16 @@ class super_rss_reader_widget extends WP_Widget{
|
|
92 |
$strip_title = intval($instance['strip_title']);
|
93 |
$read_more = htmlspecialchars($instance['read_more']);
|
94 |
$rich_desc = intval($instance['rich_desc']);
|
|
|
|
|
95 |
|
96 |
$color_style = stripslashes($instance['color_style']);
|
97 |
$display_type = stripslashes($instance['display_type']);
|
98 |
$visible_items = intval($instance['visible_items']);
|
99 |
$ticker_speed = intval($instance['ticker_speed']);
|
100 |
|
|
|
|
|
101 |
// Replacing commas with new lines
|
102 |
$urls = str_replace( ',', "\n", $urls );
|
103 |
$tab_titles = str_replace( ',', "\n", $tab_titles );
|
@@ -106,160 +109,176 @@ class super_rss_reader_widget extends WP_Widget{
|
|
106 |
|
107 |
<div class="srr_settings">
|
108 |
|
109 |
-
<
|
|
|
|
|
|
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
|
128 |
-
|
129 |
|
130 |
-
|
|
|
|
|
|
|
131 |
|
132 |
-
<section data-tab-id="display">
|
133 |
<div class="srr_row">
|
134 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_desc'); ?>"
|
135 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_desc'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_desc'); ?>" value="1" <?php echo $show_desc == "1" ? 'checked="checked"' : ""; ?> /></div>
|
136 |
</div>
|
137 |
|
138 |
<div class="srr_row">
|
139 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_date'); ?>"
|
140 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_date'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_date'); ?>" value="1" <?php echo $show_date == "1" ? 'checked="checked"' : ""; ?> /></div>
|
141 |
</div>
|
142 |
|
143 |
<div class="srr_row">
|
144 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_author'); ?>"
|
145 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_author'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_author'); ?>" value="1" <?php echo $show_author == "1" ? 'checked="checked"' : ""; ?> /></div>
|
146 |
</div>
|
147 |
|
148 |
<div class="srr_row">
|
149 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_thumb'); ?>"
|
150 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_thumb'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_thumb'); ?>" value="1" <?php echo $show_thumb == "1" ? 'checked="checked"' : ""; ?> /></div>
|
151 |
</div>
|
152 |
</section>
|
153 |
|
154 |
-
<h4>Content</h4>
|
155 |
-
|
156 |
<section data-tab-id="content">
|
157 |
|
158 |
<div class="srr_row">
|
159 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('
|
160 |
-
<div class="srr_field"><input id="<?php echo $this->get_field_id('
|
161 |
</div>
|
162 |
|
163 |
<div class="srr_row">
|
164 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('
|
165 |
-
<div class="srr_field"><input id="<?php echo $this->get_field_id('
|
166 |
</div>
|
167 |
|
168 |
<div class="srr_row">
|
169 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('
|
170 |
-
<div class="srr_field"><input id="<?php echo $this->get_field_id('
|
171 |
</div>
|
172 |
|
|
|
|
|
173 |
<div class="srr_row">
|
174 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('
|
175 |
-
<div class="srr_field"><input id="<?php echo $this->get_field_id('
|
176 |
</div>
|
177 |
|
178 |
<div class="srr_row">
|
179 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('
|
180 |
-
<div class="srr_field"><input id="<?php echo $this->get_field_id('
|
|
|
|
|
|
|
|
|
|
|
181 |
</div>
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
<div class="srr_row">
|
184 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('
|
185 |
-
<div class="srr_field"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
</div>
|
187 |
|
188 |
<div class="srr_row">
|
189 |
-
<div class="srr_label"><label for="<?php echo $this->get_field_id('
|
190 |
-
<div class="srr_field"><input id="<?php echo $this->get_field_id('
|
191 |
</div>
|
192 |
|
193 |
</section>
|
194 |
|
195 |
-
|
196 |
-
<span class="srr_note">Note: You have enabled "Full/Rich HTML". If no description is present, then the full content will be displayed. Please make sure that the feed(s) are from trusted sources and do not contain any harmful scripts. If there are some alignment issues in the description, please use custom CSS to fix that.</span>
|
197 |
-
<?php endif; ?>
|
198 |
-
|
199 |
-
<h4>Style</h4>
|
200 |
-
<section>
|
201 |
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
</div>
|
214 |
-
</div>
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
<?php
|
227 |
-
$display_types = SRR_Options::display_types();
|
228 |
-
echo '<select name="' . $this->get_field_name('display_type') . '" id="' . $this->get_field_id('display_type') . '">';
|
229 |
-
foreach($display_types as $k => $v){
|
230 |
-
echo '<option value="' . $k . '" ' . ($display_type == $k ? 'selected="selected"' : "") . '>' . $v . '</option>';
|
231 |
-
}
|
232 |
-
echo '</select>';
|
233 |
-
?>
|
234 |
</div>
|
235 |
-
</div>
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
|
|
|
|
241 |
|
242 |
</section>
|
243 |
|
244 |
</div>
|
245 |
-
|
246 |
-
<div class="
|
247 |
-
<
|
248 |
-
|
249 |
-
<
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
<
|
255 |
-
<
|
256 |
-
<
|
257 |
-
<
|
258 |
-
<
|
259 |
-
|
260 |
-
|
261 |
-
</select>
|
262 |
-
<a class="button button-primary srr_coffee_btn" href="https://www.paypal.me/vaakash/6" data-link="https://www.paypal.me/vaakash/" target="_blank">Buy me a coffee !</a>
|
263 |
</div>
|
264 |
</div>
|
265 |
|
@@ -269,6 +288,11 @@ class super_rss_reader_widget extends WP_Widget{
|
|
269 |
|
270 |
<?php
|
271 |
}
|
|
|
|
|
|
|
|
|
|
|
272 |
}
|
273 |
|
274 |
?>
|
10 |
public function __construct(){
|
11 |
$widget_ops = array(
|
12 |
'classname' => 'widget_super_rss_reader',
|
13 |
+
'description' => __( 'An RSS feed reader widget with advanced features', 'super-rss-reader' )
|
14 |
);
|
15 |
|
16 |
+
$control_ops = array( 'width' => 500, 'height' => 500 );
|
17 |
+
parent::__construct( 'super_rss_reader', 'Super RSS Reader', $widget_ops, $control_ops );
|
18 |
}
|
19 |
|
20 |
// Display the Widget
|
30 |
|
31 |
echo $before_widget . $title;
|
32 |
|
33 |
+
echo '<!-- Start - Super RSS Reader v' . SRR_VERSION . '-->
|
34 |
+
<div class="super-rss-reader-widget">';
|
|
|
35 |
|
36 |
SRR_Widget::render_feed( $instance );
|
37 |
|
38 |
+
echo '</div><!-- End - Super RSS Reader -->';
|
|
|
|
|
39 |
echo $after_widget;
|
40 |
|
41 |
}
|
60 |
$instance[ 'add_nofollow' ] = intval( isset( $new_instance['add_nofollow'] ) ? $new_instance['add_nofollow'] : 0 );
|
61 |
$instance[ 'open_newtab' ] = intval( isset( $new_instance['open_newtab'] ) ? $new_instance['open_newtab'] : 0 );
|
62 |
$instance[ 'rich_desc' ] = intval( isset( $new_instance['rich_desc'] ) ? $new_instance['rich_desc'] : 0 );
|
63 |
+
$instance[ 'thumbnail_position' ] = stripslashes( $new_instance['thumbnail_position'] );
|
64 |
+
$instance[ 'thumbnail_size' ] = stripslashes( $new_instance['thumbnail_size'] );
|
65 |
+
|
66 |
$instance[ 'color_style' ] = stripslashes( $new_instance['color_style']);
|
67 |
$instance[ 'display_type' ] = stripslashes( $new_instance['display_type']);
|
68 |
$instance[ 'visible_items' ] = intval( $new_instance['visible_items']);
|
74 |
// Widget form
|
75 |
public function form( $instance ){
|
76 |
|
77 |
+
$instance = wp_parse_args( (array) $instance, SRR_Options::defaults() );
|
78 |
|
79 |
$title = htmlspecialchars( isset( $instance['title'] ) ? $instance[ 'title' ] : '' );
|
80 |
$urls = htmlspecialchars($instance['urls']);
|
91 |
$strip_title = intval($instance['strip_title']);
|
92 |
$read_more = htmlspecialchars($instance['read_more']);
|
93 |
$rich_desc = intval($instance['rich_desc']);
|
94 |
+
$thumbnail_position = htmlspecialchars($instance['thumbnail_position']);
|
95 |
+
$thumbnail_size = htmlspecialchars($instance['thumbnail_size']);
|
96 |
|
97 |
$color_style = stripslashes($instance['color_style']);
|
98 |
$display_type = stripslashes($instance['display_type']);
|
99 |
$visible_items = intval($instance['visible_items']);
|
100 |
$ticker_speed = intval($instance['ticker_speed']);
|
101 |
|
102 |
+
$option_lists = SRR_Options::select_options();
|
103 |
+
|
104 |
// Replacing commas with new lines
|
105 |
$urls = str_replace( ',', "\n", $urls );
|
106 |
$tab_titles = str_replace( ',', "\n", $tab_titles );
|
109 |
|
110 |
<div class="srr_settings">
|
111 |
|
112 |
+
<div class="srr_row">
|
113 |
+
<div class="srr_label srr_xsm"><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title', 'super-rss-reader' ); ?></label></div>
|
114 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('title');?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" class="widefat"/></div>
|
115 |
+
</div>
|
116 |
|
117 |
+
<div class="srr_row">
|
118 |
+
<div class="srr_label srr_xsm"><label for="<?php echo $this->get_field_id('urls'); ?>"><?php _e( 'URL(s)', 'super-rss-reader' ); ?></label></div>
|
119 |
+
<div class="srr_field"><textarea id="<?php echo $this->get_field_id('urls');?>" name="<?php echo $this->get_field_name('urls'); ?>" class="widefat"><?php echo $urls; ?></textarea>
|
120 |
+
<small class="srr_small_text"><?php _e( 'Can enter multiple RSS/atom feed URLs in new line', 'super-rss-reader' ); ?></small></div>
|
121 |
+
</div>
|
122 |
|
123 |
+
<div class="srr_row">
|
124 |
+
<div class="srr_label srr_xsm"><label for="<?php echo $this->get_field_id('tab_titles'); ?>"><?php _e( 'Tab titles', 'super-rss-reader' ); ?></label></div>
|
125 |
+
<div class="srr_field"><textarea id="<?php echo $this->get_field_id('tab_titles');?>" name="<?php echo $this->get_field_name('tab_titles'); ?>" class="widefat"><?php echo $tab_titles; ?></textarea>
|
126 |
+
<small class="srr_small_text"><?php _e( 'Enter corresponding tab titles in new line. Leave empty to take from feed.', 'super-rss-reader' ); ?></small></div>
|
127 |
+
</div>
|
128 |
|
129 |
+
<ul class="srr_tab_list">
|
130 |
+
<li><a href="#" data-tab="general" class="active"><?php _e( 'General', 'super-rss-reader' ); ?></a></li>
|
131 |
+
<li><a href="#" data-tab="content"><?php _e( 'Content', 'super-rss-reader' ); ?></a></li>
|
132 |
+
<li><a href="#" data-tab="display"><?php _e( 'Display', 'super-rss-reader' ); ?></a></li>
|
133 |
+
</ul>
|
134 |
|
135 |
+
<section data-tab-id="general" class="active">
|
136 |
|
137 |
+
<div class="srr_row">
|
138 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('count');?>"><?php _e( 'Total items to show', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'Number of feed items to be displayed', 'super-rss-reader' ) ); ?></div>
|
139 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('count');?>" name="<?php echo $this->get_field_name('count'); ?>" type="number" value="<?php echo $count; ?>" class="widefat" /></div>
|
140 |
+
</div>
|
141 |
|
|
|
142 |
<div class="srr_row">
|
143 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_desc'); ?>"><?php _e( 'Show Description', 'super-rss-reader' ); ?></label></div>
|
144 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_desc'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_desc'); ?>" value="1" <?php echo $show_desc == "1" ? 'checked="checked"' : ""; ?> /></div>
|
145 |
</div>
|
146 |
|
147 |
<div class="srr_row">
|
148 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_date'); ?>"><?php _e( 'Show Date', 'super-rss-reader' ); ?></label></div>
|
149 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_date'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_date'); ?>" value="1" <?php echo $show_date == "1" ? 'checked="checked"' : ""; ?> /></div>
|
150 |
</div>
|
151 |
|
152 |
<div class="srr_row">
|
153 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_author'); ?>"><?php _e( 'Show Author', 'super-rss-reader' ); ?></label></div>
|
154 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_author'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_author'); ?>" value="1" <?php echo $show_author == "1" ? 'checked="checked"' : ""; ?> /></div>
|
155 |
</div>
|
156 |
|
157 |
<div class="srr_row">
|
158 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('show_thumb'); ?>"><?php _e( 'Show thumbnail if present', 'super-rss-reader' ); ?></label></div>
|
159 |
<div class="srr_field"><input id="<?php echo $this->get_field_id('show_thumb'); ?>" type="checkbox" name="<?php echo $this->get_field_name('show_thumb'); ?>" value="1" <?php echo $show_thumb == "1" ? 'checked="checked"' : ""; ?> /></div>
|
160 |
</div>
|
161 |
</section>
|
162 |
|
|
|
|
|
163 |
<section data-tab-id="content">
|
164 |
|
165 |
<div class="srr_row">
|
166 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('add_nofollow'); ?>"><?php _e( 'Add "no follow" attribute to links', 'super-rss-reader' ); ?></label></div>
|
167 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('add_nofollow'); ?>" type="checkbox" name="<?php echo $this->get_field_name('add_nofollow'); ?>" value="1" <?php echo $add_nofollow == "1" ? 'checked="checked"' : ""; ?> /></div>
|
168 |
</div>
|
169 |
|
170 |
<div class="srr_row">
|
171 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('open_newtab'); ?>"><?php _e( 'Open links in new tab', 'super-rss-reader' ); ?></label></div>
|
172 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('open_newtab'); ?>" type="checkbox" name="<?php echo $this->get_field_name('open_newtab'); ?>" value="1" <?php echo $open_newtab == "1" ? 'checked="checked"' : ""; ?> /></div>
|
173 |
</div>
|
174 |
|
175 |
<div class="srr_row">
|
176 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('strip_title'); ?>"><?php _e( 'Trim title to words', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'The number of words to be displayed. Use 0 to disable trimming', 'super-rss-reader' ) ); ?></div>
|
177 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('strip_title');?>" name="<?php echo $this->get_field_name('strip_title'); ?>" type="number" value="<?php echo $strip_title; ?>" class="widefat" /></div>
|
178 |
</div>
|
179 |
|
180 |
+
<h4><?php _e( 'Description', 'super-rss-reader' ); ?></h4>
|
181 |
+
|
182 |
<div class="srr_row">
|
183 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('strip_desc');?>"><?php _e( 'Trim description to words', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'The number of words to be displayed. Use 0 to disable trimming', 'super-rss-reader' ) ); ?></div>
|
184 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('strip_desc');?>" name="<?php echo $this->get_field_name('strip_desc'); ?>" type="number" value="<?php echo $strip_desc; ?>" class="widefat" /></div>
|
185 |
</div>
|
186 |
|
187 |
<div class="srr_row">
|
188 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('read_more'); ?>"><?php _e( 'Read more text', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'Leave blank to hide read more text', 'super-rss-reader' ) ); ?></div>
|
189 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('read_more'); ?>" name="<?php echo $this->get_field_name('read_more'); ?>" type="text" value="<?php echo $read_more; ?>" class="widefat" /></div>
|
190 |
+
</div>
|
191 |
+
|
192 |
+
<div class="srr_row">
|
193 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('rich_desc'); ?>"><?php _e( 'Enable rich description', 'super-rss-reader' ); ?></label></div>
|
194 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('rich_desc'); ?>" type="checkbox" name="<?php echo $this->get_field_name('rich_desc'); ?>" value="1" <?php echo $rich_desc == "1" ? 'checked="checked"' : ""; ?> /></div>
|
195 |
</div>
|
196 |
|
197 |
+
<?php if( $rich_desc == 1 ): ?>
|
198 |
+
<span class="srr_note"><?php _e( 'Note: You have enabled "Full/Rich HTML". If no description is present, then the full content will be displayed. Please make sure that the feed(s) are from trusted sources and do not contain any harmful scripts. If there are some alignment issues in the description, please use custom CSS to fix that.', 'super-rss-reader' ); ?></span>
|
199 |
+
<?php endif; ?>
|
200 |
+
|
201 |
+
<h4><?php _e( 'Thumbnail', 'super-rss-reader' ); ?></h4>
|
202 |
+
|
203 |
<div class="srr_row">
|
204 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('thumbnail_position');?>"><?php _e( 'Thumbnail position', 'super-rss-reader' ); ?></label></div>
|
205 |
+
<div class="srr_field">
|
206 |
+
<?php
|
207 |
+
echo '<select name="' . $this->get_field_name('thumbnail_position') . '" id="' . $this->get_field_id('thumbnail_position') . '">';
|
208 |
+
foreach( $option_lists[ 'thumbnail_position' ] as $k => $v ){
|
209 |
+
echo '<option value="' . $k . '" ' . selected( $thumbnail_position, $k ) . '>' . $v . '</option>';
|
210 |
+
}
|
211 |
+
echo '</select>';
|
212 |
+
?>
|
213 |
+
</div>
|
214 |
</div>
|
215 |
|
216 |
<div class="srr_row">
|
217 |
+
<div class="srr_label"><label for="<?php echo $this->get_field_id('thumbnail_size'); ?>"><?php _e( 'Thumbnail size', 'super-rss-reader' ); ?></label><?php $this->tt( __( 'The size of the thumbnail including the units. Example 64px, 10%', 'super-rss-reader' ) ); ?></div>
|
218 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('thumbnail_size');?>" name="<?php echo $this->get_field_name('thumbnail_size'); ?>" type="text" value="<?php echo $thumbnail_size; ?>" class="widefat" /></div>
|
219 |
</div>
|
220 |
|
221 |
</section>
|
222 |
|
223 |
+
<section data-tab-id="display">
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
+
<div class="srr_row">
|
226 |
+
<div class="srr_label srr_sm"><label for="<?php echo $this->get_field_id('color_style');?>"><?php _e( 'Color theme', 'super-rss-reader' ); ?></label></div>
|
227 |
+
<div class="srr_field">
|
228 |
+
<?php
|
229 |
+
echo '<select name="' . $this->get_field_name('color_style') . '" id="' . $this->get_field_id('color_style') . '">';
|
230 |
+
foreach( $option_lists[ 'color_style' ] as $k => $v ){
|
231 |
+
echo '<option value="' . $k . '" ' . selected( $color_style, $k ) . '>' . $v . '</option>';
|
232 |
+
}
|
233 |
+
echo '</select>';
|
234 |
+
?>
|
235 |
+
</div>
|
236 |
</div>
|
|
|
237 |
|
238 |
+
<div class="srr_row">
|
239 |
+
<div class="srr_label srr_sm"><label for="<?php echo $this->get_field_id('display_type');?>"><?php _e( 'Display type', 'super-rss-reader' ); ?></label></div>
|
240 |
+
<div class="srr_field">
|
241 |
+
<?php
|
242 |
+
echo '<select name="' . $this->get_field_name('display_type') . '" id="' . $this->get_field_id('display_type') . '">';
|
243 |
+
foreach( $option_lists[ 'display_type' ] as $k => $v ){
|
244 |
+
echo '<option value="' . $k . '" ' . selected( $display_type, $k ) . '>' . $v . '</option>';
|
245 |
+
}
|
246 |
+
echo '</select>';
|
247 |
+
?>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
|
251 |
+
<div class="srr_row">
|
252 |
+
<div class="srr_label srr_sm"><label for="<?php echo $this->get_field_id('ticker_speed');?>"><?php _e( 'Ticker speed', 'super-rss-reader' ); ?></label></div>
|
253 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('ticker_speed');?>" name="<?php echo $this->get_field_name('ticker_speed'); ?>" type="number" value="<?php echo $ticker_speed; ?>" title="Speed of the ticker in seconds"/> seconds</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
</div>
|
|
|
255 |
|
256 |
+
<div class="srr_row">
|
257 |
+
<div class="srr_label srr_sm"><label for="<?php echo $this->get_field_id('visible_items');?>"><?php _e( 'Widget height', 'super-rss-reader' ); ?><?php $this->tt( __( 'The height of the widget when display type is "ticker"', 'super-rss-reader' ) ); ?></label></div>
|
258 |
+
<div class="srr_field"><input id="<?php echo $this->get_field_id('visible_items');?>" name="<?php echo $this->get_field_name('visible_items'); ?>" type="number" value="<?php echo $visible_items; ?>" /><br/>
|
259 |
+
<small class="srr_small_text"><?php _e( 'Set value less than 20 to show visible feed items. Example: <b>5</b> items', 'super-rss-reader' ); ?></small></br>
|
260 |
+
<small class="srr_small_text"><?php _e( 'Set value greater than 20 for fixed widget height. Example: <b>400</b> px', 'super-rss-reader' ); ?></small></div>
|
261 |
+
</div>
|
262 |
|
263 |
</section>
|
264 |
|
265 |
</div>
|
266 |
+
|
267 |
+
<div class="srr_pro">
|
268 |
+
<div class="srr_pro_intro">
|
269 |
+
<div><span class="srr_pro_label">PRO</span></div>
|
270 |
+
<p>Get the PRO version to enjoy more features like<br/> <span>Shortcode, Grid display, Custom feed item template</span> and more !</p>
|
271 |
+
<div><span class="dashicons dashicons-arrow-down-alt2 srr_pro_more"></span></div>
|
272 |
+
</div>
|
273 |
+
<div class="srr_pro_details">
|
274 |
+
<ul class="srr_pro_features">
|
275 |
+
<li>Shortcode - <span>Display RSS feed anywhere in your website</span></li>
|
276 |
+
<li>Grid display - <span>Display feed item in rows and columns</span></li>
|
277 |
+
<li>Custom template - <span>Change order of feed item content, add HTML</span></li>
|
278 |
+
<li>4+ new color themes</li>
|
279 |
+
<li>Updates and support for 1 year</li>
|
280 |
+
</ul>
|
281 |
+
<p><a href="https://www.aakashweb.com/wordpress-plugins/super-rss-reader-pro/?utm_source=admin&utm_medium=widget-get&utm_campaign=srr-pro#purchase" class="button button-primary">Get PRO version</a> <a href="https://www.aakashweb.com/wordpress-plugins/super-rss-reader-pro/?utm_source=admin&utm_medium=widget-info&utm_campaign=srr-pro" class="button">More information</a></p>
|
|
|
|
|
282 |
</div>
|
283 |
</div>
|
284 |
|
288 |
|
289 |
<?php
|
290 |
}
|
291 |
+
|
292 |
+
public function tt( $text ){
|
293 |
+
echo '<div class="srr_tt" tabindex="0"><span class="dashicons dashicons-editor-help"></span><span class="srr_tt_text"><span>' . $text . '</span></span></div>';
|
294 |
+
}
|
295 |
+
|
296 |
}
|
297 |
|
298 |
?>
|
includes/widget.php
CHANGED
@@ -16,6 +16,8 @@ class SRR_Widget{
|
|
16 |
|
17 |
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_scripts' ) );
|
18 |
|
|
|
|
|
19 |
}
|
20 |
|
21 |
public static function init_widget(){
|
@@ -26,17 +28,18 @@ class SRR_Widget{
|
|
26 |
|
27 |
public static function public_scripts(){
|
28 |
|
29 |
-
wp_enqueue_script( 'jquery-easy-ticker
|
30 |
-
wp_enqueue_script( 'super-rss-reader
|
31 |
-
|
|
|
32 |
|
33 |
}
|
34 |
|
35 |
public static function admin_scripts( $hook ){
|
36 |
|
37 |
if( $hook == 'widgets.php' ){
|
38 |
-
wp_enqueue_style( 'srr_admin_css', SRR_URL . 'admin/css/style.css', array(), SRR_VERSION );
|
39 |
-
wp_enqueue_script( 'srr_admin_js', SRR_URL . 'admin/js/script.js', array( 'jquery' ), SRR_VERSION );
|
40 |
}
|
41 |
|
42 |
}
|
@@ -48,6 +51,11 @@ class SRR_Widget{
|
|
48 |
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
|
53 |
SRR_Widget::init();
|
16 |
|
17 |
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_scripts' ) );
|
18 |
|
19 |
+
add_filter( 'plugin_action_links_' . SRR_BASE_NAME, array( __CLASS__, 'action_links' ) );
|
20 |
+
|
21 |
}
|
22 |
|
23 |
public static function init_widget(){
|
28 |
|
29 |
public static function public_scripts(){
|
30 |
|
31 |
+
wp_enqueue_script( 'jquery-easy-ticker', SRR_URL . 'public/js/jquery.easy-ticker.min.js', array( 'jquery' ), SRR_VERSION );
|
32 |
+
wp_enqueue_script( 'super-rss-reader', SRR_URL . 'public/js/script.min.js', array( 'jquery' ), SRR_VERSION );
|
33 |
+
|
34 |
+
wp_enqueue_style( 'super-rss-reader', SRR_URL . 'public/css/style.min.css', array(), SRR_VERSION );
|
35 |
|
36 |
}
|
37 |
|
38 |
public static function admin_scripts( $hook ){
|
39 |
|
40 |
if( $hook == 'widgets.php' ){
|
41 |
+
wp_enqueue_style( 'srr_admin_css', SRR_URL . 'admin/css/style-widget.css', array(), SRR_VERSION );
|
42 |
+
wp_enqueue_script( 'srr_admin_js', SRR_URL . 'admin/js/script-widget.js', array( 'jquery' ), SRR_VERSION );
|
43 |
}
|
44 |
|
45 |
}
|
51 |
|
52 |
}
|
53 |
|
54 |
+
public static function action_links( $links ){
|
55 |
+
array_unshift( $links, '<a href="https://www.aakashweb.com/wordpress-plugins/super-rss-reader-pro/?utm_source=admin&utm_medium=plugin-list&utm_campaign=srr-pro" target="_blank"><b>' . __( 'Upgrade to PRO', 'super-rss-reader' ) . '</b></a>' );
|
56 |
+
return $links;
|
57 |
+
}
|
58 |
+
|
59 |
}
|
60 |
|
61 |
SRR_Widget::init();
|
public/css/style.css
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
|
7 |
/** Tab settings **/
|
8 |
.srr-tab-wrap{
|
9 |
-
margin:
|
10 |
background: none !important;
|
11 |
border: none !important;
|
12 |
padding: 0px !important;
|
@@ -15,19 +15,23 @@
|
|
15 |
list-style: none !important;
|
16 |
float: left;
|
17 |
background-image: none !important;
|
18 |
-
background-color: #fff;
|
19 |
margin: 5px 5px 0px 0px !important;
|
20 |
padding: 3px 10px!important;
|
21 |
border-radius: 3px;
|
22 |
border: 1px solid #ccc;
|
23 |
cursor: pointer;
|
24 |
}
|
25 |
-
.srr-active-tab{
|
26 |
-
|
27 |
-
color: white !important;
|
28 |
}
|
29 |
|
30 |
/** General styling **/
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
.srr-wrap{
|
32 |
padding: 0px !important;
|
33 |
max-width: 100%;
|
@@ -44,16 +48,45 @@
|
|
44 |
.srr-wrap .srr-item:last-child{
|
45 |
margin: 0px;
|
46 |
}
|
47 |
-
.srr-wrap .srr-item > *{
|
48 |
-
margin-bottom:
|
|
|
|
|
|
|
49 |
}
|
50 |
.srr-wrap .srr-title, .srr-wrap .srr-meta{
|
51 |
line-height: 150%;
|
52 |
}
|
53 |
.srr-wrap .srr-thumb{
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
.srr-wrap .srr-summary p:last-child {
|
59 |
margin-bottom: 0;
|
@@ -80,7 +113,7 @@
|
|
80 |
.srr-style-grey .srr-item{
|
81 |
border-bottom: 1px solid #dfdfdf;
|
82 |
}
|
83 |
-
.srr-style-grey .
|
84 |
background-color: #F8F8F8;
|
85 |
}
|
86 |
|
@@ -96,7 +129,7 @@
|
|
96 |
.srr-style-dark .srr-item{
|
97 |
border-color: #333
|
98 |
}
|
99 |
-
.srr-style-dark .
|
100 |
background: #333333;
|
101 |
}
|
102 |
.srr-tab-style-dark li{
|
@@ -109,7 +142,6 @@
|
|
109 |
}
|
110 |
|
111 |
/** Orange **/
|
112 |
-
|
113 |
.srr-style-orange{
|
114 |
border: 2px solid #FF9900;
|
115 |
-webkit-border-radius: 5px;
|
@@ -129,17 +161,17 @@
|
|
129 |
background: #FF9900!important;
|
130 |
color: #FFFFFF !important;
|
131 |
}
|
|
|
|
|
|
|
132 |
|
133 |
/** Simple modern **/
|
134 |
-
|
135 |
.srr-style-smodern{
|
136 |
border: 0;
|
137 |
}
|
138 |
.srr-style-smodern .srr-item{
|
139 |
border-radius: 10px;
|
140 |
border: 0;
|
141 |
-
-webkit-transition: opacity 1s;
|
142 |
-
-moz-transition: opacity 1s;
|
143 |
}
|
144 |
.srr-style-smodern:hover .srr-item{
|
145 |
opacity: 0.3;
|
@@ -152,21 +184,10 @@
|
|
152 |
background: #fff !important;
|
153 |
box-shadow: inset 0 0 5px #747474;
|
154 |
}
|
155 |
-
.srr-style-smodern .
|
156 |
background: #f8f8f8;
|
157 |
}
|
158 |
|
159 |
-
/** Clearfix hack **/
|
160 |
-
* html .srr-clearfix{
|
161 |
-
height: 1%;
|
162 |
-
overflow: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
/* float clearing for IE7 */
|
166 |
-
*+html .srr-clearfix{
|
167 |
-
min-height: 1%;
|
168 |
-
}
|
169 |
-
|
170 |
/* float clearing for everyone else */
|
171 |
.srr-clearfix:after{
|
172 |
clear: both;
|
6 |
|
7 |
/** Tab settings **/
|
8 |
.srr-tab-wrap{
|
9 |
+
margin: 0 0px 1em 0!important;
|
10 |
background: none !important;
|
11 |
border: none !important;
|
12 |
padding: 0px !important;
|
15 |
list-style: none !important;
|
16 |
float: left;
|
17 |
background-image: none !important;
|
|
|
18 |
margin: 5px 5px 0px 0px !important;
|
19 |
padding: 3px 10px!important;
|
20 |
border-radius: 3px;
|
21 |
border: 1px solid #ccc;
|
22 |
cursor: pointer;
|
23 |
}
|
24 |
+
.srr-tab-style-none .srr-active-tab{
|
25 |
+
border: 1px solid #888;
|
|
|
26 |
}
|
27 |
|
28 |
/** General styling **/
|
29 |
+
.srr-main {
|
30 |
+
margin-bottom: 1em;
|
31 |
+
}
|
32 |
+
.srr-main:last-child{
|
33 |
+
margin-bottom: 0;
|
34 |
+
}
|
35 |
.srr-wrap{
|
36 |
padding: 0px !important;
|
37 |
max-width: 100%;
|
48 |
.srr-wrap .srr-item:last-child{
|
49 |
margin: 0px;
|
50 |
}
|
51 |
+
.srr-wrap .srr-item > div > *{
|
52 |
+
margin-bottom: 0.5em !important;
|
53 |
+
}
|
54 |
+
.srr-wrap .srr-item > div > *:first-child {
|
55 |
+
margin-top: 0;
|
56 |
}
|
57 |
.srr-wrap .srr-title, .srr-wrap .srr-meta{
|
58 |
line-height: 150%;
|
59 |
}
|
60 |
.srr-wrap .srr-thumb{
|
61 |
+
position: relative;
|
62 |
+
display: inline-block;
|
63 |
+
width: 64px;
|
64 |
+
margin-top: 0.5em;
|
65 |
+
margin-bottom: 0.5em;
|
66 |
+
overflow: hidden;
|
67 |
+
}
|
68 |
+
.srr-thumb img{
|
69 |
+
position: absolute;
|
70 |
+
left: 50%;
|
71 |
+
top: 50%;
|
72 |
+
width: 100%;
|
73 |
+
height: 100%;
|
74 |
+
max-width: none;
|
75 |
+
max-height: none;
|
76 |
+
transform: translate(-50%,-50%);
|
77 |
+
object-fit: cover;
|
78 |
+
}
|
79 |
+
.srr-thumb.srr-thumb-align_left{
|
80 |
+
float: left;
|
81 |
+
margin-right: 1em;
|
82 |
+
}
|
83 |
+
.srr-thumb.srr-thumb-align_right{
|
84 |
+
float: right;
|
85 |
+
margin-left: 1em;
|
86 |
+
}
|
87 |
+
.srr-thumb.srr-thumb-cover{
|
88 |
+
float: none;
|
89 |
+
width: 100% !important;
|
90 |
}
|
91 |
.srr-wrap .srr-summary p:last-child {
|
92 |
margin-bottom: 0;
|
113 |
.srr-style-grey .srr-item{
|
114 |
border-bottom: 1px solid #dfdfdf;
|
115 |
}
|
116 |
+
.srr-style-grey .srr-stripe{
|
117 |
background-color: #F8F8F8;
|
118 |
}
|
119 |
|
129 |
.srr-style-dark .srr-item{
|
130 |
border-color: #333
|
131 |
}
|
132 |
+
.srr-style-dark .srr-stripe{
|
133 |
background: #333333;
|
134 |
}
|
135 |
.srr-tab-style-dark li{
|
142 |
}
|
143 |
|
144 |
/** Orange **/
|
|
|
145 |
.srr-style-orange{
|
146 |
border: 2px solid #FF9900;
|
147 |
-webkit-border-radius: 5px;
|
161 |
background: #FF9900!important;
|
162 |
color: #FFFFFF !important;
|
163 |
}
|
164 |
+
.srr-style-orange .srr-thumb img{
|
165 |
+
border-radius: 5px;
|
166 |
+
}
|
167 |
|
168 |
/** Simple modern **/
|
|
|
169 |
.srr-style-smodern{
|
170 |
border: 0;
|
171 |
}
|
172 |
.srr-style-smodern .srr-item{
|
173 |
border-radius: 10px;
|
174 |
border: 0;
|
|
|
|
|
175 |
}
|
176 |
.srr-style-smodern:hover .srr-item{
|
177 |
opacity: 0.3;
|
184 |
background: #fff !important;
|
185 |
box-shadow: inset 0 0 5px #747474;
|
186 |
}
|
187 |
+
.srr-style-smodern .srr-stripe{
|
188 |
background: #f8f8f8;
|
189 |
}
|
190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
/* float clearing for everyone else */
|
192 |
.srr-clearfix:after{
|
193 |
clear: both;
|
public/css/style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.srr-tab-wrap{margin:
|
1 |
+
.srr-tab-wrap{margin:0 0 1em 0!important;background:0 0!important;border:none!important;padding:0!important}.srr-tab-wrap li{list-style:none!important;float:left;background-image:none!important;margin:5px 5px 0 0!important;padding:3px 10px!important;border-radius:3px;border:1px solid #ccc;cursor:pointer}.srr-tab-style-none .srr-active-tab{border:1px solid #888}.srr-main{margin-bottom:1em}.srr-main:last-child{margin-bottom:0}.srr-wrap{padding:0!important;max-width:100%;min-width:100%!important}.srr-wrap div{left:0;right:0}.srr-wrap .srr-item{border-top:0;padding:10px}.srr-wrap .srr-item:last-child{margin:0}.srr-wrap .srr-item>div>*{margin-bottom:.5em!important}.srr-wrap .srr-item>div>:first-child{margin-top:0}.srr-wrap .srr-meta,.srr-wrap .srr-title{line-height:150%}.srr-wrap .srr-thumb{position:relative;display:inline-block;width:64px;margin-top:.5em;margin-bottom:.5em;overflow:hidden}.srr-thumb img{position:absolute;left:50%;top:50%;width:100%;height:100%;max-width:none;max-height:none;transform:translate(-50%,-50%);object-fit:cover}.srr-thumb.srr-thumb-align_left{float:left;margin-right:1em}.srr-thumb.srr-thumb-align_right{float:right;margin-left:1em}.srr-thumb.srr-thumb-cover{float:none;width:100%!important}.srr-wrap .srr-summary p:last-child{margin-bottom:0}.srr-wrap .srr-summary img{width:100%;margin:0 0 1em 0}.srr-wrap .srr-summary a{margin:0!important}.srr-style-none .srr-item{padding:0 0 20px 0!important}.srr-style-grey{border:1px solid #dfdfdf}.srr-style-grey .srr-item{border-bottom:1px solid #dfdfdf}.srr-style-grey .srr-stripe{background-color:#f8f8f8}.srr-style-dark{background:#000;border:1px solid #ccc;color:#ddd!important}.srr-style-dark a{color:#fff!important}.srr-style-dark .srr-item{border-color:#333}.srr-style-dark .srr-stripe{background:#333}.srr-tab-style-dark li{border-color:#666;background:#333;color:#fff!important}.srr-tab-style-dark .srr-active-tab{background:#666!important}.srr-style-orange{border:2px solid #f90;-webkit-border-radius:5px;border-radius:5px;-webkit-box-shadow:inset 0 2px 6px 0 rgba(0,0,0,.3);box-shadow:inset 0 2px 6px 0 rgba(0,0,0,.3)}.srr-style-orange .srr-item{border-bottom:1px solid #f90}.srr-tab-style-orange li{border-color:#f90;background:#fff8ec;color:#333!important}.srr-tab-style-orange .srr-active-tab{background:#f90!important;color:#fff!important}.srr-style-orange .srr-thumb img{border-radius:5px}.srr-style-smodern{border:0}.srr-style-smodern .srr-item{border-radius:10px;border:0}.srr-style-smodern:hover .srr-item{opacity:.3}.srr-style-smodern .srr-item:hover{opacity:1}.srr-tab-style-smodern .srr-active-tab{color:#000!important;background:#fff!important;box-shadow:inset 0 0 5px #747474}.srr-style-smodern .srr-stripe{background:#f8f8f8}.srr-clearfix:after{clear:both;content:".";display:block;height:0;visibility:hidden;font-size:0}
|
public/js/script.js
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
/*
|
2 |
-
* Super RSS Reader
|
3 |
-
*
|
4 |
-
* Author: Aakash Chakravarthy, www.aakashweb.com
|
5 |
*/
|
6 |
|
7 |
(function($){
|
8 |
$(document).ready(function(){
|
9 |
|
10 |
-
var widget = $('.
|
11 |
widget.find('.srr-wrap').hide();
|
12 |
widget.find('.srr-wrap:first').show();
|
13 |
widget.find('.srr-tab-wrap li:first').addClass('srr-active-tab');
|
1 |
/*
|
2 |
+
* Super RSS Reader, WordPress plugin
|
3 |
+
* Aakash Chakravarthy, www.aakashweb.com
|
|
|
4 |
*/
|
5 |
|
6 |
(function($){
|
7 |
$(document).ready(function(){
|
8 |
|
9 |
+
var widget = $('.srr-main');
|
10 |
widget.find('.srr-wrap').hide();
|
11 |
widget.find('.srr-wrap:first').show();
|
12 |
widget.find('.srr-tab-wrap li:first').addClass('srr-active-tab');
|
public/js/script.min.js
CHANGED
@@ -1,6 +1 @@
|
|
1 |
-
|
2 |
-
* Super RSS Reader - v1.3
|
3 |
-
* Included with "Super RSS Reader" Wordpress plugin @since v2.0
|
4 |
-
* Author: Aakash Chakravarthy, www.aakashweb.com
|
5 |
-
*/
|
6 |
-
!function(r){r(document).ready(function(){var i=r(".super-rss-reader-widget");i.find(".srr-wrap").hide(),i.find(".srr-wrap:first").show(),i.find(".srr-tab-wrap li:first").addClass("srr-active-tab"),r(".srr-tab-wrap li").click(function(){var i=r(this).attr("data-tab"),t=r(this).parent().parent();if(r(this).parent().children("li").removeClass("srr-active-tab"),r(this).addClass("srr-active-tab"),t.find(".srr-wrap").hide(),$srrTicker=t.find(".srr-wrap[data-id="+i+"]"),$srrTicker.show(),0==$srrTicker.height()){var a=$srrTicker.data("visible"),s=$srrTicker.find(".srr-item:first-child").outerHeight()*a;$srrTicker.height(s)}}),r(".srr-vticker").each(function(){var i=r(this).attr("data-visible"),t=r(this).attr("data-speed"),a=parseInt(i)<=20?"auto":i;r(this).easyTicker({visible:i,height:a,interval:t})})})}(jQuery);
|
1 |
+
!function(r){r(document).ready(function(){var i=r(".srr-main");i.find(".srr-wrap").hide(),i.find(".srr-wrap:first").show(),i.find(".srr-tab-wrap li:first").addClass("srr-active-tab"),r(".srr-tab-wrap li").click(function(){var i=r(this).attr("data-tab"),t=r(this).parent().parent();if(r(this).parent().children("li").removeClass("srr-active-tab"),r(this).addClass("srr-active-tab"),t.find(".srr-wrap").hide(),$srrTicker=t.find(".srr-wrap[data-id="+i+"]"),$srrTicker.show(),0==$srrTicker.height()){var a=$srrTicker.data("visible"),s=$srrTicker.find(".srr-item:first-child").outerHeight()*a;$srrTicker.height(s)}}),r(".srr-vticker").each(function(){var i=r(this).attr("data-visible"),t=r(this).attr("data-speed"),a=parseInt(i)<=20?"auto":i;r(this).easyTicker({visible:i,height:a,interval:t})})})}(jQuery);
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -2,39 +2,59 @@
|
|
2 |
Contributors: vaakash
|
3 |
Author URI: https://www.aakashweb.com/
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
5 |
-
Tags: rss, widget, ticker, feed, news, twitter, admin, plugin, posts, page, thumbnail, atom
|
6 |
License: GPLv2 or later
|
7 |
Donate Link: https://www.paypal.me/vaakash
|
8 |
Requires at least: 2.8
|
9 |
Requires PHP: 5.3
|
10 |
Tested up to: 5.5.1
|
11 |
-
Stable tag:
|
12 |
|
13 |
-
|
14 |
|
15 |
## Description
|
16 |
|
17 |
-
Super RSS Reader
|
18 |
|
19 |
-
The
|
20 |
|
21 |
[Check out the **LIVE DEMO** of the plugin](https://www.aakashweb.com/demos/super-rss-reader/)
|
22 |
|
23 |
-
### Features
|
24 |
|
25 |
-
* **News ticker** like effect to the RSS feeds (can turn
|
26 |
-
* Display feeds in
|
27 |
-
* Display
|
28 |
-
*
|
|
|
29 |
* Customizable ticker speed.
|
30 |
-
* Supports RSS
|
31 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
[youtube=https://www.youtube.com/watch?v=02aOG_-98Tg]
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
### Resources
|
36 |
|
37 |
* [FAQs](https://www.aakashweb.com/docs/super-rss-reader/faq/)
|
|
|
38 |
* [Support forum](https://www.aakashweb.com/forum/discuss/wordpress-plugins/super-rss-reader/)
|
39 |
|
40 |
## Installation
|
@@ -51,9 +71,7 @@ Download and upload the latest version of Super RSS Reader,
|
|
51 |
|
52 |
### My RSS feed is not refreshing !
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
You can change this default value by adding the below code to your theme's function.php file.
|
57 |
|
58 |
`add_filter( 'wp_feed_cache_transient_lifetime', function($a) { return 600; } );`
|
59 |
|
@@ -61,42 +79,62 @@ Here 600 indicates 10 minutes in seconds. Please note that setting lower value w
|
|
61 |
|
62 |
You can also refer this post https://wordpress.org/support/topic/rss-not-updating-no-matter-which-plugin-i-try/#post-10123881 to change the refresh time for particular feed URL.
|
63 |
|
|
|
|
|
64 |
### How can I customize the RSS widget via CSS styles ?
|
65 |
|
66 |
-
|
|
|
|
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
72 |
|
73 |
### Does this plugin support horizontal ticker ?
|
74 |
|
75 |
No, Super RSS Reader only supports vertical support feature for now.
|
76 |
|
77 |
-
### How to
|
|
|
|
|
78 |
|
79 |
-
|
80 |
|
81 |
-
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
|
87 |
-
|
|
|
|
|
|
|
|
|
88 |
|
89 |
## Screenshots
|
90 |
|
91 |
-
1.
|
92 |
-
1.
|
93 |
-
1.
|
94 |
-
1.
|
95 |
|
96 |
-
[Live
|
97 |
|
98 |
## Changelog
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
### 3.2
|
101 |
* Fix: Read more link not present
|
102 |
* New: Widgets settings is now clean and easy to use.
|
2 |
Contributors: vaakash
|
3 |
Author URI: https://www.aakashweb.com/
|
4 |
Plugin URI: https://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
5 |
+
Tags: rss, widget, ticker, feed, news, twitter, admin, plugin, posts, page, thumbnail, atom, shortcode
|
6 |
License: GPLv2 or later
|
7 |
Donate Link: https://www.paypal.me/vaakash
|
8 |
Requires at least: 2.8
|
9 |
Requires PHP: 5.3
|
10 |
Tested up to: 5.5.1
|
11 |
+
Stable tag: 4.0
|
12 |
|
13 |
+
Display any RSS feed(s) in widget with news ticker effect in multiple tabs, thumbnails, customizable color themes and more.
|
14 |
|
15 |
## Description
|
16 |
|
17 |
+
Super RSS Reader plugin allows you to display RSS feed(s) in an attractive way to your widget. It has options to display multiple RSS feeds separated by tabs in a single widget and has feature to add a news ticker like effect to it. See the features list below for complete list.
|
18 |
|
19 |
+
The widget is fully customizable with external styles and also has color themes out of the box. It is a perfect replacement for the default RSS widget in WordPress.
|
20 |
|
21 |
[Check out the **LIVE DEMO** of the plugin](https://www.aakashweb.com/demos/super-rss-reader/)
|
22 |
|
23 |
+
### ✨ Features
|
24 |
|
25 |
+
* **News ticker** - Add news ticker like effect to the RSS feeds (can turn on of off)
|
26 |
+
* **Multiple tabs** - Display multiple feeds in one widget separated by tabs.
|
27 |
+
* **Thumbnail** - Display the thumbnail of the feed item.
|
28 |
+
* **Color themes** - Options of multiple color themes out of the box. Customizable via CSS.
|
29 |
+
* Different **thumbnail positions** (align left, right and cover)
|
30 |
* Customizable ticker speed.
|
31 |
+
* Supports RSS and atom feed.
|
32 |
+
* Trim title and description text of the feed item.
|
33 |
+
|
34 |
+
### 🌄 Display RSS feeds like
|
35 |
+
|
36 |
+
* Your own website content like recent posts, comments, forum topics etc.
|
37 |
+
* Articles, posts from related websites and share with your users.
|
38 |
+
* Events, job listings etc. from other websites.
|
39 |
+
* Deals, Craigslist etc. You got it, any RSS feed on your site !
|
40 |
|
41 |
[youtube=https://www.youtube.com/watch?v=02aOG_-98Tg]
|
42 |
|
43 |
+
### 💎 PRO version
|
44 |
+
|
45 |
+
Super RSS reader has a PRO version which has more features to further enhance and to get more control of the RSS feed you display. With the PRO version you can enjoy below additional features included and also support the development of this plugin.
|
46 |
+
|
47 |
+
* **Shortcode** - Display RSS feed anywhere in your website using `[srr_feed]`
|
48 |
+
* **Grid display** - Display feed item in rows and columns
|
49 |
+
* **Custom feed item template** - Change order of feed item content, add HTML
|
50 |
+
* **4 new** color themes
|
51 |
+
|
52 |
+
[**More information**](https://www.aakashweb.com/wordpress-plugins/super-rss-reader-pro/?utm_source=readme&utm_medium=description&utm_campaign=srr-pro) - [Live demo](https://wpdemos.aakashweb.com/super-rss-reader-pro/?utm_source=readme&utm_medium=description&utm_campaign=srr-pro)
|
53 |
+
|
54 |
### Resources
|
55 |
|
56 |
* [FAQs](https://www.aakashweb.com/docs/super-rss-reader/faq/)
|
57 |
+
* [Documentation](https://www.aakashweb.com/docs/super-rss-reader/)
|
58 |
* [Support forum](https://www.aakashweb.com/forum/discuss/wordpress-plugins/super-rss-reader/)
|
59 |
|
60 |
## Installation
|
71 |
|
72 |
### My RSS feed is not refreshing !
|
73 |
|
74 |
+
By default WordPress caches the RSS feed for 12 hours. You can change this default value by adding the below code to your theme's function.php file.
|
|
|
|
|
75 |
|
76 |
`add_filter( 'wp_feed_cache_transient_lifetime', function($a) { return 600; } );`
|
77 |
|
79 |
|
80 |
You can also refer this post https://wordpress.org/support/topic/rss-not-updating-no-matter-which-plugin-i-try/#post-10123881 to change the refresh time for particular feed URL.
|
81 |
|
82 |
+
Also, please ensure WordPress cache plugins (like W3 total cache, Super cache etc.) are configured to not cache the page where this widget is active or increase the expiry of the cache so that old cached page is not served to the users.
|
83 |
+
|
84 |
### How can I customize the RSS widget via CSS styles ?
|
85 |
|
86 |
+
There is a list of CSS classes which are available to take control and customize the RSS feed to the design as intended. The complete list of CSS classes can be found in [this page](https://www.aakashweb.com/docs/super-rss-reader/faq/)
|
87 |
+
|
88 |
+
### RSS feed is not displayed or error is shown
|
89 |
|
90 |
+
This can happen when,
|
91 |
+
|
92 |
+
* The RSS feed URL is invalid.
|
93 |
+
* The feed URL is not accessible by the server.
|
94 |
+
* The feed content is not in the expected format or corrupt. Please use a [feed validation service](https://validator.w3.org/feed/) to validate the feed.
|
95 |
|
96 |
### Does this plugin support horizontal ticker ?
|
97 |
|
98 |
No, Super RSS Reader only supports vertical support feature for now.
|
99 |
|
100 |
+
### How to display the feeds in multiple tabs ?
|
101 |
+
|
102 |
+
Enter the RSS feed URLs separated by comma or in new line in the widget, the plugin automatically renders the tab.
|
103 |
|
104 |
+
### What are the contents shown in the feed ?
|
105 |
|
106 |
+
By default content like title, date, author, description, thumbnail can toggled to show in the feed.
|
107 |
|
108 |
+
### Can I change the order of the content shown in the feed ?
|
109 |
|
110 |
+
Yes, it is possible with the [PRO version](https://www.aakashweb.com/wordpress-plugins/super-rss-reader-pro/?utm_source=readme&utm_medium=faq&utm_campaign=srr-pro) of the plugin. In the free version we can toggle the content.
|
111 |
|
112 |
+
### Will the additional ticker effect slow down the site ?
|
113 |
+
|
114 |
+
The additional effect needs only 2.5 KB of additional JavaScript file which is very small since it is minified and optimized already.
|
115 |
+
|
116 |
+
[More FAQs in this page](https://www.aakashweb.com/docs/super-rss-reader/faq/)
|
117 |
|
118 |
## Screenshots
|
119 |
|
120 |
+
1. Super RSS Reader widgets shown in the sidebar, having a ticker effect and in tabbed mode.
|
121 |
+
1. RSS feed widget in different themes and for different feed URLs.
|
122 |
+
1. Some more examples of the RSS feed.
|
123 |
+
1. Widget options.
|
124 |
|
125 |
+
[Live working demo](https://www.aakashweb.com/demos/super-rss-reader/)
|
126 |
|
127 |
## Changelog
|
128 |
|
129 |
+
### 4.0
|
130 |
+
* New: Reliable thumbnails. Thumbnails will now be taken from multiple places like feed content.
|
131 |
+
* New: Thumbnail positions (align left, right and cover mode) and size can be changed.
|
132 |
+
* New: Widget options are now more refined, easy to find and use.
|
133 |
+
* New: Plugin is now translation ready.
|
134 |
+
* New: `noreferrer` added to the feed links.
|
135 |
+
* New: Stripe of feed items is now done using CSS class `srr-stripe` instead of `even`.
|
136 |
+
* New: Introducing [PRO version](https://www.aakashweb.com/wordpress-plugins/super-rss-reader-pro/?utm_source=readme&utm_medium=changelog&utm_campaign=srr-pro).
|
137 |
+
|
138 |
### 3.2
|
139 |
* Fix: Read more link not present
|
140 |
* New: Widgets settings is now clean and easy to use.
|
super-rss-reader.php
CHANGED
@@ -2,18 +2,18 @@
|
|
2 |
/*
|
3 |
* Plugin Name: Super RSS Reader
|
4 |
* Plugin URI: https://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
5 |
-
*
|
6 |
-
* Description: Super RSS Reader is jQuery based RSS reader widget, which displays the RSS feeds in the widget in an attractive way. It uses the jQuery easy ticker plugin to add a news ticker like effect to the RSS feeds. Multiple RSS feeds can be added for a single widget and they get separated in tabs.
|
7 |
* Author: Aakash Chakravarthy
|
8 |
* Author URI: https://www.aakashweb.com/
|
9 |
-
* Version:
|
10 |
* Text Domain: super-rss-reader
|
11 |
* Domain Path: /languages
|
12 |
*/
|
13 |
|
14 |
-
define( 'SRR_VERSION', '
|
15 |
define( 'SRR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
|
16 |
define( 'SRR_URL', plugin_dir_url( __FILE__ ) );
|
|
|
17 |
|
18 |
final class Super_RSS_Reader{
|
19 |
|
2 |
/*
|
3 |
* Plugin Name: Super RSS Reader
|
4 |
* Plugin URI: https://www.aakashweb.com/wordpress-plugins/super-rss-reader/
|
5 |
+
* Description: Display any RSS feed(s) in widget with news ticker effect in multiple tabs, thumbnails, customizable color themes and more.
|
|
|
6 |
* Author: Aakash Chakravarthy
|
7 |
* Author URI: https://www.aakashweb.com/
|
8 |
+
* Version: 4.0
|
9 |
* Text Domain: super-rss-reader
|
10 |
* Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
+
define( 'SRR_VERSION', '4.0' );
|
14 |
define( 'SRR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
|
15 |
define( 'SRR_URL', plugin_dir_url( __FILE__ ) );
|
16 |
+
define( 'SRR_BASE_NAME', plugin_basename( __FILE__ ) );
|
17 |
|
18 |
final class Super_RSS_Reader{
|
19 |
|