Version Description
- Now uses the Xavisys WordPress Plugin Framework - http://xavisys.com/xavisys-wordpress-plugin-framework/
- Added an options page where you can set defaults that apply to widgets, shortcodes, and php calls (everything can be overridden)
- Added the Xavisys feed to the dashboard (which can be hidden using the screen options)
- Fixed problem for people with certain WP configs and PHP 5.0-5.1.x that caused the Services_JSON class to get included twice.
- Fixed issue with urls in the form www.site.com
Download this release
Release Info
Developer | aaroncampbell |
Plugin | Twitter Widget Pro |
Version | 2.2.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.4 to 2.2.0
- languages/twitter-widget-pro-it_IT.mo +0 -0
- languages/twitter-widget-pro-it_IT.po +137 -58
- languages/twitter-widget-pro.pot +118 -56
- readme.txt +9 -1
- wp-twitter-widget.php +188 -110
- xavisys-plugin-framework.css +3 -0
- xavisys-plugin-framework.php +354 -0
languages/twitter-widget-pro-it_IT.mo
CHANGED
Binary file
|
languages/twitter-widget-pro-it_IT.po
CHANGED
@@ -6,10 +6,10 @@ msgid ""
|
|
6 |
msgstr ""
|
7 |
"Project-Id-Version: Twitter Widget Pro in italiano\n"
|
8 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twitter-widget-pro\n"
|
9 |
-
"POT-Creation-Date:
|
10 |
-
"PO-Revision-Date:
|
11 |
-
"Last-Translator: Gianni Diurno (aka gidibao) <gidibao
|
12 |
-
"Language-Team: Gianni Diurno |
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -17,207 +17,290 @@ msgstr ""
|
|
17 |
"X-Poedit-Language: Italian\n"
|
18 |
"X-Poedit-Country: ITALY\n"
|
19 |
|
20 |
-
#: wp-twitter-widget.php:
|
21 |
msgid "Follow a Twitter Feed"
|
22 |
msgstr "Segui un feed di Twitter"
|
23 |
|
24 |
-
#: wp-twitter-widget.php:
|
|
|
25 |
msgid "Twitter Widget Pro"
|
26 |
msgstr "Twitter Widget Pro"
|
27 |
|
28 |
#: wp-twitter-widget.php:63
|
29 |
-
#: wp-twitter-widget.php:
|
30 |
-
msgid "h:i:s A F d, Y"
|
31 |
-
msgstr "H:i:s F d Y"
|
32 |
-
|
33 |
-
#: wp-twitter-widget.php:74
|
34 |
msgid "Twitter username:"
|
35 |
msgstr "Nome utente Twitter:"
|
36 |
|
37 |
-
#: wp-twitter-widget.php:
|
38 |
msgid "username"
|
39 |
msgstr "Nome utente"
|
40 |
|
41 |
-
#: wp-twitter-widget.php:
|
|
|
42 |
msgid "Give the feed a title (optional):"
|
43 |
msgstr "Nome per il feed (facoltativo):"
|
44 |
|
45 |
-
#: wp-twitter-widget.php:
|
46 |
msgid "title"
|
47 |
msgstr "Titolo"
|
48 |
|
49 |
-
#: wp-twitter-widget.php:
|
|
|
50 |
msgid "How many items would you like to display?"
|
51 |
msgstr "Quanti messaggi desideri mostrare?"
|
52 |
|
53 |
-
#: wp-twitter-widget.php:
|
|
|
54 |
msgid "Hide @replies"
|
55 |
msgstr "nascondi @replies"
|
56 |
|
57 |
-
#: wp-twitter-widget.php:
|
|
|
58 |
msgid "What to display when Twitter is down (optional):"
|
59 |
msgstr "Mostra quando Twitter é fuori servizio (facoltativo):"
|
60 |
|
61 |
-
#: wp-twitter-widget.php:
|
62 |
msgid "errmsg"
|
63 |
msgstr "errmsg"
|
64 |
|
65 |
-
#: wp-twitter-widget.php:
|
|
|
66 |
msgid "Number of seconds to wait for a response from Twitter (default 2):"
|
67 |
msgstr "Secondi di attesa per una risposta da Twitter (predefinito 2):"
|
68 |
|
69 |
-
#: wp-twitter-widget.php:
|
70 |
msgid "fetchTimeOut"
|
71 |
msgstr "fetchTimeOut"
|
72 |
|
73 |
-
#: wp-twitter-widget.php:
|
|
|
74 |
msgid "Show date/time of Tweet (rather than 2 ____ ago):"
|
75 |
msgstr "Mostra data/ora del messaggio (piuttosto che 2 ____ fa):"
|
76 |
|
77 |
-
#: wp-twitter-widget.php:
|
|
|
78 |
msgid "Always"
|
79 |
msgstr "sempre"
|
80 |
|
81 |
-
#: wp-twitter-widget.php:
|
|
|
82 |
msgid "If over an hour old"
|
83 |
msgstr "se più di un'ora"
|
84 |
|
85 |
-
#: wp-twitter-widget.php:
|
|
|
86 |
msgid "If over a day old"
|
87 |
msgstr "se più di un giorno"
|
88 |
|
89 |
-
#: wp-twitter-widget.php:
|
|
|
90 |
msgid "If over a week old"
|
91 |
msgstr "se più di una settimana"
|
92 |
|
93 |
-
#: wp-twitter-widget.php:
|
|
|
94 |
msgid "If over a month old"
|
95 |
msgstr "se più di un mese"
|
96 |
|
97 |
-
#: wp-twitter-widget.php:
|
|
|
98 |
msgid "If over a year old"
|
99 |
msgstr "se più di un anno"
|
100 |
|
101 |
-
#: wp-twitter-widget.php:
|
|
|
102 |
msgid "Never"
|
103 |
msgstr "mai"
|
104 |
|
105 |
-
#: wp-twitter-widget.php:
|
|
|
106 |
#, php-format
|
107 |
msgid "Format to dispaly the date in, uses <a href=\"%s\">PHP date()</a> format:"
|
108 |
msgstr "Qualora decidessi di mostrare la data, utilizza il formato <a href=\"%s\">PHP date()</a>:"
|
109 |
|
110 |
-
#: wp-twitter-widget.php:
|
111 |
msgid "dateFormat"
|
112 |
msgstr "formato data"
|
113 |
|
114 |
-
#: wp-twitter-widget.php:
|
|
|
115 |
msgid "Hide RSS Icon and Link"
|
116 |
msgstr "nascondi icona e link RSS"
|
117 |
|
118 |
-
#: wp-twitter-widget.php:
|
|
|
119 |
msgid "Open links in a new window"
|
120 |
msgstr "Apri i link in una nuova finestra."
|
121 |
|
122 |
-
#: wp-twitter-widget.php:
|
|
|
123 |
msgid "Show Profile Image"
|
124 |
msgstr "mostra immagine profilo"
|
125 |
|
126 |
-
#: wp-twitter-widget.php:
|
|
|
127 |
msgid "Show Link to Twitter Widget Pro"
|
128 |
msgstr "mostra il link a Twitter Widget Pro"
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
#: wp-twitter-widget.php:256
|
131 |
-
|
132 |
-
|
|
|
133 |
|
134 |
-
#: wp-twitter-widget.php:
|
135 |
-
msgid "
|
136 |
-
msgstr "
|
137 |
|
138 |
-
#: wp-twitter-widget.php:
|
139 |
msgid "Syndicate this content"
|
140 |
msgstr "Abbonati a questo contenuto"
|
141 |
|
142 |
-
#: wp-twitter-widget.php:
|
143 |
msgid "No Tweets Available"
|
144 |
msgstr "Nessun messaggio disponibile"
|
145 |
|
146 |
-
#: wp-twitter-widget.php:
|
147 |
#, php-format
|
148 |
msgid "from %s"
|
149 |
msgstr "da %s"
|
150 |
|
151 |
-
#: wp-twitter-widget.php:
|
152 |
#, php-format
|
153 |
msgid "in reply to %s"
|
154 |
msgstr "in risposta a %s"
|
155 |
|
156 |
-
#: wp-twitter-widget.php:
|
157 |
msgid "Get Twitter Widget for your WordPress site"
|
158 |
msgstr "Usa Twitter Widget per il tuo sito WordPress"
|
159 |
|
160 |
-
#: wp-twitter-widget.php:
|
161 |
msgid "Powered by"
|
162 |
msgstr "Powered by"
|
163 |
|
164 |
-
#: wp-twitter-widget.php:
|
165 |
msgid "Invalid Twitter Response."
|
166 |
msgstr "Risposta da Twitter non valida."
|
167 |
|
168 |
-
#: wp-twitter-widget.php:
|
169 |
msgid "Could not connect to Twitter"
|
170 |
msgstr "Non é stato possibile connettersi a Twitter"
|
171 |
|
172 |
-
#: wp-twitter-widget.php:
|
173 |
#, php-format
|
174 |
msgid "about %s year ago"
|
175 |
msgid_plural "about %s years ago"
|
176 |
msgstr[0] "circa %s anno fa"
|
177 |
msgstr[1] "circa %s anni fa"
|
178 |
|
179 |
-
#: wp-twitter-widget.php:
|
180 |
#, php-format
|
181 |
msgid "about %s month ago"
|
182 |
msgid_plural "about %s months ago"
|
183 |
msgstr[0] "circa %s mese fa"
|
184 |
msgstr[1] "circa %s mesi fa"
|
185 |
|
186 |
-
#: wp-twitter-widget.php:
|
187 |
#, php-format
|
188 |
msgid "about %s week ago"
|
189 |
msgid_plural "about %s weeks ago"
|
190 |
msgstr[0] "circa %s settimana fa"
|
191 |
msgstr[1] "circa %s settimane fa"
|
192 |
|
193 |
-
#: wp-twitter-widget.php:
|
194 |
#, php-format
|
195 |
msgid "about %s day ago"
|
196 |
msgid_plural "about %s days ago"
|
197 |
msgstr[0] "circa %s giorno fa"
|
198 |
msgstr[1] "circa %s giorni fa"
|
199 |
|
200 |
-
#: wp-twitter-widget.php:
|
201 |
#, php-format
|
202 |
msgid "about %s hour ago"
|
203 |
msgid_plural "about %s hours ago"
|
204 |
msgstr[0] "circa %s ora fa"
|
205 |
msgstr[1] "circa %s ore fa"
|
206 |
|
207 |
-
#: wp-twitter-widget.php:
|
208 |
#, php-format
|
209 |
msgid "about %s minute ago"
|
210 |
msgid_plural "about %s minutes ago"
|
211 |
msgstr[0] "circa %s minunto fa"
|
212 |
msgstr[1] "circa %s minunti fa"
|
213 |
|
214 |
-
#: wp-twitter-widget.php:
|
215 |
#, php-format
|
216 |
msgid "about %s second ago"
|
217 |
msgid_plural "about %s seconds ago"
|
218 |
msgstr[0] "circa %s secondo fa"
|
219 |
msgstr[1] "circa %s secondi fa"
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
#~ msgid ""
|
222 |
#~ "Powered by <a href=\"%s\" title=\"Get Twitter Widget for your WordPress "
|
223 |
#~ "site\">WordPress Twitter Widget Pro</a>"
|
@@ -245,8 +328,4 @@ msgstr[1] "circa %s secondi fa"
|
|
245 |
#~ "Le informazioni verrano inviate in forma anonima. Un identificatore unico "
|
246 |
#~ "sarà comunque inviato affinché non siano presi in considerazione i "
|
247 |
#~ "duplicati provenienti dalla stessa installazione."
|
248 |
-
#~ msgid "Update Options »"
|
249 |
-
#~ msgstr "Aggiorna le opzioni »"
|
250 |
-
#~ msgid "Settings"
|
251 |
-
#~ msgstr "Impostazioni"
|
252 |
|
6 |
msgstr ""
|
7 |
"Project-Id-Version: Twitter Widget Pro in italiano\n"
|
8 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twitter-widget-pro\n"
|
9 |
+
"POT-Creation-Date: 2010-02-06 16:24+0000\n"
|
10 |
+
"PO-Revision-Date: 2010-02-06 20:41+0100\n"
|
11 |
+
"Last-Translator: Gianni Diurno (aka gidibao) <gidibao[at]gmail[dot]com>\n"
|
12 |
+
"Language-Team: Gianni Diurno | gidibao.net <gidibao[at]gmail[dot]com>\n"
|
13 |
"MIME-Version: 1.0\n"
|
14 |
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
"Content-Transfer-Encoding: 8bit\n"
|
17 |
"X-Poedit-Language: Italian\n"
|
18 |
"X-Poedit-Country: ITALY\n"
|
19 |
|
20 |
+
#: wp-twitter-widget.php:41
|
21 |
msgid "Follow a Twitter Feed"
|
22 |
msgstr "Segui un feed di Twitter"
|
23 |
|
24 |
+
#: wp-twitter-widget.php:48
|
25 |
+
#: wp-twitter-widget.php:171
|
26 |
msgid "Twitter Widget Pro"
|
27 |
msgstr "Twitter Widget Pro"
|
28 |
|
29 |
#: wp-twitter-widget.php:63
|
30 |
+
#: wp-twitter-widget.php:215
|
|
|
|
|
|
|
|
|
31 |
msgid "Twitter username:"
|
32 |
msgstr "Nome utente Twitter:"
|
33 |
|
34 |
+
#: wp-twitter-widget.php:64
|
35 |
msgid "username"
|
36 |
msgstr "Nome utente"
|
37 |
|
38 |
+
#: wp-twitter-widget.php:67
|
39 |
+
#: wp-twitter-widget.php:223
|
40 |
msgid "Give the feed a title (optional):"
|
41 |
msgstr "Nome per il feed (facoltativo):"
|
42 |
|
43 |
+
#: wp-twitter-widget.php:68
|
44 |
msgid "title"
|
45 |
msgstr "Titolo"
|
46 |
|
47 |
+
#: wp-twitter-widget.php:71
|
48 |
+
#: wp-twitter-widget.php:231
|
49 |
msgid "How many items would you like to display?"
|
50 |
msgstr "Quanti messaggi desideri mostrare?"
|
51 |
|
52 |
+
#: wp-twitter-widget.php:82
|
53 |
+
#: wp-twitter-widget.php:289
|
54 |
msgid "Hide @replies"
|
55 |
msgstr "nascondi @replies"
|
56 |
|
57 |
+
#: wp-twitter-widget.php:85
|
58 |
+
#: wp-twitter-widget.php:245
|
59 |
msgid "What to display when Twitter is down (optional):"
|
60 |
msgstr "Mostra quando Twitter é fuori servizio (facoltativo):"
|
61 |
|
62 |
+
#: wp-twitter-widget.php:86
|
63 |
msgid "errmsg"
|
64 |
msgstr "errmsg"
|
65 |
|
66 |
+
#: wp-twitter-widget.php:89
|
67 |
+
#: wp-twitter-widget.php:253
|
68 |
msgid "Number of seconds to wait for a response from Twitter (default 2):"
|
69 |
msgstr "Secondi di attesa per una risposta da Twitter (predefinito 2):"
|
70 |
|
71 |
+
#: wp-twitter-widget.php:90
|
72 |
msgid "fetchTimeOut"
|
73 |
msgstr "fetchTimeOut"
|
74 |
|
75 |
+
#: wp-twitter-widget.php:93
|
76 |
+
#: wp-twitter-widget.php:261
|
77 |
msgid "Show date/time of Tweet (rather than 2 ____ ago):"
|
78 |
msgstr "Mostra data/ora del messaggio (piuttosto che 2 ____ fa):"
|
79 |
|
80 |
+
#: wp-twitter-widget.php:95
|
81 |
+
#: wp-twitter-widget.php:265
|
82 |
msgid "Always"
|
83 |
msgstr "sempre"
|
84 |
|
85 |
+
#: wp-twitter-widget.php:96
|
86 |
+
#: wp-twitter-widget.php:266
|
87 |
msgid "If over an hour old"
|
88 |
msgstr "se più di un'ora"
|
89 |
|
90 |
+
#: wp-twitter-widget.php:97
|
91 |
+
#: wp-twitter-widget.php:267
|
92 |
msgid "If over a day old"
|
93 |
msgstr "se più di un giorno"
|
94 |
|
95 |
+
#: wp-twitter-widget.php:98
|
96 |
+
#: wp-twitter-widget.php:268
|
97 |
msgid "If over a week old"
|
98 |
msgstr "se più di una settimana"
|
99 |
|
100 |
+
#: wp-twitter-widget.php:99
|
101 |
+
#: wp-twitter-widget.php:269
|
102 |
msgid "If over a month old"
|
103 |
msgstr "se più di un mese"
|
104 |
|
105 |
+
#: wp-twitter-widget.php:100
|
106 |
+
#: wp-twitter-widget.php:270
|
107 |
msgid "If over a year old"
|
108 |
msgstr "se più di un anno"
|
109 |
|
110 |
+
#: wp-twitter-widget.php:101
|
111 |
+
#: wp-twitter-widget.php:271
|
112 |
msgid "Never"
|
113 |
msgstr "mai"
|
114 |
|
115 |
+
#: wp-twitter-widget.php:105
|
116 |
+
#: wp-twitter-widget.php:277
|
117 |
#, php-format
|
118 |
msgid "Format to dispaly the date in, uses <a href=\"%s\">PHP date()</a> format:"
|
119 |
msgstr "Qualora decidessi di mostrare la data, utilizza il formato <a href=\"%s\">PHP date()</a>:"
|
120 |
|
121 |
+
#: wp-twitter-widget.php:106
|
122 |
msgid "dateFormat"
|
123 |
msgstr "formato data"
|
124 |
|
125 |
+
#: wp-twitter-widget.php:110
|
126 |
+
#: wp-twitter-widget.php:292
|
127 |
msgid "Hide RSS Icon and Link"
|
128 |
msgstr "nascondi icona e link RSS"
|
129 |
|
130 |
+
#: wp-twitter-widget.php:114
|
131 |
+
#: wp-twitter-widget.php:295
|
132 |
msgid "Open links in a new window"
|
133 |
msgstr "Apri i link in una nuova finestra."
|
134 |
|
135 |
+
#: wp-twitter-widget.php:118
|
136 |
+
#: wp-twitter-widget.php:298
|
137 |
msgid "Show Profile Image"
|
138 |
msgstr "mostra immagine profilo"
|
139 |
|
140 |
+
#: wp-twitter-widget.php:122
|
141 |
+
#: wp-twitter-widget.php:301
|
142 |
msgid "Show Link to Twitter Widget Pro"
|
143 |
msgstr "mostra il link a Twitter Widget Pro"
|
144 |
|
145 |
+
#: wp-twitter-widget.php:172
|
146 |
+
msgid "Twitter Widget"
|
147 |
+
msgstr "Twitter Widget"
|
148 |
+
|
149 |
+
#: wp-twitter-widget.php:207
|
150 |
+
msgid "General Settings"
|
151 |
+
msgstr "Impostazioni generali"
|
152 |
+
|
153 |
+
#: wp-twitter-widget.php:218
|
154 |
+
#: wp-twitter-widget.php:226
|
155 |
+
#: wp-twitter-widget.php:248
|
156 |
#: wp-twitter-widget.php:256
|
157 |
+
#: wp-twitter-widget.php:280
|
158 |
+
msgid "twp"
|
159 |
+
msgstr "twp"
|
160 |
|
161 |
+
#: wp-twitter-widget.php:285
|
162 |
+
msgid "Other Setting:"
|
163 |
+
msgstr "Altre impostazioni:"
|
164 |
|
165 |
+
#: wp-twitter-widget.php:472
|
166 |
msgid "Syndicate this content"
|
167 |
msgstr "Abbonati a questo contenuto"
|
168 |
|
169 |
+
#: wp-twitter-widget.php:499
|
170 |
msgid "No Tweets Available"
|
171 |
msgstr "Nessun messaggio disponibile"
|
172 |
|
173 |
+
#: wp-twitter-widget.php:507
|
174 |
#, php-format
|
175 |
msgid "from %s"
|
176 |
msgstr "da %s"
|
177 |
|
178 |
+
#: wp-twitter-widget.php:519
|
179 |
#, php-format
|
180 |
msgid "in reply to %s"
|
181 |
msgstr "in risposta a %s"
|
182 |
|
183 |
+
#: wp-twitter-widget.php:541
|
184 |
msgid "Get Twitter Widget for your WordPress site"
|
185 |
msgstr "Usa Twitter Widget per il tuo sito WordPress"
|
186 |
|
187 |
+
#: wp-twitter-widget.php:543
|
188 |
msgid "Powered by"
|
189 |
msgstr "Powered by"
|
190 |
|
191 |
+
#: wp-twitter-widget.php:601
|
192 |
msgid "Invalid Twitter Response."
|
193 |
msgstr "Risposta da Twitter non valida."
|
194 |
|
195 |
+
#: wp-twitter-widget.php:615
|
196 |
msgid "Could not connect to Twitter"
|
197 |
msgstr "Non é stato possibile connettersi a Twitter"
|
198 |
|
199 |
+
#: wp-twitter-widget.php:678
|
200 |
#, php-format
|
201 |
msgid "about %s year ago"
|
202 |
msgid_plural "about %s years ago"
|
203 |
msgstr[0] "circa %s anno fa"
|
204 |
msgstr[1] "circa %s anni fa"
|
205 |
|
206 |
+
#: wp-twitter-widget.php:679
|
207 |
#, php-format
|
208 |
msgid "about %s month ago"
|
209 |
msgid_plural "about %s months ago"
|
210 |
msgstr[0] "circa %s mese fa"
|
211 |
msgstr[1] "circa %s mesi fa"
|
212 |
|
213 |
+
#: wp-twitter-widget.php:680
|
214 |
#, php-format
|
215 |
msgid "about %s week ago"
|
216 |
msgid_plural "about %s weeks ago"
|
217 |
msgstr[0] "circa %s settimana fa"
|
218 |
msgstr[1] "circa %s settimane fa"
|
219 |
|
220 |
+
#: wp-twitter-widget.php:681
|
221 |
#, php-format
|
222 |
msgid "about %s day ago"
|
223 |
msgid_plural "about %s days ago"
|
224 |
msgstr[0] "circa %s giorno fa"
|
225 |
msgstr[1] "circa %s giorni fa"
|
226 |
|
227 |
+
#: wp-twitter-widget.php:682
|
228 |
#, php-format
|
229 |
msgid "about %s hour ago"
|
230 |
msgid_plural "about %s hours ago"
|
231 |
msgstr[0] "circa %s ora fa"
|
232 |
msgstr[1] "circa %s ore fa"
|
233 |
|
234 |
+
#: wp-twitter-widget.php:683
|
235 |
#, php-format
|
236 |
msgid "about %s minute ago"
|
237 |
msgid_plural "about %s minutes ago"
|
238 |
msgstr[0] "circa %s minunto fa"
|
239 |
msgstr[1] "circa %s minunti fa"
|
240 |
|
241 |
+
#: wp-twitter-widget.php:684
|
242 |
#, php-format
|
243 |
msgid "about %s second ago"
|
244 |
msgid_plural "about %s seconds ago"
|
245 |
msgstr[0] "circa %s secondo fa"
|
246 |
msgstr[1] "circa %s secondi fa"
|
247 |
|
248 |
+
#: wp-twitter-widget.php:728
|
249 |
+
#: wp-twitter-widget.php:789
|
250 |
+
msgid "h:i:s A F d, Y"
|
251 |
+
msgstr "H:i:s F d Y"
|
252 |
+
|
253 |
+
#: xavisys-plugin-framework.php:199
|
254 |
+
msgid "Update Options »"
|
255 |
+
msgstr "Aggiorna le opzioni »"
|
256 |
+
|
257 |
+
#: xavisys-plugin-framework.php:236
|
258 |
+
msgid "Donate"
|
259 |
+
msgstr "Donazioni"
|
260 |
+
|
261 |
+
#: xavisys-plugin-framework.php:243
|
262 |
+
msgid "Support Forum"
|
263 |
+
msgstr "Forum di supporto"
|
264 |
+
|
265 |
+
#: xavisys-plugin-framework.php:251
|
266 |
+
msgid "Donate to show your appreciation."
|
267 |
+
msgstr "Effettua una donazione per mostrare il tuo gradimento del plugin."
|
268 |
+
|
269 |
+
#: xavisys-plugin-framework.php:262
|
270 |
+
msgid "Settings"
|
271 |
+
msgstr "Impostazioni"
|
272 |
+
|
273 |
+
#: xavisys-plugin-framework.php:279
|
274 |
+
msgid "Like this Plugin?"
|
275 |
+
msgstr "Ti é piaciuto il plugin?"
|
276 |
+
|
277 |
+
#: xavisys-plugin-framework.php:280
|
278 |
+
msgid "Need Support?"
|
279 |
+
msgstr "Serve aiuto?"
|
280 |
+
|
281 |
+
#: xavisys-plugin-framework.php:281
|
282 |
+
msgid "Latest news from Xavisys"
|
283 |
+
msgstr "Ultime notizie da Xavisys"
|
284 |
+
|
285 |
+
#: xavisys-plugin-framework.php:286
|
286 |
+
msgid "Then please do any or all of the following:"
|
287 |
+
msgstr "Quindi, fai quanto segue:"
|
288 |
+
|
289 |
+
#: xavisys-plugin-framework.php:291
|
290 |
+
msgid "Link to it so others can find out about it."
|
291 |
+
msgstr "Pubblica una recensione sul plugin."
|
292 |
+
|
293 |
+
#: xavisys-plugin-framework.php:296
|
294 |
+
msgid "Give it a good rating on WordPress.org."
|
295 |
+
msgstr "Vota il plugin su WordPress.org."
|
296 |
+
|
297 |
+
#: xavisys-plugin-framework.php:306
|
298 |
+
#, php-format
|
299 |
+
msgid "If you have any problems with this plugin or ideas for improvements or enhancements, please use the <a href=\"%s\">Xavisys Support Forums</a>."
|
300 |
+
msgstr "In caso di problemi, suggerimenti e segnalazioni di bug, visitare il forum di supporto <a href=\"%s\">Xavisys</a>."
|
301 |
+
|
302 |
+
#~ msgid "Manage Widgets"
|
303 |
+
#~ msgstr "Gestione widget"
|
304 |
#~ msgid ""
|
305 |
#~ "Powered by <a href=\"%s\" title=\"Get Twitter Widget for your WordPress "
|
306 |
#~ "site\">WordPress Twitter Widget Pro</a>"
|
328 |
#~ "Le informazioni verrano inviate in forma anonima. Un identificatore unico "
|
329 |
#~ "sarà comunque inviato affinché non siano presi in considerazione i "
|
330 |
#~ "duplicati provenienti dalla stessa installazione."
|
|
|
|
|
|
|
|
|
331 |
|
languages/twitter-widget-pro.pot
CHANGED
@@ -1,218 +1,280 @@
|
|
1 |
-
#
|
2 |
-
#
|
3 |
-
#
|
|
|
4 |
#
|
5 |
#, fuzzy
|
6 |
msgid ""
|
7 |
msgstr ""
|
8 |
-
"Project-Id-Version:
|
9 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twitter-widget-pro\n"
|
10 |
-
"POT-Creation-Date:
|
11 |
-
"PO-Revision-Date:
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
"MIME-Version: 1.0\n"
|
15 |
-
"Content-Type: text/plain; charset=
|
16 |
"Content-Transfer-Encoding: 8bit\n"
|
17 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
18 |
|
19 |
-
#: wp-twitter-widget.php:
|
20 |
msgid "Follow a Twitter Feed"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: wp-twitter-widget.php:
|
24 |
msgid "Twitter Widget Pro"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: wp-twitter-widget.php:63 wp-twitter-widget.php:
|
28 |
-
msgid "h:i:s A F d, Y"
|
29 |
-
msgstr ""
|
30 |
-
|
31 |
-
#: wp-twitter-widget.php:74
|
32 |
msgid "Twitter username:"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: wp-twitter-widget.php:
|
36 |
msgid "username"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: wp-twitter-widget.php:
|
40 |
msgid "Give the feed a title (optional):"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: wp-twitter-widget.php:
|
44 |
msgid "title"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: wp-twitter-widget.php:
|
48 |
msgid "How many items would you like to display?"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: wp-twitter-widget.php:
|
52 |
msgid "Hide @replies"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: wp-twitter-widget.php:
|
56 |
msgid "What to display when Twitter is down (optional):"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: wp-twitter-widget.php:
|
60 |
msgid "errmsg"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: wp-twitter-widget.php:
|
64 |
msgid "Number of seconds to wait for a response from Twitter (default 2):"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: wp-twitter-widget.php:
|
68 |
msgid "fetchTimeOut"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: wp-twitter-widget.php:
|
72 |
msgid "Show date/time of Tweet (rather than 2 ____ ago):"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: wp-twitter-widget.php:
|
76 |
msgid "Always"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: wp-twitter-widget.php:
|
80 |
msgid "If over an hour old"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: wp-twitter-widget.php:
|
84 |
msgid "If over a day old"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: wp-twitter-widget.php:
|
88 |
msgid "If over a week old"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: wp-twitter-widget.php:
|
92 |
msgid "If over a month old"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: wp-twitter-widget.php:
|
96 |
msgid "If over a year old"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: wp-twitter-widget.php:
|
100 |
msgid "Never"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: wp-twitter-widget.php:
|
104 |
#, php-format
|
105 |
msgid ""
|
106 |
"Format to dispaly the date in, uses <a href=\"%s\">PHP date()</a> format:"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: wp-twitter-widget.php:
|
110 |
msgid "dateFormat"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: wp-twitter-widget.php:
|
114 |
msgid "Hide RSS Icon and Link"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: wp-twitter-widget.php:
|
118 |
msgid "Open links in a new window"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: wp-twitter-widget.php:
|
122 |
msgid "Show Profile Image"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: wp-twitter-widget.php:
|
126 |
msgid "Show Link to Twitter Widget Pro"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: wp-twitter-widget.php:
|
130 |
-
msgid "
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: wp-twitter-widget.php:
|
134 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: wp-twitter-widget.php:
|
138 |
msgid "Syndicate this content"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: wp-twitter-widget.php:
|
142 |
msgid "No Tweets Available"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: wp-twitter-widget.php:
|
146 |
#, php-format
|
147 |
msgid "from %s"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: wp-twitter-widget.php:
|
151 |
#, php-format
|
152 |
msgid "in reply to %s"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: wp-twitter-widget.php:
|
156 |
msgid "Get Twitter Widget for your WordPress site"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: wp-twitter-widget.php:
|
160 |
msgid "Powered by"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: wp-twitter-widget.php:
|
164 |
msgid "Invalid Twitter Response."
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: wp-twitter-widget.php:
|
168 |
msgid "Could not connect to Twitter"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: wp-twitter-widget.php:
|
172 |
#, php-format
|
173 |
msgid "about %s year ago"
|
174 |
msgid_plural "about %s years ago"
|
175 |
msgstr[0] ""
|
176 |
msgstr[1] ""
|
177 |
|
178 |
-
#: wp-twitter-widget.php:
|
179 |
#, php-format
|
180 |
msgid "about %s month ago"
|
181 |
msgid_plural "about %s months ago"
|
182 |
msgstr[0] ""
|
183 |
msgstr[1] ""
|
184 |
|
185 |
-
#: wp-twitter-widget.php:
|
186 |
#, php-format
|
187 |
msgid "about %s week ago"
|
188 |
msgid_plural "about %s weeks ago"
|
189 |
msgstr[0] ""
|
190 |
msgstr[1] ""
|
191 |
|
192 |
-
#: wp-twitter-widget.php:
|
193 |
#, php-format
|
194 |
msgid "about %s day ago"
|
195 |
msgid_plural "about %s days ago"
|
196 |
msgstr[0] ""
|
197 |
msgstr[1] ""
|
198 |
|
199 |
-
#: wp-twitter-widget.php:
|
200 |
#, php-format
|
201 |
msgid "about %s hour ago"
|
202 |
msgid_plural "about %s hours ago"
|
203 |
msgstr[0] ""
|
204 |
msgstr[1] ""
|
205 |
|
206 |
-
#: wp-twitter-widget.php:
|
207 |
#, php-format
|
208 |
msgid "about %s minute ago"
|
209 |
msgid_plural "about %s minutes ago"
|
210 |
msgstr[0] ""
|
211 |
msgstr[1] ""
|
212 |
|
213 |
-
#: wp-twitter-widget.php:
|
214 |
#, php-format
|
215 |
msgid "about %s second ago"
|
216 |
msgid_plural "about %s seconds ago"
|
217 |
msgstr[0] ""
|
218 |
msgstr[1] ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin by .
|
2 |
+
# Copyright (C) 2010
|
3 |
+
# This file is distributed under the same license as the package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
#
|
6 |
#, fuzzy
|
7 |
msgid ""
|
8 |
msgstr ""
|
9 |
+
"Project-Id-Version: \n"
|
10 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twitter-widget-pro\n"
|
11 |
+
"POT-Creation-Date: 2010-02-06 16:24+0000\n"
|
12 |
+
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
"MIME-Version: 1.0\n"
|
16 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
17 |
"Content-Transfer-Encoding: 8bit\n"
|
18 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19 |
|
20 |
+
#: wp-twitter-widget.php:41
|
21 |
msgid "Follow a Twitter Feed"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: wp-twitter-widget.php:48 wp-twitter-widget.php:171
|
25 |
msgid "Twitter Widget Pro"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: wp-twitter-widget.php:63 wp-twitter-widget.php:215
|
|
|
|
|
|
|
|
|
29 |
msgid "Twitter username:"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: wp-twitter-widget.php:64
|
33 |
msgid "username"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: wp-twitter-widget.php:67 wp-twitter-widget.php:223
|
37 |
msgid "Give the feed a title (optional):"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: wp-twitter-widget.php:68
|
41 |
msgid "title"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: wp-twitter-widget.php:71 wp-twitter-widget.php:231
|
45 |
msgid "How many items would you like to display?"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: wp-twitter-widget.php:82 wp-twitter-widget.php:289
|
49 |
msgid "Hide @replies"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: wp-twitter-widget.php:85 wp-twitter-widget.php:245
|
53 |
msgid "What to display when Twitter is down (optional):"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: wp-twitter-widget.php:86
|
57 |
msgid "errmsg"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: wp-twitter-widget.php:89 wp-twitter-widget.php:253
|
61 |
msgid "Number of seconds to wait for a response from Twitter (default 2):"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: wp-twitter-widget.php:90
|
65 |
msgid "fetchTimeOut"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: wp-twitter-widget.php:93 wp-twitter-widget.php:261
|
69 |
msgid "Show date/time of Tweet (rather than 2 ____ ago):"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: wp-twitter-widget.php:95 wp-twitter-widget.php:265
|
73 |
msgid "Always"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: wp-twitter-widget.php:96 wp-twitter-widget.php:266
|
77 |
msgid "If over an hour old"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: wp-twitter-widget.php:97 wp-twitter-widget.php:267
|
81 |
msgid "If over a day old"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: wp-twitter-widget.php:98 wp-twitter-widget.php:268
|
85 |
msgid "If over a week old"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: wp-twitter-widget.php:99 wp-twitter-widget.php:269
|
89 |
msgid "If over a month old"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: wp-twitter-widget.php:100 wp-twitter-widget.php:270
|
93 |
msgid "If over a year old"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: wp-twitter-widget.php:101 wp-twitter-widget.php:271
|
97 |
msgid "Never"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: wp-twitter-widget.php:105 wp-twitter-widget.php:277
|
101 |
#, php-format
|
102 |
msgid ""
|
103 |
"Format to dispaly the date in, uses <a href=\"%s\">PHP date()</a> format:"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: wp-twitter-widget.php:106
|
107 |
msgid "dateFormat"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: wp-twitter-widget.php:110 wp-twitter-widget.php:292
|
111 |
msgid "Hide RSS Icon and Link"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: wp-twitter-widget.php:114 wp-twitter-widget.php:295
|
115 |
msgid "Open links in a new window"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: wp-twitter-widget.php:118 wp-twitter-widget.php:298
|
119 |
msgid "Show Profile Image"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: wp-twitter-widget.php:122 wp-twitter-widget.php:301
|
123 |
msgid "Show Link to Twitter Widget Pro"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: wp-twitter-widget.php:172
|
127 |
+
msgid "Twitter Widget"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: wp-twitter-widget.php:207
|
131 |
+
msgid "General Settings"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: wp-twitter-widget.php:218 wp-twitter-widget.php:226
|
135 |
+
#: wp-twitter-widget.php:248 wp-twitter-widget.php:256
|
136 |
+
#: wp-twitter-widget.php:280
|
137 |
+
msgid "twp"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: wp-twitter-widget.php:285
|
141 |
+
msgid "Other Setting:"
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: wp-twitter-widget.php:472
|
145 |
msgid "Syndicate this content"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: wp-twitter-widget.php:499
|
149 |
msgid "No Tweets Available"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: wp-twitter-widget.php:507
|
153 |
#, php-format
|
154 |
msgid "from %s"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: wp-twitter-widget.php:519
|
158 |
#, php-format
|
159 |
msgid "in reply to %s"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: wp-twitter-widget.php:541
|
163 |
msgid "Get Twitter Widget for your WordPress site"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: wp-twitter-widget.php:543
|
167 |
msgid "Powered by"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: wp-twitter-widget.php:601
|
171 |
msgid "Invalid Twitter Response."
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: wp-twitter-widget.php:615
|
175 |
msgid "Could not connect to Twitter"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: wp-twitter-widget.php:678
|
179 |
#, php-format
|
180 |
msgid "about %s year ago"
|
181 |
msgid_plural "about %s years ago"
|
182 |
msgstr[0] ""
|
183 |
msgstr[1] ""
|
184 |
|
185 |
+
#: wp-twitter-widget.php:679
|
186 |
#, php-format
|
187 |
msgid "about %s month ago"
|
188 |
msgid_plural "about %s months ago"
|
189 |
msgstr[0] ""
|
190 |
msgstr[1] ""
|
191 |
|
192 |
+
#: wp-twitter-widget.php:680
|
193 |
#, php-format
|
194 |
msgid "about %s week ago"
|
195 |
msgid_plural "about %s weeks ago"
|
196 |
msgstr[0] ""
|
197 |
msgstr[1] ""
|
198 |
|
199 |
+
#: wp-twitter-widget.php:681
|
200 |
#, php-format
|
201 |
msgid "about %s day ago"
|
202 |
msgid_plural "about %s days ago"
|
203 |
msgstr[0] ""
|
204 |
msgstr[1] ""
|
205 |
|
206 |
+
#: wp-twitter-widget.php:682
|
207 |
#, php-format
|
208 |
msgid "about %s hour ago"
|
209 |
msgid_plural "about %s hours ago"
|
210 |
msgstr[0] ""
|
211 |
msgstr[1] ""
|
212 |
|
213 |
+
#: wp-twitter-widget.php:683
|
214 |
#, php-format
|
215 |
msgid "about %s minute ago"
|
216 |
msgid_plural "about %s minutes ago"
|
217 |
msgstr[0] ""
|
218 |
msgstr[1] ""
|
219 |
|
220 |
+
#: wp-twitter-widget.php:684
|
221 |
#, php-format
|
222 |
msgid "about %s second ago"
|
223 |
msgid_plural "about %s seconds ago"
|
224 |
msgstr[0] ""
|
225 |
msgstr[1] ""
|
226 |
+
|
227 |
+
#: wp-twitter-widget.php:728 wp-twitter-widget.php:789
|
228 |
+
msgid "h:i:s A F d, Y"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: xavisys-plugin-framework.php:199
|
232 |
+
msgid "Update Options »"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: xavisys-plugin-framework.php:236
|
236 |
+
msgid "Donate"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: xavisys-plugin-framework.php:243
|
240 |
+
msgid "Support Forum"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: xavisys-plugin-framework.php:251
|
244 |
+
msgid "Donate to show your appreciation."
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: xavisys-plugin-framework.php:262
|
248 |
+
msgid "Settings"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: xavisys-plugin-framework.php:279
|
252 |
+
msgid "Like this Plugin?"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: xavisys-plugin-framework.php:280
|
256 |
+
msgid "Need Support?"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: xavisys-plugin-framework.php:281
|
260 |
+
msgid "Latest news from Xavisys"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: xavisys-plugin-framework.php:286
|
264 |
+
msgid "Then please do any or all of the following:"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: xavisys-plugin-framework.php:291
|
268 |
+
msgid "Link to it so others can find out about it."
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: xavisys-plugin-framework.php:296
|
272 |
+
msgid "Give it a good rating on WordPress.org."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: xavisys-plugin-framework.php:306
|
276 |
+
#, php-format
|
277 |
+
msgid ""
|
278 |
+
"If you have any problems with this plugin or ideas for improvements or "
|
279 |
+
"enhancements, please use the <a href=\"%s\">Xavisys Support Forums</a>."
|
280 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal%4
|
|
4 |
Tags: twitter, widget, feed
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.9
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
A widget that properly handles twitter feeds, including parsing @username, #hashtags, and URLs into links. Requires PHP5.
|
10 |
|
@@ -56,6 +56,7 @@ However, there are more things you can control.
|
|
56 |
* targetBlank - set to true to have all links open in a new window (defaults to false)
|
57 |
* showXavisysLink - set to true to display a link to the Twitter Widget Pro page. We greatly appreciate your support in linking to this page so others can find this useful plugin too! (defaults to false)
|
58 |
* items - The number of items to display (defaults to 10)
|
|
|
59 |
* showts - Number of seconds old a tweet has to be to show ___ ago rather than a date/time (defaults to 86400 seconds which is 24 hours)
|
60 |
* dateFormat - The format for dates (defaults to'h:i:s A F d, Y' or it's localization)
|
61 |
* title - The title of the widget (defaults to 'Twitter: Username')
|
@@ -79,6 +80,13 @@ Aparently the database queries required to display the friends feed was causing
|
|
79 |
|
80 |
== Changelog ==
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
= 2.1.4 =
|
83 |
* Mixed-case attributes now work properly in the shortcode
|
84 |
* Fixed issue with matching only @ as a username
|
4 |
Tags: twitter, widget, feed
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 2.9
|
7 |
+
Stable tag: 2.2.0
|
8 |
|
9 |
A widget that properly handles twitter feeds, including parsing @username, #hashtags, and URLs into links. Requires PHP5.
|
10 |
|
56 |
* targetBlank - set to true to have all links open in a new window (defaults to false)
|
57 |
* showXavisysLink - set to true to display a link to the Twitter Widget Pro page. We greatly appreciate your support in linking to this page so others can find this useful plugin too! (defaults to false)
|
58 |
* items - The number of items to display (defaults to 10)
|
59 |
+
* fetchTimeOut - The number of seconds to wait for a response from Twitter (defaults to 2)
|
60 |
* showts - Number of seconds old a tweet has to be to show ___ ago rather than a date/time (defaults to 86400 seconds which is 24 hours)
|
61 |
* dateFormat - The format for dates (defaults to'h:i:s A F d, Y' or it's localization)
|
62 |
* title - The title of the widget (defaults to 'Twitter: Username')
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 2.2.0 =
|
84 |
+
* Now uses the Xavisys WordPress Plugin Framework - http://xavisys.com/xavisys-wordpress-plugin-framework/
|
85 |
+
* Added an options page where you can set defaults that apply to widgets, shortcodes, and php calls (everything can be overridden)
|
86 |
+
* Added the Xavisys feed to the dashboard (which can be hidden using the screen options)
|
87 |
+
* Fixed problem for people with certain WP configs and PHP 5.0-5.1.x that caused the Services_JSON class to get included twice.
|
88 |
+
* Fixed issue with urls in the form www.site.com
|
89 |
+
|
90 |
= 2.1.4 =
|
91 |
* Mixed-case attributes now work properly in the shortcode
|
92 |
* Fixed issue with matching only @ as a username
|
wp-twitter-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Twitter Widget Pro
|
4 |
* Plugin URI: http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/
|
5 |
* Description: A widget that properly handles twitter feeds, including @username, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5.
|
6 |
-
* Version: 2.
|
7 |
* Author: Aaron D. Campbell
|
8 |
* Author URI: http://xavisys.com/
|
9 |
* Text Domain: twitter-widget-pro
|
@@ -27,6 +27,7 @@
|
|
27 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
*/
|
29 |
|
|
|
30 |
class wpTwitterWidgetException extends Exception {}
|
31 |
|
32 |
/**
|
@@ -34,36 +35,24 @@ class wpTwitterWidgetException extends Exception {}
|
|
34 |
*/
|
35 |
class WP_Widget_Twitter_Pro extends WP_Widget {
|
36 |
public function WP_Widget_Twitter_Pro () {
|
|
|
37 |
$widget_ops = array(
|
38 |
'classname' => 'widget_twitter',
|
39 |
-
'description' => __( 'Follow a Twitter Feed',
|
40 |
);
|
41 |
$control_ops = array(
|
42 |
'width' => 400,
|
43 |
'height' => 350,
|
44 |
'id_base' => 'twitter'
|
45 |
);
|
46 |
-
$name = __( 'Twitter Widget Pro',
|
47 |
|
48 |
$this->WP_Widget('twitter', $name, $widget_ops, $control_ops);
|
49 |
}
|
50 |
|
51 |
private function _getInstanceSettings ( $instance ) {
|
52 |
-
$
|
53 |
-
|
54 |
-
'fetchTimeOut' => '2',
|
55 |
-
'username' => '',
|
56 |
-
'hiderss' => false,
|
57 |
-
'hidereplies' => false,
|
58 |
-
'avatar' => false,
|
59 |
-
'showXavisysLink' => false,
|
60 |
-
'targetBlank' => false,
|
61 |
-
'items' => 10,
|
62 |
-
'showts' => 60 * 60 * 24,
|
63 |
-
'dateFormat' => __('h:i:s A F d, Y', 'twitter-widget-pro'),
|
64 |
-
);
|
65 |
-
|
66 |
-
return wp_parse_args( $instance, $defaultArgs );
|
67 |
}
|
68 |
|
69 |
public function form( $instance ) {
|
@@ -71,15 +60,15 @@ class WP_Widget_Twitter_Pro extends WP_Widget {
|
|
71 |
$wpTwitterWidget = wpTwitterWidget::getInstance();
|
72 |
?>
|
73 |
<p>
|
74 |
-
<label for="<?php echo $this->get_field_id('username'); ?>"><?php _e('Twitter username:',
|
75 |
<input class="widefat" id="<?php echo $this->get_field_id('username'); ?>" name="<?php echo $this->get_field_name('username'); ?>" type="text" value="<?php esc_attr_e($instance['username']); ?>" />
|
76 |
</p>
|
77 |
<p>
|
78 |
-
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Give the feed a title (optional):',
|
79 |
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php esc_attr_e($instance['title']); ?>" />
|
80 |
</p>
|
81 |
<p>
|
82 |
-
<label for="<?php echo $this->get_field_id('items'); ?>"><?php _e('How many items would you like to display?',
|
83 |
<select id="<?php echo $this->get_field_id('items'); ?>" name="<?php echo $this->get_field_name('items'); ?>">
|
84 |
<?php
|
85 |
for ( $i = 1; $i <= 20; ++$i ) {
|
@@ -90,47 +79,47 @@ class WP_Widget_Twitter_Pro extends WP_Widget {
|
|
90 |
</p>
|
91 |
<p>
|
92 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('hidereplies'); ?>" name="<?php echo $this->get_field_name('hidereplies'); ?>"<?php checked($instance['hidereplies'], 'true'); ?> />
|
93 |
-
<label for="<?php echo $this->get_field_id('hidereplies'); ?>"><?php _e('Hide @replies',
|
94 |
</p>
|
95 |
<p>
|
96 |
-
<label for="<?php echo $this->get_field_id('errmsg'); ?>"><?php _e('What to display when Twitter is down (optional):',
|
97 |
<input class="widefat" id="<?php echo $this->get_field_id('errmsg'); ?>" name="<?php echo $this->get_field_name('errmsg'); ?>" type="text" value="<?php esc_attr_e($instance['errmsg']); ?>" />
|
98 |
</p>
|
99 |
<p>
|
100 |
-
<label for="<?php echo $this->get_field_id('fetchTimeOut'); ?>"><?php _e('Number of seconds to wait for a response from Twitter (default 2):',
|
101 |
<input class="widefat" id="<?php echo $this->get_field_id('fetchTimeOut'); ?>" name="<?php echo $this->get_field_name('fetchTimeOut'); ?>" type="text" value="<?php esc_attr_e($instance['fetchTimeOut']); ?>" />
|
102 |
</p>
|
103 |
<p>
|
104 |
-
<label for="<?php echo $this->get_field_id('showts'); ?>"><?php _e('Show date/time of Tweet (rather than 2 ____ ago):',
|
105 |
<select id="<?php echo $this->get_field_id('showts'); ?>" name="<?php echo $this->get_field_name('showts'); ?>">
|
106 |
-
<option value="0" <?php selected($instance['showts'], '0'); ?>><?php _e('Always',
|
107 |
-
<option value="3600" <?php selected($instance['showts'], '3600'); ?>><?php _e('If over an hour old',
|
108 |
-
<option value="86400" <?php selected($instance['showts'], '86400'); ?>><?php _e('If over a day old',
|
109 |
-
<option value="604800" <?php selected($instance['showts'], '604800'); ?>><?php _e('If over a week old',
|
110 |
-
<option value="2592000" <?php selected($instance['showts'], '2592000'); ?>><?php _e('If over a month old',
|
111 |
-
<option value="31536000" <?php selected($instance['showts'], '31536000'); ?>><?php _e('If over a year old',
|
112 |
-
<option value="-1" <?php selected($instance['showts'], '-1'); ?>><?php _e('Never',
|
113 |
</select>
|
114 |
</p>
|
115 |
<p>
|
116 |
-
<label for="<?php echo $this->get_field_id('dateFormat'); ?>"><?php echo sprintf(__('Format to dispaly the date in, uses <a href="%s">PHP date()</a> format:',
|
117 |
<input class="widefat" id="<?php echo $this->get_field_id('dateFormat'); ?>" name="<?php echo $this->get_field_name('dateFormat'); ?>" type="text" value="<?php esc_attr_e($instance['dateFormat']); ?>" />
|
118 |
</p>
|
119 |
<p>
|
120 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('hiderss'); ?>" name="<?php echo $this->get_field_name('hiderss'); ?>"<?php checked($instance['hiderss'], 'true'); ?> />
|
121 |
-
<label for="<?php echo $this->get_field_id('hiderss'); ?>"><?php _e('Hide RSS Icon and Link',
|
122 |
</p>
|
123 |
<p>
|
124 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('targetBlank'); ?>" name="<?php echo $this->get_field_name('targetBlank'); ?>"<?php checked($instance['targetBlank'], 'true'); ?> />
|
125 |
-
<label for="<?php echo $this->get_field_id('targetBlank'); ?>"><?php _e('Open links in a new window',
|
126 |
</p>
|
127 |
<p>
|
128 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('avatar'); ?>" name="<?php echo $this->get_field_name('avatar'); ?>"<?php checked($instance['avatar'], 'true'); ?> />
|
129 |
-
<label for="<?php echo $this->get_field_id('avatar'); ?>"><?php _e('Show Profile Image',
|
130 |
</p>
|
131 |
<p>
|
132 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('showXavisysLink'); ?>" name="<?php echo $this->get_field_name('showXavisysLink'); ?>"<?php checked($instance['showXavisysLink'], 'true'); ?> />
|
133 |
-
<label for="<?php echo $this->get_field_id('showXavisysLink'); ?>"><?php _e('Show Link to Twitter Widget Pro',
|
134 |
</p>
|
135 |
<p><?php echo $wpTwitterWidget->getSupportForumLink(); ?></p>
|
136 |
<?php
|
@@ -170,34 +159,33 @@ class WP_Widget_Twitter_Pro extends WP_Widget {
|
|
170 |
* includes filters that modify tweet content for things like linked usernames.
|
171 |
* It also helps us avoid name collisions.
|
172 |
*/
|
173 |
-
class wpTwitterWidget
|
174 |
-
{
|
175 |
/**
|
176 |
-
* Static property to hold our singleton instance
|
177 |
*/
|
178 |
static $instance = false;
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
-
/**
|
186 |
-
* This is our constructor, which is private to force the use of getInstance()
|
187 |
-
* @return void
|
188 |
-
*/
|
189 |
-
private function __construct() {
|
190 |
/**
|
191 |
* Add filters and actions
|
192 |
*/
|
193 |
-
add_filter( 'init', array( $this, 'init_locale' ) );
|
194 |
add_action( 'widgets_init', array( $this, 'register' ) );
|
195 |
add_filter( 'widget_twitter_content', array( $this, 'linkTwitterUsers' ) );
|
196 |
add_filter( 'widget_twitter_content', array( $this, 'linkUrls' ) );
|
197 |
add_filter( 'widget_twitter_content', array( $this, 'linkHashtags' ) );
|
198 |
add_filter( 'widget_twitter_content', 'convert_chars' );
|
199 |
-
add_filter( '
|
200 |
-
add_action ( 'in_plugin_update_message-'.plugin_basename ( __FILE__ ) , array ( $this , '_changelog' ), null, 2 );
|
201 |
add_shortcode( 'twitter-widget', array( $this, 'handleShortcodes' ) );
|
202 |
}
|
203 |
|
@@ -211,29 +199,110 @@ class wpTwitterWidget
|
|
211 |
return self::$instance;
|
212 |
}
|
213 |
|
214 |
-
public function
|
215 |
-
$
|
216 |
-
load_plugin_textdomain('twitter-widget-pro', 'wp-content/plugins/' . $lang_dir, $lang_dir);
|
217 |
}
|
218 |
|
219 |
-
public function
|
220 |
-
|
221 |
-
|
222 |
-
$plugin = plugins_api( 'plugin_information', array( 'slug' => $newPluginData->slug ) );
|
223 |
-
|
224 |
-
if ( !$plugin || is_wp_error( $plugin ) || empty( $plugin->sections['changelog'] ) ) {
|
225 |
-
return;
|
226 |
-
}
|
227 |
-
|
228 |
-
$changes = $plugin->sections['changelog'];
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
238 |
|
239 |
/**
|
@@ -250,23 +319,6 @@ class wpTwitterWidget
|
|
250 |
return '<strong>' . $this->_buildLink($user->screen_name, $attrs) . '</strong>';
|
251 |
}
|
252 |
|
253 |
-
public function addPluginPageLinks( $links, $file ){
|
254 |
-
if ( $file == plugin_basename(__FILE__) ) {
|
255 |
-
// Add Widget Page link to our plugin
|
256 |
-
$link = '<a href="widgets.php">' . __('Manage Widgets', 'twitter-widget-pro') . '</a>';
|
257 |
-
array_unshift( $links, $link );
|
258 |
-
|
259 |
-
// Add Support Forum link to our plugin
|
260 |
-
$link = $this->getSupportForumLink();
|
261 |
-
array_unshift( $links, $link );
|
262 |
-
}
|
263 |
-
return $links;
|
264 |
-
}
|
265 |
-
|
266 |
-
public function getSupportForumLink() {
|
267 |
-
return '<a href="http://xavisys.com/support/forum/twitter-widget-pro/">' . __('Support Forum', 'efficient_related_posts') . '</a>';
|
268 |
-
}
|
269 |
-
|
270 |
/**
|
271 |
* Replace @username with a link to that twitter user
|
272 |
*
|
@@ -356,16 +408,19 @@ class wpTwitterWidget
|
|
356 |
$attributes = array_filter( wp_parse_args( $attributes ), array($this, '_notEmpty' ) );
|
357 |
$attributes = apply_filters( 'widget_twitter_link_attributes', $attributes );
|
358 |
$attributes = wp_parse_args( $attributes );
|
|
|
|
|
|
|
359 |
$text = apply_filters( 'widget_twitter_link_text', $text );
|
360 |
$link = '<a';
|
361 |
foreach ( $attributes as $name => $value ) {
|
362 |
$link .= ' ' . esc_attr($name) . '="' . esc_attr($value) . '"';
|
363 |
}
|
364 |
$link .= '>';
|
365 |
-
if ( $
|
366 |
-
$link .= esc_html($text);
|
367 |
-
} else {
|
368 |
$link .= $text;
|
|
|
|
|
369 |
}
|
370 |
$link .= '</a>';
|
371 |
return $link;
|
@@ -414,7 +469,7 @@ class wpTwitterWidget
|
|
414 |
$feedUrl = $this->_getFeedUrl($args, 'rss', false);
|
415 |
$linkAttrs = array(
|
416 |
'class' => 'twitterwidget twitterwidget-rss',
|
417 |
-
'title' => __('Syndicate this content',
|
418 |
'href' => $feedUrl
|
419 |
);
|
420 |
|
@@ -441,7 +496,7 @@ class wpTwitterWidget
|
|
441 |
if (is_a($tweets, 'wpTwitterWidgetException')) {
|
442 |
$widgetContent .= '<li class="wpTwitterWidgetError">' . $tweets->getMessage() . '</li>';
|
443 |
} else if (count($tweets) == 0) {
|
444 |
-
$widgetContent .= '<li class="wpTwitterWidgetEmpty">' . __('No Tweets Available',
|
445 |
} else {
|
446 |
$count = 0;
|
447 |
foreach ($tweets as $tweet) {
|
@@ -449,7 +504,7 @@ class wpTwitterWidget
|
|
449 |
// Set our "ago" string which converts the date to "# ___(s) ago"
|
450 |
$tweet->ago = $this->_timeSince(strtotime($tweet->created_at), $args['showts'], $args['dateFormat']);
|
451 |
$entryContent = apply_filters( 'widget_twitter_content', $tweet->text );
|
452 |
-
$from = sprintf(__('from %s',
|
453 |
$widgetContent .= '<li>';
|
454 |
$widgetContent .= "<span class='entry-content'>{$entryContent}</span>";
|
455 |
$widgetContent .= " <span class='entry-meta'>";
|
@@ -461,7 +516,7 @@ class wpTwitterWidget
|
|
461 |
$widgetContent .= '</span>';
|
462 |
$widgetContent .= " <span class='from-meta'>{$from}</span>";
|
463 |
if ( !empty($tweet->in_reply_to_screen_name) ) {
|
464 |
-
$rtLinkText = sprintf( __('in reply to %s',
|
465 |
$widgetContent .= '<span class="in-reply-to-meta">';
|
466 |
$linkAttrs = array(
|
467 |
'href' => "http://twitter.com/{$tweet->in_reply_to_screen_name}/statuses/{$tweet->in_reply_to_status_id}",
|
@@ -483,9 +538,9 @@ class wpTwitterWidget
|
|
483 |
$widgetContent .= '<li class="xavisys-link"><span class="xavisys-link-text">';
|
484 |
$linkAttrs = array(
|
485 |
'href' => 'http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/',
|
486 |
-
'title' => __('Get Twitter Widget for your WordPress site',
|
487 |
);
|
488 |
-
$widgetContent .= __('Powered by',
|
489 |
$widgetContent .= $this->_buildLink('WordPress Twitter Widget Pro', $linkAttrs);
|
490 |
$widgetContent .= '</span></li>';
|
491 |
}
|
@@ -530,10 +585,12 @@ class wpTwitterWidget
|
|
530 |
if (function_exists('json_decode')) {
|
531 |
$decodedResponse = json_decode( $resp['body'] );
|
532 |
} else {
|
533 |
-
|
|
|
|
|
534 |
|
|
|
535 |
if ( !is_a($wp_json, 'Services_JSON') ) {
|
536 |
-
require_once( 'class-json.php' );
|
537 |
$wp_json = new Services_JSON();
|
538 |
}
|
539 |
|
@@ -541,7 +598,7 @@ class wpTwitterWidget
|
|
541 |
}
|
542 |
if ( empty($decodedResponse) ) {
|
543 |
if (empty($widgetOptions['errmsg'])) {
|
544 |
-
$widgetOptions['errmsg'] = __('Invalid Twitter Response.',
|
545 |
}
|
546 |
throw new wpTwitterWidgetException($widgetOptions['errmsg']);
|
547 |
} elseif( !empty($decodedResponse->error) ) {
|
@@ -555,7 +612,7 @@ class wpTwitterWidget
|
|
555 |
} else {
|
556 |
// Failed to fetch url;
|
557 |
if (empty($widgetOptions['errmsg'])) {
|
558 |
-
$widgetOptions['errmsg'] = __('Could not connect to Twitter',
|
559 |
}
|
560 |
throw new wpTwitterWidgetException($widgetOptions['errmsg']);
|
561 |
}
|
@@ -618,13 +675,13 @@ class wpTwitterWidget
|
|
618 |
}
|
619 |
|
620 |
$messages = array(
|
621 |
-
'year' => _n('about %s year ago', 'about %s years ago', $count,
|
622 |
-
'month' => _n('about %s month ago', 'about %s months ago', $count,
|
623 |
-
'week' => _n('about %s week ago', 'about %s weeks ago', $count,
|
624 |
-
'day' => _n('about %s day ago', 'about %s days ago', $count,
|
625 |
-
'hour' => _n('about %s hour ago', 'about %s hours ago', $count,
|
626 |
-
'minute' => _n('about %s minute ago', 'about %s minutes ago', $count,
|
627 |
-
'second' => _n('about %s second ago', 'about %s seconds ago', $count,
|
628 |
);
|
629 |
|
630 |
return sprintf($messages[$key], $count);
|
@@ -668,7 +725,7 @@ class wpTwitterWidget
|
|
668 |
'targetBlank' => false,
|
669 |
'items' => 10,
|
670 |
'showts' => 60 * 60 * 24,
|
671 |
-
'dateFormat' => __('h:i:s A F d, Y',
|
672 |
);
|
673 |
|
674 |
/**
|
@@ -717,6 +774,27 @@ class wpTwitterWidget
|
|
717 |
return $this->display($attr);
|
718 |
}
|
719 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
720 |
}
|
721 |
// Instantiate our class
|
722 |
$wpTwitterWidget = wpTwitterWidget::getInstance();
|
3 |
* Plugin Name: Twitter Widget Pro
|
4 |
* Plugin URI: http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/
|
5 |
* Description: A widget that properly handles twitter feeds, including @username, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5.
|
6 |
+
* Version: 2.2.0
|
7 |
* Author: Aaron D. Campbell
|
8 |
* Author URI: http://xavisys.com/
|
9 |
* Text Domain: twitter-widget-pro
|
27 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
*/
|
29 |
|
30 |
+
require_once('xavisys-plugin-framework.php');
|
31 |
class wpTwitterWidgetException extends Exception {}
|
32 |
|
33 |
/**
|
35 |
*/
|
36 |
class WP_Widget_Twitter_Pro extends WP_Widget {
|
37 |
public function WP_Widget_Twitter_Pro () {
|
38 |
+
$wpTwitterWidget = wpTwitterWidget::getInstance();
|
39 |
$widget_ops = array(
|
40 |
'classname' => 'widget_twitter',
|
41 |
+
'description' => __( 'Follow a Twitter Feed', $wpTwitterWidget->get_slug() )
|
42 |
);
|
43 |
$control_ops = array(
|
44 |
'width' => 400,
|
45 |
'height' => 350,
|
46 |
'id_base' => 'twitter'
|
47 |
);
|
48 |
+
$name = __( 'Twitter Widget Pro', $wpTwitterWidget->get_slug() );
|
49 |
|
50 |
$this->WP_Widget('twitter', $name, $widget_ops, $control_ops);
|
51 |
}
|
52 |
|
53 |
private function _getInstanceSettings ( $instance ) {
|
54 |
+
$wpTwitterWidget = wpTwitterWidget::getInstance();
|
55 |
+
return $wpTwitterWidget->getSettings( $instance );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
public function form( $instance ) {
|
60 |
$wpTwitterWidget = wpTwitterWidget::getInstance();
|
61 |
?>
|
62 |
<p>
|
63 |
+
<label for="<?php echo $this->get_field_id('username'); ?>"><?php _e('Twitter username:', $this->_slug); ?></label>
|
64 |
<input class="widefat" id="<?php echo $this->get_field_id('username'); ?>" name="<?php echo $this->get_field_name('username'); ?>" type="text" value="<?php esc_attr_e($instance['username']); ?>" />
|
65 |
</p>
|
66 |
<p>
|
67 |
+
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Give the feed a title (optional):', $this->_slug); ?></label>
|
68 |
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php esc_attr_e($instance['title']); ?>" />
|
69 |
</p>
|
70 |
<p>
|
71 |
+
<label for="<?php echo $this->get_field_id('items'); ?>"><?php _e('How many items would you like to display?', $this->_slug); ?></label>
|
72 |
<select id="<?php echo $this->get_field_id('items'); ?>" name="<?php echo $this->get_field_name('items'); ?>">
|
73 |
<?php
|
74 |
for ( $i = 1; $i <= 20; ++$i ) {
|
79 |
</p>
|
80 |
<p>
|
81 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('hidereplies'); ?>" name="<?php echo $this->get_field_name('hidereplies'); ?>"<?php checked($instance['hidereplies'], 'true'); ?> />
|
82 |
+
<label for="<?php echo $this->get_field_id('hidereplies'); ?>"><?php _e('Hide @replies', $this->_slug); ?></label>
|
83 |
</p>
|
84 |
<p>
|
85 |
+
<label for="<?php echo $this->get_field_id('errmsg'); ?>"><?php _e('What to display when Twitter is down (optional):', $this->_slug); ?></label>
|
86 |
<input class="widefat" id="<?php echo $this->get_field_id('errmsg'); ?>" name="<?php echo $this->get_field_name('errmsg'); ?>" type="text" value="<?php esc_attr_e($instance['errmsg']); ?>" />
|
87 |
</p>
|
88 |
<p>
|
89 |
+
<label for="<?php echo $this->get_field_id('fetchTimeOut'); ?>"><?php _e('Number of seconds to wait for a response from Twitter (default 2):', $this->_slug); ?></label>
|
90 |
<input class="widefat" id="<?php echo $this->get_field_id('fetchTimeOut'); ?>" name="<?php echo $this->get_field_name('fetchTimeOut'); ?>" type="text" value="<?php esc_attr_e($instance['fetchTimeOut']); ?>" />
|
91 |
</p>
|
92 |
<p>
|
93 |
+
<label for="<?php echo $this->get_field_id('showts'); ?>"><?php _e('Show date/time of Tweet (rather than 2 ____ ago):', $this->_slug); ?></label>
|
94 |
<select id="<?php echo $this->get_field_id('showts'); ?>" name="<?php echo $this->get_field_name('showts'); ?>">
|
95 |
+
<option value="0" <?php selected($instance['showts'], '0'); ?>><?php _e('Always', $this->_slug);?></option>
|
96 |
+
<option value="3600" <?php selected($instance['showts'], '3600'); ?>><?php _e('If over an hour old', $this->_slug);?></option>
|
97 |
+
<option value="86400" <?php selected($instance['showts'], '86400'); ?>><?php _e('If over a day old', $this->_slug);?></option>
|
98 |
+
<option value="604800" <?php selected($instance['showts'], '604800'); ?>><?php _e('If over a week old', $this->_slug);?></option>
|
99 |
+
<option value="2592000" <?php selected($instance['showts'], '2592000'); ?>><?php _e('If over a month old', $this->_slug);?></option>
|
100 |
+
<option value="31536000" <?php selected($instance['showts'], '31536000'); ?>><?php _e('If over a year old', $this->_slug);?></option>
|
101 |
+
<option value="-1" <?php selected($instance['showts'], '-1'); ?>><?php _e('Never', $this->_slug);?></option>
|
102 |
</select>
|
103 |
</p>
|
104 |
<p>
|
105 |
+
<label for="<?php echo $this->get_field_id('dateFormat'); ?>"><?php echo sprintf(__('Format to dispaly the date in, uses <a href="%s">PHP date()</a> format:', $this->_slug), 'http://php.net/date'); ?></label>
|
106 |
<input class="widefat" id="<?php echo $this->get_field_id('dateFormat'); ?>" name="<?php echo $this->get_field_name('dateFormat'); ?>" type="text" value="<?php esc_attr_e($instance['dateFormat']); ?>" />
|
107 |
</p>
|
108 |
<p>
|
109 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('hiderss'); ?>" name="<?php echo $this->get_field_name('hiderss'); ?>"<?php checked($instance['hiderss'], 'true'); ?> />
|
110 |
+
<label for="<?php echo $this->get_field_id('hiderss'); ?>"><?php _e('Hide RSS Icon and Link', $this->_slug); ?></label>
|
111 |
</p>
|
112 |
<p>
|
113 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('targetBlank'); ?>" name="<?php echo $this->get_field_name('targetBlank'); ?>"<?php checked($instance['targetBlank'], 'true'); ?> />
|
114 |
+
<label for="<?php echo $this->get_field_id('targetBlank'); ?>"><?php _e('Open links in a new window', $this->_slug); ?></label>
|
115 |
</p>
|
116 |
<p>
|
117 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('avatar'); ?>" name="<?php echo $this->get_field_name('avatar'); ?>"<?php checked($instance['avatar'], 'true'); ?> />
|
118 |
+
<label for="<?php echo $this->get_field_id('avatar'); ?>"><?php _e('Show Profile Image', $this->_slug); ?></label>
|
119 |
</p>
|
120 |
<p>
|
121 |
<input class="checkbox" type="checkbox" value="true" id="<?php echo $this->get_field_id('showXavisysLink'); ?>" name="<?php echo $this->get_field_name('showXavisysLink'); ?>"<?php checked($instance['showXavisysLink'], 'true'); ?> />
|
122 |
+
<label for="<?php echo $this->get_field_id('showXavisysLink'); ?>"><?php _e('Show Link to Twitter Widget Pro', $this->_slug); ?></label>
|
123 |
</p>
|
124 |
<p><?php echo $wpTwitterWidget->getSupportForumLink(); ?></p>
|
125 |
<?php
|
159 |
* includes filters that modify tweet content for things like linked usernames.
|
160 |
* It also helps us avoid name collisions.
|
161 |
*/
|
162 |
+
class wpTwitterWidget extends XavisysPlugin {
|
|
|
163 |
/**
|
164 |
+
* @var wpTwitterWidget - Static property to hold our singleton instance
|
165 |
*/
|
166 |
static $instance = false;
|
167 |
|
168 |
+
protected function _init() {
|
169 |
+
$this->_hook = 'twitterWidgetPro';
|
170 |
+
$this->_file = plugin_basename( __FILE__ );
|
171 |
+
$this->_pageTitle = __( 'Twitter Widget Pro', $this->_slug );
|
172 |
+
$this->_menuTitle = __( 'Twitter Widget', $this->_slug );
|
173 |
+
$this->_accessLevel = 'manage_options';
|
174 |
+
$this->_optionGroup = 'twp-options';
|
175 |
+
$this->_optionNames = array('twp');
|
176 |
+
$this->_optionCallbacks = array();
|
177 |
+
$this->_slug = 'twitter-widget-pro';
|
178 |
+
$this->_paypalButtonId = '9993090';
|
179 |
|
|
|
|
|
|
|
|
|
|
|
180 |
/**
|
181 |
* Add filters and actions
|
182 |
*/
|
|
|
183 |
add_action( 'widgets_init', array( $this, 'register' ) );
|
184 |
add_filter( 'widget_twitter_content', array( $this, 'linkTwitterUsers' ) );
|
185 |
add_filter( 'widget_twitter_content', array( $this, 'linkUrls' ) );
|
186 |
add_filter( 'widget_twitter_content', array( $this, 'linkHashtags' ) );
|
187 |
add_filter( 'widget_twitter_content', 'convert_chars' );
|
188 |
+
add_filter( $this->_slug .'-opt-twp', array( $this, 'filterSettings' ) );
|
|
|
189 |
add_shortcode( 'twitter-widget', array( $this, 'handleShortcodes' ) );
|
190 |
}
|
191 |
|
199 |
return self::$instance;
|
200 |
}
|
201 |
|
202 |
+
public function get_slug() {
|
203 |
+
return $this->_slug;
|
|
|
204 |
}
|
205 |
|
206 |
+
public function addOptionsMetaBoxes() {
|
207 |
+
add_meta_box( $this->_slug . '-general-settings', __('General Settings', $this->_slug), array($this, 'generalSettingsMetaBox'), 'xavisys-' . $this->_slug, 'main');
|
208 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
+
public function generalSettingsMetaBox() {
|
211 |
+
?>
|
212 |
+
<table class="form-table">
|
213 |
+
<tr valign="top">
|
214 |
+
<th scope="row">
|
215 |
+
<label for="twp_username"><?php _e('Twitter username:', $this->_slug); ?></label>
|
216 |
+
</th>
|
217 |
+
<td>
|
218 |
+
<input id="twp_username" name="twp[username]" type="text" class="regular-text code" value="<?php esc_attr_e($this->_settings['twp']['username']); ?>" size="40" />
|
219 |
+
</td>
|
220 |
+
</tr>
|
221 |
+
<tr valign="top">
|
222 |
+
<th scope="row">
|
223 |
+
<label for="twp_title"><?php _e('Give the feed a title (optional):', $this->_slug); ?></label>
|
224 |
+
</th>
|
225 |
+
<td>
|
226 |
+
<input id="twp_title" name="twp[title]" type="text" class="regular-text code" value="<?php esc_attr_e($this->_settings['twp']['title']); ?>" size="40" />
|
227 |
+
</td>
|
228 |
+
</tr>
|
229 |
+
<tr valign="top">
|
230 |
+
<th scope="row">
|
231 |
+
<label for="twp_items"><?php _e('How many items would you like to display?', $this->_slug); ?></label>
|
232 |
+
</th>
|
233 |
+
<td>
|
234 |
+
<select id="twp_items" name="twp[items]">
|
235 |
+
<?php
|
236 |
+
for ( $i = 1; $i <= 20; ++$i ) {
|
237 |
+
echo "<option value='$i' ". selected($this->_settings['twp']['items'], $i, false). ">$i</option>";
|
238 |
+
}
|
239 |
+
?>
|
240 |
+
</select>
|
241 |
+
</td>
|
242 |
+
</tr>
|
243 |
+
<tr valign="top">
|
244 |
+
<th scope="row">
|
245 |
+
<label for="twp_errmsg"><?php _e('What to display when Twitter is down (optional):', $this->_slug); ?></label>
|
246 |
+
</th>
|
247 |
+
<td>
|
248 |
+
<input id="twp_errmsg" name="twp[errmsg]" type="text" class="regular-text code" value="<?php esc_attr_e($this->_settings['twp']['errmsg']); ?>" size="40" />
|
249 |
+
</td>
|
250 |
+
</tr>
|
251 |
+
<tr valign="top">
|
252 |
+
<th scope="row">
|
253 |
+
<label for="twp_fetchTimeOut"><?php _e('Number of seconds to wait for a response from Twitter (default 2):', $this->_slug); ?></label>
|
254 |
+
</th>
|
255 |
+
<td>
|
256 |
+
<input id="twp_fetchTimeOut" name="twp[fetchTimeOut]" type="text" class="regular-text code" value="<?php esc_attr_e($this->_settings['twp']['fetchTimeOut']); ?>" size="40" />
|
257 |
+
</td>
|
258 |
+
</tr>
|
259 |
+
<tr valign="top">
|
260 |
+
<th scope="row">
|
261 |
+
<label for="twp_showts"><?php _e('Show date/time of Tweet (rather than 2 ____ ago):', $this->_slug); ?></label>
|
262 |
+
</th>
|
263 |
+
<td>
|
264 |
+
<select id="twp_showts" name="twp[showts]">
|
265 |
+
<option value="0" <?php selected($this->_settings['twp']['showts'], '0'); ?>><?php _e('Always', $this->_slug);?></option>
|
266 |
+
<option value="3600" <?php selected($this->_settings['twp']['showts'], '3600'); ?>><?php _e('If over an hour old', $this->_slug);?></option>
|
267 |
+
<option value="86400" <?php selected($this->_settings['twp']['showts'], '86400'); ?>><?php _e('If over a day old', $this->_slug);?></option>
|
268 |
+
<option value="604800" <?php selected($this->_settings['twp']['showts'], '604800'); ?>><?php _e('If over a week old', $this->_slug);?></option>
|
269 |
+
<option value="2592000" <?php selected($this->_settings['twp']['showts'], '2592000'); ?>><?php _e('If over a month old', $this->_slug);?></option>
|
270 |
+
<option value="31536000" <?php selected($this->_settings['twp']['showts'], '31536000'); ?>><?php _e('If over a year old', $this->_slug);?></option>
|
271 |
+
<option value="-1" <?php selected($this->_settings['twp']['showts'], '-1'); ?>><?php _e('Never', $this->_slug);?></option>
|
272 |
+
</select>
|
273 |
+
</td>
|
274 |
+
</tr>
|
275 |
+
<tr valign="top">
|
276 |
+
<th scope="row">
|
277 |
+
<label for="twp_dateFormat"><?php echo sprintf(__('Format to dispaly the date in, uses <a href="%s">PHP date()</a> format:', $this->_slug), 'http://php.net/date'); ?></label>
|
278 |
+
</th>
|
279 |
+
<td>
|
280 |
+
<input id="twp_dateFormat" name="twp[dateFormat]" type="text" class="regular-text code" value="<?php esc_attr_e($this->_settings['twp']['dateFormat']); ?>" size="40" />
|
281 |
+
</td>
|
282 |
+
</tr>
|
283 |
+
<tr valign="top">
|
284 |
+
<th scope="row">
|
285 |
+
<?php _e("Other Setting:", $this->_slug);?>
|
286 |
+
</th>
|
287 |
+
<td>
|
288 |
+
<input class="checkbox" type="checkbox" value="true" id="twp_hidereplies" name="twp[hidereplies]"<?php checked($this->_settings['twp']['hidereplies'], 'true'); ?> />
|
289 |
+
<label for="twp_hidereplies"><?php _e('Hide @replies', $this->_slug); ?></label>
|
290 |
+
<br />
|
291 |
+
<input class="checkbox" type="checkbox" value="true" id="twp_hiderss" name="twp[hiderss]"<?php checked($this->_settings['twp']['hiderss'], 'true'); ?> />
|
292 |
+
<label for="twp_hiderss"><?php _e('Hide RSS Icon and Link', $this->_slug); ?></label>
|
293 |
+
<br />
|
294 |
+
<input class="checkbox" type="checkbox" value="true" id="twp_targetBlank" name="twp[targetBlank]"<?php checked($this->_settings['twp']['targetBlank'], 'true'); ?> />
|
295 |
+
<label for="twp_targetBlank"><?php _e('Open links in a new window', $this->_slug); ?></label>
|
296 |
+
<br />
|
297 |
+
<input class="checkbox" type="checkbox" value="true" id="twp_avatar" name="twp[avatar]"<?php checked($this->_settings['twp']['avatar'], 'true'); ?> />
|
298 |
+
<label for="twp_avatar"><?php _e('Show Profile Image', $this->_slug); ?></label>
|
299 |
+
<br />
|
300 |
+
<input class="checkbox" type="checkbox" value="true" id="twp_showXavisysLink" name="twp[showXavisysLink]"<?php checked($this->_settings['twp']['showXavisysLink'], 'true'); ?> />
|
301 |
+
<label for="twp_showXavisysLink"><?php _e('Show Link to Twitter Widget Pro', $this->_slug); ?></label>
|
302 |
+
</td>
|
303 |
+
</tr>
|
304 |
+
</table>
|
305 |
+
<?php
|
306 |
}
|
307 |
|
308 |
/**
|
319 |
return '<strong>' . $this->_buildLink($user->screen_name, $attrs) . '</strong>';
|
320 |
}
|
321 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
/**
|
323 |
* Replace @username with a link to that twitter user
|
324 |
*
|
408 |
$attributes = array_filter( wp_parse_args( $attributes ), array($this, '_notEmpty' ) );
|
409 |
$attributes = apply_filters( 'widget_twitter_link_attributes', $attributes );
|
410 |
$attributes = wp_parse_args( $attributes );
|
411 |
+
if ( strtolower( 'www' == substr($attributes['href'], 0, 3) ) ) {
|
412 |
+
$attributes['href'] = 'http://' . $attributes['href'];
|
413 |
+
}
|
414 |
$text = apply_filters( 'widget_twitter_link_text', $text );
|
415 |
$link = '<a';
|
416 |
foreach ( $attributes as $name => $value ) {
|
417 |
$link .= ' ' . esc_attr($name) . '="' . esc_attr($value) . '"';
|
418 |
}
|
419 |
$link .= '>';
|
420 |
+
if ( $noFilter ) {
|
|
|
|
|
421 |
$link .= $text;
|
422 |
+
} else {
|
423 |
+
$link .= esc_html($text);
|
424 |
}
|
425 |
$link .= '</a>';
|
426 |
return $link;
|
469 |
$feedUrl = $this->_getFeedUrl($args, 'rss', false);
|
470 |
$linkAttrs = array(
|
471 |
'class' => 'twitterwidget twitterwidget-rss',
|
472 |
+
'title' => __('Syndicate this content', $this->_slug),
|
473 |
'href' => $feedUrl
|
474 |
);
|
475 |
|
496 |
if (is_a($tweets, 'wpTwitterWidgetException')) {
|
497 |
$widgetContent .= '<li class="wpTwitterWidgetError">' . $tweets->getMessage() . '</li>';
|
498 |
} else if (count($tweets) == 0) {
|
499 |
+
$widgetContent .= '<li class="wpTwitterWidgetEmpty">' . __('No Tweets Available', $this->_slug) . '</li>';
|
500 |
} else {
|
501 |
$count = 0;
|
502 |
foreach ($tweets as $tweet) {
|
504 |
// Set our "ago" string which converts the date to "# ___(s) ago"
|
505 |
$tweet->ago = $this->_timeSince(strtotime($tweet->created_at), $args['showts'], $args['dateFormat']);
|
506 |
$entryContent = apply_filters( 'widget_twitter_content', $tweet->text );
|
507 |
+
$from = sprintf(__('from %s', $this->_slug), str_replace('&', '&', $tweet->source));
|
508 |
$widgetContent .= '<li>';
|
509 |
$widgetContent .= "<span class='entry-content'>{$entryContent}</span>";
|
510 |
$widgetContent .= " <span class='entry-meta'>";
|
516 |
$widgetContent .= '</span>';
|
517 |
$widgetContent .= " <span class='from-meta'>{$from}</span>";
|
518 |
if ( !empty($tweet->in_reply_to_screen_name) ) {
|
519 |
+
$rtLinkText = sprintf( __('in reply to %s', $this->_slug), $tweet->in_reply_to_screen_name );
|
520 |
$widgetContent .= '<span class="in-reply-to-meta">';
|
521 |
$linkAttrs = array(
|
522 |
'href' => "http://twitter.com/{$tweet->in_reply_to_screen_name}/statuses/{$tweet->in_reply_to_status_id}",
|
538 |
$widgetContent .= '<li class="xavisys-link"><span class="xavisys-link-text">';
|
539 |
$linkAttrs = array(
|
540 |
'href' => 'http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/',
|
541 |
+
'title' => __('Get Twitter Widget for your WordPress site', $this->_slug)
|
542 |
);
|
543 |
+
$widgetContent .= __('Powered by', $this->_slug);
|
544 |
$widgetContent .= $this->_buildLink('WordPress Twitter Widget Pro', $linkAttrs);
|
545 |
$widgetContent .= '</span></li>';
|
546 |
}
|
585 |
if (function_exists('json_decode')) {
|
586 |
$decodedResponse = json_decode( $resp['body'] );
|
587 |
} else {
|
588 |
+
if ( !class_exists('Services_JSON') ) {
|
589 |
+
require_once( 'class-json.php' );
|
590 |
+
}
|
591 |
|
592 |
+
global $wp_json;
|
593 |
if ( !is_a($wp_json, 'Services_JSON') ) {
|
|
|
594 |
$wp_json = new Services_JSON();
|
595 |
}
|
596 |
|
598 |
}
|
599 |
if ( empty($decodedResponse) ) {
|
600 |
if (empty($widgetOptions['errmsg'])) {
|
601 |
+
$widgetOptions['errmsg'] = __('Invalid Twitter Response.', $this->_slug);
|
602 |
}
|
603 |
throw new wpTwitterWidgetException($widgetOptions['errmsg']);
|
604 |
} elseif( !empty($decodedResponse->error) ) {
|
612 |
} else {
|
613 |
// Failed to fetch url;
|
614 |
if (empty($widgetOptions['errmsg'])) {
|
615 |
+
$widgetOptions['errmsg'] = __('Could not connect to Twitter', $this->_slug);
|
616 |
}
|
617 |
throw new wpTwitterWidgetException($widgetOptions['errmsg']);
|
618 |
}
|
675 |
}
|
676 |
|
677 |
$messages = array(
|
678 |
+
'year' => _n('about %s year ago', 'about %s years ago', $count, $this->_slug),
|
679 |
+
'month' => _n('about %s month ago', 'about %s months ago', $count, $this->_slug),
|
680 |
+
'week' => _n('about %s week ago', 'about %s weeks ago', $count, $this->_slug),
|
681 |
+
'day' => _n('about %s day ago', 'about %s days ago', $count, $this->_slug),
|
682 |
+
'hour' => _n('about %s hour ago', 'about %s hours ago', $count, $this->_slug),
|
683 |
+
'minute' => _n('about %s minute ago', 'about %s minutes ago', $count, $this->_slug),
|
684 |
+
'second' => _n('about %s second ago', 'about %s seconds ago', $count, $this->_slug),
|
685 |
);
|
686 |
|
687 |
return sprintf($messages[$key], $count);
|
725 |
'targetBlank' => false,
|
726 |
'items' => 10,
|
727 |
'showts' => 60 * 60 * 24,
|
728 |
+
'dateFormat' => __('h:i:s A F d, Y', $this->_slug),
|
729 |
);
|
730 |
|
731 |
/**
|
774 |
return $this->display($attr);
|
775 |
}
|
776 |
|
777 |
+
public function filterSettings($settings) {
|
778 |
+
$defaultArgs = array( 'title' => '',
|
779 |
+
'errmsg' => '',
|
780 |
+
'fetchTimeOut' => '2',
|
781 |
+
'username' => '',
|
782 |
+
'hiderss' => false,
|
783 |
+
'hidereplies' => false,
|
784 |
+
'avatar' => false,
|
785 |
+
'showXavisysLink' => false,
|
786 |
+
'targetBlank' => false,
|
787 |
+
'items' => 10,
|
788 |
+
'showts' => 60 * 60 * 24,
|
789 |
+
'dateFormat' => __('h:i:s A F d, Y', $this->_slug),
|
790 |
+
);
|
791 |
+
|
792 |
+
return wp_parse_args( $settings, $defaultArgs );
|
793 |
+
}
|
794 |
+
|
795 |
+
public function getSettings( $settings ) {
|
796 |
+
return wp_parse_args( $settings, $this->_settings['twp'] );
|
797 |
+
}
|
798 |
}
|
799 |
// Instantiate our class
|
800 |
$wpTwitterWidget = wpTwitterWidget::getInstance();
|
xavisys-plugin-framework.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
#icon-xavisys {
|
2 |
+
background:transparent url(http://static.xavisys.com/xavisys-logo-32.png) no-repeat scroll bottom left;
|
3 |
+
}
|
xavisys-plugin-framework.php
ADDED
@@ -0,0 +1,354 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Version: 1.0.4
|
4 |
+
*/
|
5 |
+
/**
|
6 |
+
* Changelog:
|
7 |
+
*
|
8 |
+
* 1.0.4:
|
9 |
+
* - Added donate link to the plugin meta
|
10 |
+
*
|
11 |
+
* 1.0.3:
|
12 |
+
* - Changed to use new cdn for images
|
13 |
+
*/
|
14 |
+
if (!class_exists('XavisysPlugin')) {
|
15 |
+
/**
|
16 |
+
* Abstract class XavisysPlugin used as a WordPress Plugin framework
|
17 |
+
*
|
18 |
+
* @abstract
|
19 |
+
*/
|
20 |
+
abstract class XavisysPlugin {
|
21 |
+
/**
|
22 |
+
* @var array Plugin settings
|
23 |
+
*/
|
24 |
+
protected $_settings;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @var string - The options page name used in the URL
|
28 |
+
*/
|
29 |
+
protected $_hook = '';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @var string - The filename for the main plugin file
|
33 |
+
*/
|
34 |
+
protected $_file = '';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @var string - The options page title
|
38 |
+
*/
|
39 |
+
protected $_pageTitle = '';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @var string - The options page menu title
|
43 |
+
*/
|
44 |
+
protected $_menuTitle = '';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @var string - The access level required to see the options page
|
48 |
+
*/
|
49 |
+
protected $_accessLevel = '';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @var string - The option group to register
|
53 |
+
*/
|
54 |
+
protected $_optionGroup = '';
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @var array - An array of options to register to the option group
|
58 |
+
*/
|
59 |
+
protected $_optionNames = array();
|
60 |
+
|
61 |
+
/**
|
62 |
+
* @var array - An associated array of callbacks for the options, option name should be index, callback should be value
|
63 |
+
*/
|
64 |
+
protected $_optionCallbacks = array();
|
65 |
+
|
66 |
+
/**
|
67 |
+
* @var string - The plugin slug used on WordPress.org and/or Xavisys forums
|
68 |
+
*/
|
69 |
+
protected $_slug = '';
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @var string - The button ID for the PayPal button, override this generic one with a plugin-specific one
|
73 |
+
*/
|
74 |
+
protected $_paypalButtonId = '9925248';
|
75 |
+
|
76 |
+
/**
|
77 |
+
* This is our constructor, which is private to force the use of getInstance()
|
78 |
+
* @return void
|
79 |
+
*/
|
80 |
+
protected function __construct() {
|
81 |
+
if ( is_callable( array($this, '_init') ) ) {
|
82 |
+
$this->_init();
|
83 |
+
}
|
84 |
+
$this->_getSettings();
|
85 |
+
if ( is_callable( array($this, '_postSettingsInit') ) ) {
|
86 |
+
$this->_postSettingsInit();
|
87 |
+
}
|
88 |
+
add_filter( 'init', array( $this, 'init_locale' ) );
|
89 |
+
add_action( 'admin_init', array( $this, 'registerOptions' ) );
|
90 |
+
add_filter( 'plugin_action_links', array( $this, 'addPluginPageLinks' ), 10, 2 );
|
91 |
+
add_filter( 'plugin_row_meta', array( $this, 'addPluginMetaLinks' ), 10, 2 );
|
92 |
+
add_action( 'admin_menu', array( $this, 'registerOptionsPage' ) );
|
93 |
+
if ( is_callable(array( $this, 'addOptionsMetaBoxes' )) ) {
|
94 |
+
add_action( 'admin_init', array( $this, 'addOptionsMetaBoxes' ) );
|
95 |
+
}
|
96 |
+
add_action( 'admin_init', array( $this, 'addDefaultOptionsMetaBoxes' ) );
|
97 |
+
add_action( 'wp_dashboard_setup', array( $this, 'addDashboardWidgets' ), null, 9 );
|
98 |
+
add_action( 'admin_print_scripts', array( $this,'optionsPageScripts' ) );
|
99 |
+
add_action( 'admin_print_styles', array( $this,'optionsPageStyles' ) );
|
100 |
+
/**
|
101 |
+
* Add update messages that can be attached to the CURRENT release (not
|
102 |
+
* this one), but only for 2.8+
|
103 |
+
*/
|
104 |
+
global $wp_version;
|
105 |
+
if ( version_compare('2.8', $wp_version, '<=') ) {
|
106 |
+
add_action ( 'in_plugin_update_message-'.$this->_file , array ( $this , 'changelog' ), null, 2 );
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Function to instantiate our class and make it a singleton
|
112 |
+
*/
|
113 |
+
abstract public static function getInstance();
|
114 |
+
|
115 |
+
public function init_locale() {
|
116 |
+
$lang_dir = basename(dirname(__FILE__)) . '/languages';
|
117 |
+
load_plugin_textdomain( $this->_slug, 'wp-content/plugins/' . $lang_dir, $lang_dir);
|
118 |
+
}
|
119 |
+
|
120 |
+
protected function _getSettings() {
|
121 |
+
foreach ( $this->_optionNames as $opt ) {
|
122 |
+
$this->_settings[$opt] = apply_filters($this->_slug.'-opt-'.$opt, get_option($opt));
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
public function registerOptions() {
|
127 |
+
foreach ( $this->_optionNames as $opt ) {
|
128 |
+
if ( !empty($this->_optionCallbacks[$opt]) && is_callable( $this->_optionCallbacks[$opt] ) ) {
|
129 |
+
$callback = $this->_optionCallbacks[$opt];
|
130 |
+
} else {
|
131 |
+
$callback = '';
|
132 |
+
}
|
133 |
+
register_setting( $this->_optionGroup, $opt, $callback );
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
public function changelog ($pluginData, $newPluginData) {
|
138 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
139 |
+
|
140 |
+
$plugin = plugins_api( 'plugin_information', array( 'slug' => $newPluginData->slug ) );
|
141 |
+
|
142 |
+
if ( !$plugin || is_wp_error( $plugin ) || empty( $plugin->sections['changelog'] ) ) {
|
143 |
+
return;
|
144 |
+
}
|
145 |
+
|
146 |
+
$changes = $plugin->sections['changelog'];
|
147 |
+
$pos = strpos( $changes, '<h4>' . preg_replace('/[^\d\.]/', '', $pluginData['Version'] ) );
|
148 |
+
if ( $pos !== false ) {
|
149 |
+
$changes = trim( substr( $changes, 0, $pos ) );
|
150 |
+
}
|
151 |
+
|
152 |
+
$replace = array(
|
153 |
+
'<ul>' => '<ul style="list-style: disc inside; padding-left: 15px; font-weight: normal;">',
|
154 |
+
'<h4>' => '<h4 style="margin-bottom:0;">',
|
155 |
+
);
|
156 |
+
echo str_replace( array_keys($replace), $replace, $changes );
|
157 |
+
}
|
158 |
+
|
159 |
+
public function registerOptionsPage() {
|
160 |
+
if ( is_callable( array( $this, 'options_page' ) ) ) {
|
161 |
+
add_options_page( $this->_pageTitle, $this->_menuTitle, $this->_accessLevel, $this->_hook, array( $this, 'options_page' ), 'http://cdn.xavisys.com/logos/xavisys-logo-32.png' );
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
protected function _filterBoxesMain($boxName) {
|
166 |
+
if ( 'main' == strtolower($boxName) ) {
|
167 |
+
return false;
|
168 |
+
}
|
169 |
+
return $this->_filterBoxesHelper($boxName, 'main');
|
170 |
+
}
|
171 |
+
|
172 |
+
protected function _filterBoxesSidebar($boxName) {
|
173 |
+
return $this->_filterBoxesHelper($boxName, 'sidebar');
|
174 |
+
}
|
175 |
+
|
176 |
+
protected function _filterBoxesHelper($boxName, $test) {
|
177 |
+
return ( strpos( strtolower($boxName), strtolower($test) ) !== false );
|
178 |
+
}
|
179 |
+
|
180 |
+
public function options_page() {
|
181 |
+
global $wp_meta_boxes;
|
182 |
+
$allBoxes = array_keys( $wp_meta_boxes['xavisys-'.$this->_slug] );
|
183 |
+
$mainBoxes = array_filter( $allBoxes, array( $this, '_filterBoxesMain' ) );
|
184 |
+
unset($mainBoxes['main']);
|
185 |
+
sort($mainBoxes);
|
186 |
+
$sidebarBoxes = array_filter( $allBoxes, array( $this, '_filterBoxesSidebar' ) );
|
187 |
+
unset($sidebarBoxes['sidebar']);
|
188 |
+
sort($sidebarBoxes);
|
189 |
+
?>
|
190 |
+
<div class="wrap">
|
191 |
+
<?php $this->screenIconLink(); ?>
|
192 |
+
<h2><?php echo esc_html($this->_pageTitle); ?></h2>
|
193 |
+
<div class="metabox-holder">
|
194 |
+
<div class="postbox-container" style="width:75%;">
|
195 |
+
<form action="options.php" method="post">
|
196 |
+
<?php settings_fields( $this->_optionGroup ); ?>
|
197 |
+
<?php do_meta_boxes( 'xavisys-' . $this->_slug, 'main', '' ); ?>
|
198 |
+
<p class="submit">
|
199 |
+
<input type="submit" name="Submit" value="<?php esc_attr_e('Update Options »', $this->_slug); ?>" />
|
200 |
+
</p>
|
201 |
+
</form>
|
202 |
+
<?php
|
203 |
+
foreach( $mainBoxes as $context ) {
|
204 |
+
do_meta_boxes( 'xavisys-' . $this->_slug, $context, '' );
|
205 |
+
}
|
206 |
+
?>
|
207 |
+
</div>
|
208 |
+
<div class="postbox-container" style="width:24%;">
|
209 |
+
<?php
|
210 |
+
foreach( $sidebarBoxes as $context ) {
|
211 |
+
do_meta_boxes( 'xavisys-' . $this->_slug, $context, '' );
|
212 |
+
}
|
213 |
+
?>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
</div>
|
217 |
+
<?php
|
218 |
+
}
|
219 |
+
|
220 |
+
public function addPluginPageLinks( $links, $file ){
|
221 |
+
if ( $file == $this->_file ) {
|
222 |
+
// Add Widget Page link to our plugin
|
223 |
+
$link = $this->getOptionsLink();
|
224 |
+
array_unshift( $links, $link );
|
225 |
+
|
226 |
+
// Add Support Forum link to our plugin
|
227 |
+
$link = $this->getSupportForumLink();
|
228 |
+
array_unshift( $links, $link );
|
229 |
+
}
|
230 |
+
return $links;
|
231 |
+
}
|
232 |
+
|
233 |
+
public function addPluginMetaLinks( $meta, $file ){
|
234 |
+
if ( $file == $this->_file ) {
|
235 |
+
// Add Widget Page link to our plugin
|
236 |
+
$meta[] = $this->getDonateLink(__('Donate'));
|
237 |
+
}
|
238 |
+
return $meta;
|
239 |
+
}
|
240 |
+
|
241 |
+
public function getSupportForumLink( $linkText = '' ) {
|
242 |
+
if ( empty($linkText) ) {
|
243 |
+
$linkText = __( 'Support Forum', $this->_slug );
|
244 |
+
}
|
245 |
+
return '<a href="' . $this->getSupportForumUrl() . '">' . $linkText . '</a>';
|
246 |
+
}
|
247 |
+
|
248 |
+
public function getDonateLink( $linkText = '' ) {
|
249 |
+
$url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=' . $this->_paypalButtonId;
|
250 |
+
if ( empty($linkText) ) {
|
251 |
+
$linkText = __( 'Donate to show your appreciation.', $this->_slug );
|
252 |
+
}
|
253 |
+
return "<a href='{$url}'>{$linkText}</a>";
|
254 |
+
}
|
255 |
+
|
256 |
+
public function getSupportForumUrl() {
|
257 |
+
return 'http://xavisys.com/support/forum/'.$this->_slug;
|
258 |
+
}
|
259 |
+
|
260 |
+
public function getOptionsLink( $linkText = '' ) {
|
261 |
+
if ( empty($linkText) ) {
|
262 |
+
$linkText = __( 'Settings', $this->_slug );
|
263 |
+
}
|
264 |
+
return '<a href="' . $this->getOptionsUrl() . '">' . $linkText . '</a>';
|
265 |
+
}
|
266 |
+
|
267 |
+
public function getOptionsUrl() {
|
268 |
+
return admin_url( 'options-general.php?page=' . $this->_hook );
|
269 |
+
}
|
270 |
+
|
271 |
+
public function optionsPageStyles() {
|
272 |
+
if (isset($_GET['page']) && $_GET['page'] == $this->_hook) {
|
273 |
+
wp_enqueue_style('dashboard');
|
274 |
+
wp_enqueue_style('xavisys-options-css', plugin_dir_url( __FILE__ ) . 'xavisys-plugin-framework.css');
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
public function addDefaultOptionsMetaBoxes() {
|
279 |
+
add_meta_box( $this->_slug . '-like-this', __('Like this Plugin?', $this->_slug), array($this, 'likeThisMetaBox'), 'xavisys-' . $this->_slug, 'sidebar');
|
280 |
+
add_meta_box( $this->_slug . '-support', __('Need Support?', $this->_slug), array($this, 'supportMetaBox'), 'xavisys-' . $this->_slug, 'sidebar');
|
281 |
+
add_meta_box( $this->_slug . '-xavisys-feed', __('Latest news from Xavisys', $this->_slug), array($this, 'xavisysFeedMetaBox'), 'xavisys-' . $this->_slug, 'sidebar');
|
282 |
+
}
|
283 |
+
|
284 |
+
public function likeThisMetaBox() {
|
285 |
+
echo '<p>';
|
286 |
+
_e('Then please do any or all of the following:', $this->_slug);
|
287 |
+
echo '</p><ul>';
|
288 |
+
|
289 |
+
$url = apply_filters('xavisys-plugin-url-'.$this->_slug, 'http://xavisys.com/wordpress-plugins/'.$this->_slug);
|
290 |
+
echo "<li><a href='{$url}'>";
|
291 |
+
_e('Link to it so others can find out about it.', $this->_slug);
|
292 |
+
echo "</a></li>";
|
293 |
+
|
294 |
+
$url = 'http://wordpress.org/extend/plugins/' . $this->_slug;
|
295 |
+
echo "<li><a href='{$url}'>";
|
296 |
+
_e('Give it a good rating on WordPress.org.', $this->_slug);
|
297 |
+
echo "</a></li>";
|
298 |
+
|
299 |
+
echo '<li>' . $this->getDonateLink() . '</li>';
|
300 |
+
|
301 |
+
echo '</ul>';
|
302 |
+
}
|
303 |
+
|
304 |
+
public function supportMetaBox() {
|
305 |
+
echo '<p>';
|
306 |
+
echo sprintf(__('If you have any problems with this plugin or ideas for improvements or enhancements, please use the <a href="%s">Xavisys Support Forums</a>.', $this->_slug), $this->getSupportForumUrl() );
|
307 |
+
echo '</p>';
|
308 |
+
}
|
309 |
+
|
310 |
+
public function xavisysFeedMetaBox() {
|
311 |
+
$args = array(
|
312 |
+
'url' => 'http://xavisys.com/feed/',
|
313 |
+
'items' => '5',
|
314 |
+
);
|
315 |
+
echo '<div class="rss-widget">';
|
316 |
+
wp_widget_rss_output( $args );
|
317 |
+
echo "</div>";
|
318 |
+
}
|
319 |
+
|
320 |
+
public function addDashboardWidgets() {
|
321 |
+
wp_add_dashboard_widget( 'dashboardb_xavisys' , 'The Latest News From Xavisys' , array( $this, 'dashboardWidget' ) );
|
322 |
+
}
|
323 |
+
|
324 |
+
public function dashboardWidget() {
|
325 |
+
$args = array(
|
326 |
+
'url' => 'http://xavisys.com/feed/',
|
327 |
+
'items' => '3',
|
328 |
+
'show_date' => 1,
|
329 |
+
'show_summary' => 1,
|
330 |
+
);
|
331 |
+
echo '<div class="rss-widget">';
|
332 |
+
echo '<a href="http://xavisys.com"><img class="alignright" src="http://cdn.xavisys.com/logos/xavisys-logo-small.png" /></a>';
|
333 |
+
wp_widget_rss_output( $args );
|
334 |
+
echo '<p style="border-top: 1px solid #CCC; padding-top: 10px; font-weight: bold;">';
|
335 |
+
echo '<a href="http://xavisys.com/feed/"><img src="'.get_bloginfo('wpurl').'/wp-includes/images/rss.png" alt=""/> Subscribe with RSS</a>';
|
336 |
+
echo "</p>";
|
337 |
+
echo "</div>";
|
338 |
+
}
|
339 |
+
|
340 |
+
public function screenIconLink($name = 'xavisys') {
|
341 |
+
echo '<a href="http://xavisys.com">';
|
342 |
+
screen_icon($name);
|
343 |
+
echo '</a>';
|
344 |
+
}
|
345 |
+
|
346 |
+
|
347 |
+
public function optionsPageScripts() {
|
348 |
+
if (isset($_GET['page']) && $_GET['page'] == $this->_hook) {
|
349 |
+
wp_enqueue_script('postbox');
|
350 |
+
wp_enqueue_script('dashboard');
|
351 |
+
}
|
352 |
+
}
|
353 |
+
}
|
354 |
+
}
|