Version Description
- Corrected a nasty bug which would break the "Add Media" option. Thanks to @flynsarmy (yet again)
- Fix: version field upgrade on the database
Download this release
Release Info
Developer | webdados |
Plugin | Open Graph for Facebook, Google+ and Twitter Card Tags |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 0.1.3 to 1.0.1
- includes/FacebookLocales.xml +850 -0
- includes/settings-page.php +522 -163
- lang/wd-fb-og-pt_PT.mo +0 -0
- lang/wd-fb-og-pt_PT.po +420 -0
- lang/wd-fb-og.pot +394 -0
- readme.txt +187 -22
- wonderm00n-open-graph.php +575 -120
includes/FacebookLocales.xml
ADDED
@@ -0,0 +1,850 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version='1.0'?>
|
2 |
+
<locales>
|
3 |
+
<locale>
|
4 |
+
<englishName>Afrikaans</englishName>
|
5 |
+
<codes>
|
6 |
+
<code>
|
7 |
+
<standard>
|
8 |
+
<name>FB</name>
|
9 |
+
<representation>af_ZA</representation>
|
10 |
+
</standard>
|
11 |
+
</code>
|
12 |
+
</codes>
|
13 |
+
</locale>
|
14 |
+
<locale>
|
15 |
+
<englishName>Arabic</englishName>
|
16 |
+
<codes>
|
17 |
+
<code>
|
18 |
+
<standard>
|
19 |
+
<name>FB</name>
|
20 |
+
<representation>ar_AR</representation>
|
21 |
+
</standard>
|
22 |
+
</code>
|
23 |
+
</codes>
|
24 |
+
</locale>
|
25 |
+
<locale>
|
26 |
+
<englishName>Azerbaijani</englishName>
|
27 |
+
<codes>
|
28 |
+
<code>
|
29 |
+
<standard>
|
30 |
+
<name>FB</name>
|
31 |
+
<representation>az_AZ</representation>
|
32 |
+
</standard>
|
33 |
+
</code>
|
34 |
+
</codes>
|
35 |
+
</locale>
|
36 |
+
<locale>
|
37 |
+
<englishName>Belarusian</englishName>
|
38 |
+
<codes>
|
39 |
+
<code>
|
40 |
+
<standard>
|
41 |
+
<name>FB</name>
|
42 |
+
<representation>be_BY</representation>
|
43 |
+
</standard>
|
44 |
+
</code>
|
45 |
+
</codes>
|
46 |
+
</locale>
|
47 |
+
<locale>
|
48 |
+
<englishName>Bulgarian</englishName>
|
49 |
+
<codes>
|
50 |
+
<code>
|
51 |
+
<standard>
|
52 |
+
<name>FB</name>
|
53 |
+
<representation>bg_BG</representation>
|
54 |
+
</standard>
|
55 |
+
</code>
|
56 |
+
</codes>
|
57 |
+
</locale>
|
58 |
+
<locale>
|
59 |
+
<englishName>Bengali</englishName>
|
60 |
+
<codes>
|
61 |
+
<code>
|
62 |
+
<standard>
|
63 |
+
<name>FB</name>
|
64 |
+
<representation>bn_IN</representation>
|
65 |
+
</standard>
|
66 |
+
</code>
|
67 |
+
</codes>
|
68 |
+
</locale>
|
69 |
+
<locale>
|
70 |
+
<englishName>Bosnian</englishName>
|
71 |
+
<codes>
|
72 |
+
<code>
|
73 |
+
<standard>
|
74 |
+
<name>FB</name>
|
75 |
+
<representation>bs_BA</representation>
|
76 |
+
</standard>
|
77 |
+
</code>
|
78 |
+
</codes>
|
79 |
+
</locale>
|
80 |
+
<locale>
|
81 |
+
<englishName>Catalan</englishName>
|
82 |
+
<codes>
|
83 |
+
<code>
|
84 |
+
<standard>
|
85 |
+
<name>FB</name>
|
86 |
+
<representation>ca_ES</representation>
|
87 |
+
</standard>
|
88 |
+
</code>
|
89 |
+
</codes>
|
90 |
+
</locale>
|
91 |
+
<locale>
|
92 |
+
<englishName>Czech</englishName>
|
93 |
+
<codes>
|
94 |
+
<code>
|
95 |
+
<standard>
|
96 |
+
<name>FB</name>
|
97 |
+
<representation>cs_CZ</representation>
|
98 |
+
</standard>
|
99 |
+
</code>
|
100 |
+
</codes>
|
101 |
+
</locale>
|
102 |
+
<locale>
|
103 |
+
<englishName>Welsh</englishName>
|
104 |
+
<codes>
|
105 |
+
<code>
|
106 |
+
<standard>
|
107 |
+
<name>FB</name>
|
108 |
+
<representation>cy_GB</representation>
|
109 |
+
</standard>
|
110 |
+
</code>
|
111 |
+
</codes>
|
112 |
+
</locale>
|
113 |
+
<locale>
|
114 |
+
<englishName>Danish</englishName>
|
115 |
+
<codes>
|
116 |
+
<code>
|
117 |
+
<standard>
|
118 |
+
<name>FB</name>
|
119 |
+
<representation>da_DK</representation>
|
120 |
+
</standard>
|
121 |
+
</code>
|
122 |
+
</codes>
|
123 |
+
</locale>
|
124 |
+
<locale>
|
125 |
+
<englishName>German</englishName>
|
126 |
+
<codes>
|
127 |
+
<code>
|
128 |
+
<standard>
|
129 |
+
<name>FB</name>
|
130 |
+
<representation>de_DE</representation>
|
131 |
+
</standard>
|
132 |
+
</code>
|
133 |
+
</codes>
|
134 |
+
</locale>
|
135 |
+
<locale>
|
136 |
+
<englishName>Greek</englishName>
|
137 |
+
<codes>
|
138 |
+
<code>
|
139 |
+
<standard>
|
140 |
+
<name>FB</name>
|
141 |
+
<representation>el_GR</representation>
|
142 |
+
</standard>
|
143 |
+
</code>
|
144 |
+
</codes>
|
145 |
+
</locale>
|
146 |
+
<locale>
|
147 |
+
<englishName>English (UK)</englishName>
|
148 |
+
<codes>
|
149 |
+
<code>
|
150 |
+
<standard>
|
151 |
+
<name>FB</name>
|
152 |
+
<representation>en_GB</representation>
|
153 |
+
</standard>
|
154 |
+
</code>
|
155 |
+
</codes>
|
156 |
+
</locale>
|
157 |
+
<locale>
|
158 |
+
<englishName>English (Pirate)</englishName>
|
159 |
+
<codes>
|
160 |
+
<code>
|
161 |
+
<standard>
|
162 |
+
<name>FB</name>
|
163 |
+
<representation>en_PI</representation>
|
164 |
+
</standard>
|
165 |
+
</code>
|
166 |
+
</codes>
|
167 |
+
</locale>
|
168 |
+
<locale>
|
169 |
+
<englishName>English (Upside Down)</englishName>
|
170 |
+
<codes>
|
171 |
+
<code>
|
172 |
+
<standard>
|
173 |
+
<name>FB</name>
|
174 |
+
<representation>en_UD</representation>
|
175 |
+
</standard>
|
176 |
+
</code>
|
177 |
+
</codes>
|
178 |
+
</locale>
|
179 |
+
<locale>
|
180 |
+
<englishName>English (US)</englishName>
|
181 |
+
<codes>
|
182 |
+
<code>
|
183 |
+
<standard>
|
184 |
+
<name>FB</name>
|
185 |
+
<representation>en_US</representation>
|
186 |
+
</standard>
|
187 |
+
</code>
|
188 |
+
</codes>
|
189 |
+
</locale>
|
190 |
+
<locale>
|
191 |
+
<englishName>Esperanto</englishName>
|
192 |
+
<codes>
|
193 |
+
<code>
|
194 |
+
<standard>
|
195 |
+
<name>FB</name>
|
196 |
+
<representation>eo_EO</representation>
|
197 |
+
</standard>
|
198 |
+
</code>
|
199 |
+
</codes>
|
200 |
+
</locale>
|
201 |
+
<locale>
|
202 |
+
<englishName>Spanish (Spain)</englishName>
|
203 |
+
<codes>
|
204 |
+
<code>
|
205 |
+
<standard>
|
206 |
+
<name>FB</name>
|
207 |
+
<representation>es_ES</representation>
|
208 |
+
</standard>
|
209 |
+
</code>
|
210 |
+
</codes>
|
211 |
+
</locale>
|
212 |
+
<locale>
|
213 |
+
<englishName>Spanish</englishName>
|
214 |
+
<codes>
|
215 |
+
<code>
|
216 |
+
<standard>
|
217 |
+
<name>FB</name>
|
218 |
+
<representation>es_LA</representation>
|
219 |
+
</standard>
|
220 |
+
</code>
|
221 |
+
</codes>
|
222 |
+
</locale>
|
223 |
+
<locale>
|
224 |
+
<englishName>Estonian</englishName>
|
225 |
+
<codes>
|
226 |
+
<code>
|
227 |
+
<standard>
|
228 |
+
<name>FB</name>
|
229 |
+
<representation>et_EE</representation>
|
230 |
+
</standard>
|
231 |
+
</code>
|
232 |
+
</codes>
|
233 |
+
</locale>
|
234 |
+
<locale>
|
235 |
+
<englishName>Basque</englishName>
|
236 |
+
<codes>
|
237 |
+
<code>
|
238 |
+
<standard>
|
239 |
+
<name>FB</name>
|
240 |
+
<representation>eu_ES</representation>
|
241 |
+
</standard>
|
242 |
+
</code>
|
243 |
+
</codes>
|
244 |
+
</locale>
|
245 |
+
<locale>
|
246 |
+
<englishName>Persian</englishName>
|
247 |
+
<codes>
|
248 |
+
<code>
|
249 |
+
<standard>
|
250 |
+
<name>FB</name>
|
251 |
+
<representation>fa_IR</representation>
|
252 |
+
</standard>
|
253 |
+
</code>
|
254 |
+
</codes>
|
255 |
+
</locale>
|
256 |
+
<locale>
|
257 |
+
<englishName>Leet Speak</englishName>
|
258 |
+
<codes>
|
259 |
+
<code>
|
260 |
+
<standard>
|
261 |
+
<name>FB</name>
|
262 |
+
<representation>fb_LT</representation>
|
263 |
+
</standard>
|
264 |
+
</code>
|
265 |
+
</codes>
|
266 |
+
</locale>
|
267 |
+
<locale>
|
268 |
+
<englishName>Finnish</englishName>
|
269 |
+
<codes>
|
270 |
+
<code>
|
271 |
+
<standard>
|
272 |
+
<name>FB</name>
|
273 |
+
<representation>fi_FI</representation>
|
274 |
+
</standard>
|
275 |
+
</code>
|
276 |
+
</codes>
|
277 |
+
</locale>
|
278 |
+
<locale>
|
279 |
+
<englishName>Faroese</englishName>
|
280 |
+
<codes>
|
281 |
+
<code>
|
282 |
+
<standard>
|
283 |
+
<name>FB</name>
|
284 |
+
<representation>fo_FO</representation>
|
285 |
+
</standard>
|
286 |
+
</code>
|
287 |
+
</codes>
|
288 |
+
</locale>
|
289 |
+
<locale>
|
290 |
+
<englishName>French (Canada)</englishName>
|
291 |
+
<codes>
|
292 |
+
<code>
|
293 |
+
<standard>
|
294 |
+
<name>FB</name>
|
295 |
+
<representation>fr_CA</representation>
|
296 |
+
</standard>
|
297 |
+
</code>
|
298 |
+
</codes>
|
299 |
+
</locale>
|
300 |
+
<locale>
|
301 |
+
<englishName>French (France)</englishName>
|
302 |
+
<codes>
|
303 |
+
<code>
|
304 |
+
<standard>
|
305 |
+
<name>FB</name>
|
306 |
+
<representation>fr_FR</representation>
|
307 |
+
</standard>
|
308 |
+
</code>
|
309 |
+
</codes>
|
310 |
+
</locale>
|
311 |
+
<locale>
|
312 |
+
<englishName>Frisian</englishName>
|
313 |
+
<codes>
|
314 |
+
<code>
|
315 |
+
<standard>
|
316 |
+
<name>FB</name>
|
317 |
+
<representation>fy_NL</representation>
|
318 |
+
</standard>
|
319 |
+
</code>
|
320 |
+
</codes>
|
321 |
+
</locale>
|
322 |
+
<locale>
|
323 |
+
<englishName>Irish</englishName>
|
324 |
+
<codes>
|
325 |
+
<code>
|
326 |
+
<standard>
|
327 |
+
<name>FB</name>
|
328 |
+
<representation>ga_IE</representation>
|
329 |
+
</standard>
|
330 |
+
</code>
|
331 |
+
</codes>
|
332 |
+
</locale>
|
333 |
+
<locale>
|
334 |
+
<englishName>Galician</englishName>
|
335 |
+
<codes>
|
336 |
+
<code>
|
337 |
+
<standard>
|
338 |
+
<name>FB</name>
|
339 |
+
<representation>gl_ES</representation>
|
340 |
+
</standard>
|
341 |
+
</code>
|
342 |
+
</codes>
|
343 |
+
</locale>
|
344 |
+
<locale>
|
345 |
+
<englishName>Hebrew</englishName>
|
346 |
+
<codes>
|
347 |
+
<code>
|
348 |
+
<standard>
|
349 |
+
<name>FB</name>
|
350 |
+
<representation>he_IL</representation>
|
351 |
+
</standard>
|
352 |
+
</code>
|
353 |
+
</codes>
|
354 |
+
</locale>
|
355 |
+
<locale>
|
356 |
+
<englishName>Hindi</englishName>
|
357 |
+
<codes>
|
358 |
+
<code>
|
359 |
+
<standard>
|
360 |
+
<name>FB</name>
|
361 |
+
<representation>hi_IN</representation>
|
362 |
+
</standard>
|
363 |
+
</code>
|
364 |
+
</codes>
|
365 |
+
</locale>
|
366 |
+
<locale>
|
367 |
+
<englishName>Croatian</englishName>
|
368 |
+
<codes>
|
369 |
+
<code>
|
370 |
+
<standard>
|
371 |
+
<name>FB</name>
|
372 |
+
<representation>hr_HR</representation>
|
373 |
+
</standard>
|
374 |
+
</code>
|
375 |
+
</codes>
|
376 |
+
</locale>
|
377 |
+
<locale>
|
378 |
+
<englishName>Hungarian</englishName>
|
379 |
+
<codes>
|
380 |
+
<code>
|
381 |
+
<standard>
|
382 |
+
<name>FB</name>
|
383 |
+
<representation>hu_HU</representation>
|
384 |
+
</standard>
|
385 |
+
</code>
|
386 |
+
</codes>
|
387 |
+
</locale>
|
388 |
+
<locale>
|
389 |
+
<englishName>Armenian</englishName>
|
390 |
+
<codes>
|
391 |
+
<code>
|
392 |
+
<standard>
|
393 |
+
<name>FB</name>
|
394 |
+
<representation>hy_AM</representation>
|
395 |
+
</standard>
|
396 |
+
</code>
|
397 |
+
</codes>
|
398 |
+
</locale>
|
399 |
+
<locale>
|
400 |
+
<englishName>Indonesian</englishName>
|
401 |
+
<codes>
|
402 |
+
<code>
|
403 |
+
<standard>
|
404 |
+
<name>FB</name>
|
405 |
+
<representation>id_ID</representation>
|
406 |
+
</standard>
|
407 |
+
</code>
|
408 |
+
</codes>
|
409 |
+
</locale>
|
410 |
+
<locale>
|
411 |
+
<englishName>Icelandic</englishName>
|
412 |
+
<codes>
|
413 |
+
<code>
|
414 |
+
<standard>
|
415 |
+
<name>FB</name>
|
416 |
+
<representation>is_IS</representation>
|
417 |
+
</standard>
|
418 |
+
</code>
|
419 |
+
</codes>
|
420 |
+
</locale>
|
421 |
+
<locale>
|
422 |
+
<englishName>Italian</englishName>
|
423 |
+
<codes>
|
424 |
+
<code>
|
425 |
+
<standard>
|
426 |
+
<name>FB</name>
|
427 |
+
<representation>it_IT</representation>
|
428 |
+
</standard>
|
429 |
+
</code>
|
430 |
+
</codes>
|
431 |
+
</locale>
|
432 |
+
<locale>
|
433 |
+
<englishName>Japanese</englishName>
|
434 |
+
<codes>
|
435 |
+
<code>
|
436 |
+
<standard>
|
437 |
+
<name>FB</name>
|
438 |
+
<representation>ja_JP</representation>
|
439 |
+
</standard>
|
440 |
+
</code>
|
441 |
+
</codes>
|
442 |
+
</locale>
|
443 |
+
<locale>
|
444 |
+
<englishName>Georgian</englishName>
|
445 |
+
<codes>
|
446 |
+
<code>
|
447 |
+
<standard>
|
448 |
+
<name>FB</name>
|
449 |
+
<representation>ka_GE</representation>
|
450 |
+
</standard>
|
451 |
+
</code>
|
452 |
+
</codes>
|
453 |
+
</locale>
|
454 |
+
<locale>
|
455 |
+
<englishName>Khmer</englishName>
|
456 |
+
<codes>
|
457 |
+
<code>
|
458 |
+
<standard>
|
459 |
+
<name>FB</name>
|
460 |
+
<representation>km_KH</representation>
|
461 |
+
</standard>
|
462 |
+
</code>
|
463 |
+
</codes>
|
464 |
+
</locale>
|
465 |
+
<locale>
|
466 |
+
<englishName>Korean</englishName>
|
467 |
+
<codes>
|
468 |
+
<code>
|
469 |
+
<standard>
|
470 |
+
<name>FB</name>
|
471 |
+
<representation>ko_KR</representation>
|
472 |
+
</standard>
|
473 |
+
</code>
|
474 |
+
</codes>
|
475 |
+
</locale>
|
476 |
+
<locale>
|
477 |
+
<englishName>Kurdish</englishName>
|
478 |
+
<codes>
|
479 |
+
<code>
|
480 |
+
<standard>
|
481 |
+
<name>FB</name>
|
482 |
+
<representation>ku_TR</representation>
|
483 |
+
</standard>
|
484 |
+
</code>
|
485 |
+
</codes>
|
486 |
+
</locale>
|
487 |
+
<locale>
|
488 |
+
<englishName>Latin</englishName>
|
489 |
+
<codes>
|
490 |
+
<code>
|
491 |
+
<standard>
|
492 |
+
<name>FB</name>
|
493 |
+
<representation>la_VA</representation>
|
494 |
+
</standard>
|
495 |
+
</code>
|
496 |
+
</codes>
|
497 |
+
</locale>
|
498 |
+
<locale>
|
499 |
+
<englishName>Lithuanian</englishName>
|
500 |
+
<codes>
|
501 |
+
<code>
|
502 |
+
<standard>
|
503 |
+
<name>FB</name>
|
504 |
+
<representation>lt_LT</representation>
|
505 |
+
</standard>
|
506 |
+
</code>
|
507 |
+
</codes>
|
508 |
+
</locale>
|
509 |
+
<locale>
|
510 |
+
<englishName>Latvian</englishName>
|
511 |
+
<codes>
|
512 |
+
<code>
|
513 |
+
<standard>
|
514 |
+
<name>FB</name>
|
515 |
+
<representation>lv_LV</representation>
|
516 |
+
</standard>
|
517 |
+
</code>
|
518 |
+
</codes>
|
519 |
+
</locale>
|
520 |
+
<locale>
|
521 |
+
<englishName>Macedonian</englishName>
|
522 |
+
<codes>
|
523 |
+
<code>
|
524 |
+
<standard>
|
525 |
+
<name>FB</name>
|
526 |
+
<representation>mk_MK</representation>
|
527 |
+
</standard>
|
528 |
+
</code>
|
529 |
+
</codes>
|
530 |
+
</locale>
|
531 |
+
<locale>
|
532 |
+
<englishName>Malayalam</englishName>
|
533 |
+
<codes>
|
534 |
+
<code>
|
535 |
+
<standard>
|
536 |
+
<name>FB</name>
|
537 |
+
<representation>ml_IN</representation>
|
538 |
+
</standard>
|
539 |
+
</code>
|
540 |
+
</codes>
|
541 |
+
</locale>
|
542 |
+
<locale>
|
543 |
+
<englishName>Malay</englishName>
|
544 |
+
<codes>
|
545 |
+
<code>
|
546 |
+
<standard>
|
547 |
+
<name>FB</name>
|
548 |
+
<representation>ms_MY</representation>
|
549 |
+
</standard>
|
550 |
+
</code>
|
551 |
+
</codes>
|
552 |
+
</locale>
|
553 |
+
<locale>
|
554 |
+
<englishName>Norwegian (bokmal)</englishName>
|
555 |
+
<codes>
|
556 |
+
<code>
|
557 |
+
<standard>
|
558 |
+
<name>FB</name>
|
559 |
+
<representation>nb_NO</representation>
|
560 |
+
</standard>
|
561 |
+
</code>
|
562 |
+
</codes>
|
563 |
+
</locale>
|
564 |
+
<locale>
|
565 |
+
<englishName>Nepali</englishName>
|
566 |
+
<codes>
|
567 |
+
<code>
|
568 |
+
<standard>
|
569 |
+
<name>FB</name>
|
570 |
+
<representation>ne_NP</representation>
|
571 |
+
</standard>
|
572 |
+
</code>
|
573 |
+
</codes>
|
574 |
+
</locale>
|
575 |
+
<locale>
|
576 |
+
<englishName>Dutch</englishName>
|
577 |
+
<codes>
|
578 |
+
<code>
|
579 |
+
<standard>
|
580 |
+
<name>FB</name>
|
581 |
+
<representation>nl_NL</representation>
|
582 |
+
</standard>
|
583 |
+
</code>
|
584 |
+
</codes>
|
585 |
+
</locale>
|
586 |
+
<locale>
|
587 |
+
<englishName>Norwegian (nynorsk)</englishName>
|
588 |
+
<codes>
|
589 |
+
<code>
|
590 |
+
<standard>
|
591 |
+
<name>FB</name>
|
592 |
+
<representation>nn_NO</representation>
|
593 |
+
</standard>
|
594 |
+
</code>
|
595 |
+
</codes>
|
596 |
+
</locale>
|
597 |
+
<locale>
|
598 |
+
<englishName>Punjabi</englishName>
|
599 |
+
<codes>
|
600 |
+
<code>
|
601 |
+
<standard>
|
602 |
+
<name>FB</name>
|
603 |
+
<representation>pa_IN</representation>
|
604 |
+
</standard>
|
605 |
+
</code>
|
606 |
+
</codes>
|
607 |
+
</locale>
|
608 |
+
<locale>
|
609 |
+
<englishName>Polish</englishName>
|
610 |
+
<codes>
|
611 |
+
<code>
|
612 |
+
<standard>
|
613 |
+
<name>FB</name>
|
614 |
+
<representation>pl_PL</representation>
|
615 |
+
</standard>
|
616 |
+
</code>
|
617 |
+
</codes>
|
618 |
+
</locale>
|
619 |
+
<locale>
|
620 |
+
<englishName>Pashto</englishName>
|
621 |
+
<codes>
|
622 |
+
<code>
|
623 |
+
<standard>
|
624 |
+
<name>FB</name>
|
625 |
+
<representation>ps_AF</representation>
|
626 |
+
</standard>
|
627 |
+
</code>
|
628 |
+
</codes>
|
629 |
+
</locale>
|
630 |
+
<locale>
|
631 |
+
<englishName>Portuguese (Brazil)</englishName>
|
632 |
+
<codes>
|
633 |
+
<code>
|
634 |
+
<standard>
|
635 |
+
<name>FB</name>
|
636 |
+
<representation>pt_BR</representation>
|
637 |
+
</standard>
|
638 |
+
</code>
|
639 |
+
</codes>
|
640 |
+
</locale>
|
641 |
+
<locale>
|
642 |
+
<englishName>Portuguese (Portugal)</englishName>
|
643 |
+
<codes>
|
644 |
+
<code>
|
645 |
+
<standard>
|
646 |
+
<name>FB</name>
|
647 |
+
<representation>pt_PT</representation>
|
648 |
+
</standard>
|
649 |
+
</code>
|
650 |
+
</codes>
|
651 |
+
</locale>
|
652 |
+
<locale>
|
653 |
+
<englishName>Romanian</englishName>
|
654 |
+
<codes>
|
655 |
+
<code>
|
656 |
+
<standard>
|
657 |
+
<name>FB</name>
|
658 |
+
<representation>ro_RO</representation>
|
659 |
+
</standard>
|
660 |
+
</code>
|
661 |
+
</codes>
|
662 |
+
</locale>
|
663 |
+
<locale>
|
664 |
+
<englishName>Russian</englishName>
|
665 |
+
<codes>
|
666 |
+
<code>
|
667 |
+
<standard>
|
668 |
+
<name>FB</name>
|
669 |
+
<representation>ru_RU</representation>
|
670 |
+
</standard>
|
671 |
+
</code>
|
672 |
+
</codes>
|
673 |
+
</locale>
|
674 |
+
<locale>
|
675 |
+
<englishName>Slovak</englishName>
|
676 |
+
<codes>
|
677 |
+
<code>
|
678 |
+
<standard>
|
679 |
+
<name>FB</name>
|
680 |
+
<representation>sk_SK</representation>
|
681 |
+
</standard>
|
682 |
+
</code>
|
683 |
+
</codes>
|
684 |
+
</locale>
|
685 |
+
<locale>
|
686 |
+
<englishName>Slovenian</englishName>
|
687 |
+
<codes>
|
688 |
+
<code>
|
689 |
+
<standard>
|
690 |
+
<name>FB</name>
|
691 |
+
<representation>sl_SI</representation>
|
692 |
+
</standard>
|
693 |
+
</code>
|
694 |
+
</codes>
|
695 |
+
</locale>
|
696 |
+
<locale>
|
697 |
+
<englishName>Albanian</englishName>
|
698 |
+
<codes>
|
699 |
+
<code>
|
700 |
+
<standard>
|
701 |
+
<name>FB</name>
|
702 |
+
<representation>sq_AL</representation>
|
703 |
+
</standard>
|
704 |
+
</code>
|
705 |
+
</codes>
|
706 |
+
</locale>
|
707 |
+
<locale>
|
708 |
+
<englishName>Serbian</englishName>
|
709 |
+
<codes>
|
710 |
+
<code>
|
711 |
+
<standard>
|
712 |
+
<name>FB</name>
|
713 |
+
<representation>sr_RS</representation>
|
714 |
+
</standard>
|
715 |
+
</code>
|
716 |
+
</codes>
|
717 |
+
</locale>
|
718 |
+
<locale>
|
719 |
+
<englishName>Swedish</englishName>
|
720 |
+
<codes>
|
721 |
+
<code>
|
722 |
+
<standard>
|
723 |
+
<name>FB</name>
|
724 |
+
<representation>sv_SE</representation>
|
725 |
+
</standard>
|
726 |
+
</code>
|
727 |
+
</codes>
|
728 |
+
</locale>
|
729 |
+
<locale>
|
730 |
+
<englishName>Swahili</englishName>
|
731 |
+
<codes>
|
732 |
+
<code>
|
733 |
+
<standard>
|
734 |
+
<name>FB</name>
|
735 |
+
<representation>sw_KE</representation>
|
736 |
+
</standard>
|
737 |
+
</code>
|
738 |
+
</codes>
|
739 |
+
</locale>
|
740 |
+
<locale>
|
741 |
+
<englishName>Tamil</englishName>
|
742 |
+
<codes>
|
743 |
+
<code>
|
744 |
+
<standard>
|
745 |
+
<name>FB</name>
|
746 |
+
<representation>ta_IN</representation>
|
747 |
+
</standard>
|
748 |
+
</code>
|
749 |
+
</codes>
|
750 |
+
</locale>
|
751 |
+
<locale>
|
752 |
+
<englishName>Telugu</englishName>
|
753 |
+
<codes>
|
754 |
+
<code>
|
755 |
+
<standard>
|
756 |
+
<name>FB</name>
|
757 |
+
<representation>te_IN</representation>
|
758 |
+
</standard>
|
759 |
+
</code>
|
760 |
+
</codes>
|
761 |
+
</locale>
|
762 |
+
<locale>
|
763 |
+
<englishName>Thai</englishName>
|
764 |
+
<codes>
|
765 |
+
<code>
|
766 |
+
<standard>
|
767 |
+
<name>FB</name>
|
768 |
+
<representation>th_TH</representation>
|
769 |
+
</standard>
|
770 |
+
</code>
|
771 |
+
</codes>
|
772 |
+
</locale>
|
773 |
+
<locale>
|
774 |
+
<englishName>Filipino</englishName>
|
775 |
+
<codes>
|
776 |
+
<code>
|
777 |
+
<standard>
|
778 |
+
<name>FB</name>
|
779 |
+
<representation>tl_PH</representation>
|
780 |
+
</standard>
|
781 |
+
</code>
|
782 |
+
</codes>
|
783 |
+
</locale>
|
784 |
+
<locale>
|
785 |
+
<englishName>Turkish</englishName>
|
786 |
+
<codes>
|
787 |
+
<code>
|
788 |
+
<standard>
|
789 |
+
<name>FB</name>
|
790 |
+
<representation>tr_TR</representation>
|
791 |
+
</standard>
|
792 |
+
</code>
|
793 |
+
</codes>
|
794 |
+
</locale>
|
795 |
+
<locale>
|
796 |
+
<englishName>Ukrainian</englishName>
|
797 |
+
<codes>
|
798 |
+
<code>
|
799 |
+
<standard>
|
800 |
+
<name>FB</name>
|
801 |
+
<representation>uk_UA</representation>
|
802 |
+
</standard>
|
803 |
+
</code>
|
804 |
+
</codes>
|
805 |
+
</locale>
|
806 |
+
<locale>
|
807 |
+
<englishName>Vietnamese</englishName>
|
808 |
+
<codes>
|
809 |
+
<code>
|
810 |
+
<standard>
|
811 |
+
<name>FB</name>
|
812 |
+
<representation>vi_VN</representation>
|
813 |
+
</standard>
|
814 |
+
</code>
|
815 |
+
</codes>
|
816 |
+
</locale>
|
817 |
+
<locale>
|
818 |
+
<englishName>Simplified Chinese (China)</englishName>
|
819 |
+
<codes>
|
820 |
+
<code>
|
821 |
+
<standard>
|
822 |
+
<name>FB</name>
|
823 |
+
<representation>zh_CN</representation>
|
824 |
+
</standard>
|
825 |
+
</code>
|
826 |
+
</codes>
|
827 |
+
</locale>
|
828 |
+
<locale>
|
829 |
+
<englishName>Traditional Chinese (Hong Kong)</englishName>
|
830 |
+
<codes>
|
831 |
+
<code>
|
832 |
+
<standard>
|
833 |
+
<name>FB</name>
|
834 |
+
<representation>zh_HK</representation>
|
835 |
+
</standard>
|
836 |
+
</code>
|
837 |
+
</codes>
|
838 |
+
</locale>
|
839 |
+
<locale>
|
840 |
+
<englishName>Traditional Chinese (Taiwan)</englishName>
|
841 |
+
<codes>
|
842 |
+
<code>
|
843 |
+
<standard>
|
844 |
+
<name>FB</name>
|
845 |
+
<representation>zh_TW</representation>
|
846 |
+
</standard>
|
847 |
+
</code>
|
848 |
+
</codes>
|
849 |
+
</locale>
|
850 |
+
</locales>
|
includes/settings-page.php
CHANGED
@@ -1,39 +1,64 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @package
|
4 |
* @subpackage Settings Page
|
5 |
*
|
6 |
* @since 0.1
|
7 |
-
* @author
|
8 |
*
|
9 |
*
|
10 |
*/
|
11 |
|
12 |
-
//
|
13 |
-
if(
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
$fb_admin_id_show = get_option('wonderm00n_open_graph_fb_admin_id_show');
|
20 |
-
$fb_admin_id = get_option('wonderm00n_open_graph_fb_admin_id');
|
21 |
-
$fb_sitename_show = get_option('wonderm00n_open_graph_fb_sitename_show');
|
22 |
-
$fb_title_show = get_option('wonderm00n_open_graph_fb_title_show');
|
23 |
-
$fb_url_show = get_option('wonderm00n_open_graph_fb_url_show');
|
24 |
-
$fb_type_show = get_option('wonderm00n_open_graph_fb_type_show');
|
25 |
-
$fb_desc_show = get_option('wonderm00n_open_graph_fb_desc_show');
|
26 |
-
$fb_desc_chars = get_option('wonderm00n_open_graph_fb_desc_chars');
|
27 |
-
$fb_image_show = get_option('wonderm00n_open_graph_fb_image_show');
|
28 |
-
$fb_image = get_option('wonderm00n_open_graph_fb_image');
|
29 |
|
30 |
?>
|
31 |
<div class="wrap">
|
32 |
|
33 |
-
|
34 |
-
<h2>
|
35 |
<br class="clear"/>
|
36 |
-
<p
|
37 |
|
38 |
<?php
|
39 |
settings_fields('wonderm00n_open_graph');
|
@@ -41,153 +66,399 @@
|
|
41 |
|
42 |
<div class="postbox-container" style="width: 69%;">
|
43 |
<div id="poststuff">
|
44 |
-
<
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
<
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
<
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
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 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
</div>
|
168 |
</div>
|
169 |
|
170 |
<?php
|
171 |
-
$links[0]['text']='Test your URLs at Facebook URL Linter';
|
172 |
$links[0]['url']='https://developers.facebook.com/tools/debug';
|
173 |
-
|
|
|
174 |
$links[10]['url']='https://developers.facebook.com/docs/opengraph/';
|
175 |
-
|
|
|
176 |
$links[20]['url']='http://ogp.me/';
|
177 |
-
|
178 |
-
$links[30]['
|
179 |
-
$links[
|
180 |
-
|
181 |
-
$links[
|
182 |
-
$links[
|
183 |
-
|
184 |
-
$links[
|
|
|
|
|
|
|
|
|
185 |
?>
|
186 |
-
<div class="postbox-container" style="width: 29%;">
|
187 |
|
188 |
<div id="poststuff">
|
189 |
<div id="wonderm00n_open_graph_links" class="postbox">
|
190 |
-
<h3 id="settings"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
<div class="inside">
|
192 |
<ul>
|
193 |
<?php foreach($links as $link) { ?>
|
@@ -200,9 +471,9 @@
|
|
200 |
|
201 |
<div id="poststuff">
|
202 |
<div id="wonderm00n_open_graph_donation" class="postbox">
|
203 |
-
<h3 id="settings"
|
204 |
<div class="inside">
|
205 |
-
<p
|
206 |
<center><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
207 |
<input type="hidden" name="cmd" value="_donations">
|
208 |
<input type="hidden" name="business" value="wonderm00n@gmail.com">
|
@@ -221,7 +492,7 @@
|
|
221 |
</div>
|
222 |
|
223 |
<div class="clear">
|
224 |
-
<p><br/>© 2011<?php if(date('Y')>
|
225 |
</div>
|
226 |
|
227 |
</div>
|
@@ -232,14 +503,102 @@
|
|
232 |
tb_show('',"media-upload.php?type=image&TB_iframe=true");
|
233 |
});
|
234 |
window.send_to_editor = function(html) {
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
</script>
|
241 |
<style type="text/css">
|
242 |
TABLE.form-table TR TH {
|
243 |
font-weight: bold;
|
244 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
</style>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @package Facebook Open Graph Meta Tags for WordPress
|
4 |
* @subpackage Settings Page
|
5 |
*
|
6 |
* @since 0.1
|
7 |
+
* @author Webdados
|
8 |
*
|
9 |
*
|
10 |
*/
|
11 |
|
12 |
+
//First we save!
|
13 |
+
if ( isset($_POST['action']) ) {
|
14 |
+
if (trim($_POST['action'])=='save') {
|
15 |
+
//This should also use the $wonderm00n_open_graph_plugin_settings array, but because of intval and trim we still can't
|
16 |
+
$usersettings['fb_app_id_show']= intval(wonderm00n_open_graph_post('fb_app_id_show'));
|
17 |
+
$usersettings['fb_app_id']= trim(wonderm00n_open_graph_post('fb_app_id'));
|
18 |
+
$usersettings['fb_admin_id_show']= intval(wonderm00n_open_graph_post('fb_admin_id_show'));
|
19 |
+
$usersettings['fb_admin_id']= trim(wonderm00n_open_graph_post('fb_admin_id'));
|
20 |
+
$usersettings['fb_locale_show']= intval(wonderm00n_open_graph_post('fb_locale_show'));
|
21 |
+
$usersettings['fb_locale']= trim(wonderm00n_open_graph_post('fb_locale'));
|
22 |
+
$usersettings['fb_sitename_show']= intval(wonderm00n_open_graph_post('fb_sitename_show'));
|
23 |
+
$usersettings['fb_title_show']= intval(wonderm00n_open_graph_post('fb_title_show'));
|
24 |
+
$usersettings['fb_title_show_schema']= intval(wonderm00n_open_graph_post('fb_title_show_schema'));
|
25 |
+
$usersettings['fb_url_show']= intval(wonderm00n_open_graph_post('fb_url_show'));
|
26 |
+
$usersettings['fb_url_canonical']= intval(wonderm00n_open_graph_post('fb_url_canonical'));
|
27 |
+
$usersettings['fb_url_add_trailing']= intval(wonderm00n_open_graph_post('fb_url_add_trailing'));
|
28 |
+
$usersettings['fb_type_show']= intval(wonderm00n_open_graph_post('fb_type_show'));
|
29 |
+
$usersettings['fb_type_homepage']= trim(wonderm00n_open_graph_post('fb_type_homepage'));
|
30 |
+
$usersettings['fb_desc_show']= intval(wonderm00n_open_graph_post('fb_desc_show'));
|
31 |
+
$usersettings['fb_desc_show_meta']= intval(wonderm00n_open_graph_post('fb_desc_show_meta'));
|
32 |
+
$usersettings['fb_desc_show_schema']= intval(wonderm00n_open_graph_post('fb_desc_show_schema'));
|
33 |
+
$usersettings['fb_desc_chars']= intval(wonderm00n_open_graph_post('fb_desc_chars'));
|
34 |
+
$usersettings['fb_desc_homepage']= trim(wonderm00n_open_graph_post('fb_desc_homepage'));
|
35 |
+
$usersettings['fb_desc_homepage_customtext']= trim(wonderm00n_open_graph_post('fb_desc_homepage_customtext'));
|
36 |
+
$usersettings['fb_image_show']= intval(wonderm00n_open_graph_post('fb_image_show'));
|
37 |
+
$usersettings['fb_image_show_schema']= intval(wonderm00n_open_graph_post('fb_image_show_schema'));
|
38 |
+
$usersettings['fb_image']= trim(wonderm00n_open_graph_post('fb_image'));
|
39 |
+
$usersettings['fb_image_rss']= intval(wonderm00n_open_graph_post('fb_image_rss'));
|
40 |
+
$usersettings['fb_image_use_specific']= intval(wonderm00n_open_graph_post('fb_image_use_specific'));
|
41 |
+
$usersettings['fb_image_use_featured']= intval(wonderm00n_open_graph_post('fb_image_use_featured'));
|
42 |
+
$usersettings['fb_image_use_content']= intval(wonderm00n_open_graph_post('fb_image_use_content'));
|
43 |
+
$usersettings['fb_image_use_media']= intval(wonderm00n_open_graph_post('fb_image_use_media'));
|
44 |
+
$usersettings['fb_image_use_default']= intval(wonderm00n_open_graph_post('fb_image_use_default'));
|
45 |
+
$usersettings['fb_show_subheading']= intval(wonderm00n_open_graph_post('fb_show_subheading'));
|
46 |
+
$usersettings['fb_show_businessdirectoryplugin']= intval(wonderm00n_open_graph_post('fb_show_businessdirectoryplugin'));
|
47 |
+
//Update
|
48 |
+
update_option('webdados_fb_open_graph_settings', $usersettings);
|
49 |
+
}
|
50 |
}
|
51 |
|
52 |
+
//Load the settings
|
53 |
+
extract(wonderm00n_open_graph_load_settings());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
?>
|
56 |
<div class="wrap">
|
57 |
|
58 |
+
<?php screen_icon(); ?>
|
59 |
+
<h2>Facebook Open Graph Meta Tags for WordPress (<?php echo $wonderm00n_open_graph_plugin_version; ?>)</h2>
|
60 |
<br class="clear"/>
|
61 |
+
<p><?php _e('Please set some default values and which tags should, or should not, be included. It may be necessary to exclude some tags if other plugins are already including them.', 'wd-fb-og'); ?></p>
|
62 |
|
63 |
<?php
|
64 |
settings_fields('wonderm00n_open_graph');
|
66 |
|
67 |
<div class="postbox-container" style="width: 69%;">
|
68 |
<div id="poststuff">
|
69 |
+
<form name="form1" method="post">
|
70 |
+
<div id="wonderm00n_open_graph-settings" class="postbox">
|
71 |
+
<h3 id="settings"><?php _e('Settings'); ?></h3>
|
72 |
+
<div class="inside">
|
73 |
+
<table width="100%" class="form-table">
|
74 |
+
<tr>
|
75 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include Facebook Platform App ID (fb:app_id) tag?', 'wd-fb-og'); ?></th>
|
76 |
+
<td>
|
77 |
+
<input type="checkbox" name="fb_app_id_show" id="fb_app_id_show" value="1" <?php echo (intval($fb_app_id_show)==1 ? ' checked="checked"' : ''); ?> onclick="showAppidOptions();"/>
|
78 |
+
</td>
|
79 |
+
</tr>
|
80 |
+
<tr class="fb_app_id_options">
|
81 |
+
<th scope="row" nowrap="nowrap"><?php _e('Facebook Platform App ID', 'wd-fb-og'); ?>:</th>
|
82 |
+
<td>
|
83 |
+
<input type="text" name="fb_app_id" id="fb_app_id" size="30" value="<?php echo $fb_app_id; ?>"/>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<td colspan="2"><hr/></td>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include Facebook Admin(s) ID (fb:admins) tag?', 'wd-fb-og'); ?></th>
|
91 |
+
<td>
|
92 |
+
<input type="checkbox" name="fb_admin_id_show" id="fb_admin_id_show" value="1" <?php echo (intval($fb_admin_id_show)==1 ? ' checked="checked"' : ''); ?> onclick="showAdminOptions();"/>
|
93 |
+
</td>
|
94 |
+
</tr>
|
95 |
+
<tr class="fb_admin_id_options">
|
96 |
+
<th scope="row" nowrap="nowrap"><?php _e('Facebook Admin(s) ID', 'wd-fb-og'); ?>:</th>
|
97 |
+
<td>
|
98 |
+
<input type="text" name="fb_admin_id" id="fb_admin_id" size="30" value="<?php echo $fb_admin_id; ?>"/>
|
99 |
+
<br/>
|
100 |
+
<?php _e('Comma separated if more than one', 'wd-fb-og'); ?>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
<tr>
|
104 |
+
<td colspan="2"><hr/></td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include locale (fb:locale) tag?', 'wd-fb-og'); ?></th>
|
108 |
+
<td>
|
109 |
+
<input type="checkbox" name="fb_locale_show" id="fb_locale_show" value="1" <?php echo (intval($fb_locale_show)==1 ? ' checked="checked"' : ''); ?> onclick="showLocaleOptions();"/>
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
<tr class="fb_locale_options">
|
113 |
+
<th scope="row" nowrap="nowrap"><?php _e('Locale', 'wd-fb-og'); ?>:</th>
|
114 |
+
<td>
|
115 |
+
<select name="fb_locale" id="fb_locale">
|
116 |
+
<option value=""<?php if (trim($fb_locale)=='') echo ' selected="selected"'; ?>><?php _e('WordPress current locale/language', 'wd-fb-og'); ?> (<?php echo get_locale(); ?>) </option>
|
117 |
+
<?php
|
118 |
+
$listLocales=false;
|
119 |
+
$loadedOnline=false;
|
120 |
+
$loadedOffline=false;
|
121 |
+
//Online
|
122 |
+
if (!empty($_GET['localeOnline'])) {
|
123 |
+
if (intval($_GET['localeOnline'])==1) {
|
124 |
+
if ($ch = curl_init('http://www.facebook.com/translations/FacebookLocales.xml')) {
|
125 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
126 |
+
$fb_locales=curl_exec($ch);
|
127 |
+
if (curl_errno($ch)) {
|
128 |
+
//echo curl_error($ch);
|
129 |
+
} else {
|
130 |
+
$info = curl_getinfo($ch);
|
131 |
+
if (intval($info['http_code'])==200) {
|
132 |
+
//Save the file locally
|
133 |
+
$fh = fopen(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml', 'w') or die("Can't open file");
|
134 |
+
fwrite($fh, $fb_locales);
|
135 |
+
fclose($fh);
|
136 |
+
$listLocales=true;
|
137 |
+
$loadedOnline=true;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
curl_close($ch);
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
//Offline
|
145 |
+
if (!$listLocales) {
|
146 |
+
if ($fb_locales=file_get_contents(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml')) {
|
147 |
+
$listLocales=true;
|
148 |
+
$loadedOffline=true;
|
149 |
+
}
|
150 |
+
}
|
151 |
+
//OK
|
152 |
+
if ($listLocales) {
|
153 |
+
$xml=simplexml_load_string($fb_locales);
|
154 |
+
$json = json_encode($xml);
|
155 |
+
$locales = json_decode($json,TRUE);
|
156 |
+
if (is_array($locales['locale'])) {
|
157 |
+
foreach ($locales['locale'] as $locale) {
|
158 |
+
?><option value="<?php echo $locale['codes']['code']['standard']['representation']; ?>"<?php if (trim($fb_locale)==trim($locale['codes']['code']['standard']['representation'])) echo ' selected="selected"'; ?>><?php echo $locale['englishName']; ?> (<?php echo $locale['codes']['code']['standard']['representation']; ?>)</option><?php
|
159 |
+
}
|
160 |
+
}
|
161 |
+
}
|
162 |
+
?>
|
163 |
+
</select>
|
164 |
+
<br/>
|
165 |
+
<?php
|
166 |
+
if ($loadedOnline) {
|
167 |
+
_e('List loaded from Facebook (online)', 'wd-fb-og');
|
168 |
+
} else {
|
169 |
+
if ($loadedOffline) {
|
170 |
+
_e('List loaded from local cache (offline)', 'wd-fb-og'); ?> - <a href="?page=wonderm00n-open-graph.php&localeOnline=1" onClick="return(confirm('<?php _e('You\\\'l lose any changes you haven\\\'t saved. Are you sure?', 'wd-fb-og'); ?>'));"><?php _e('Reload from Facebook', 'wd-fb-og'); ?></a><?php
|
171 |
+
} else {
|
172 |
+
_e('List not loaded', 'wd-fb-og');
|
173 |
+
}
|
174 |
+
}
|
175 |
+
?>
|
176 |
+
</td>
|
177 |
+
</tr>
|
178 |
+
<tr>
|
179 |
+
<td colspan="2"><hr/></td>
|
180 |
+
</tr>
|
181 |
+
<tr>
|
182 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include Site Name (og:site_name) tag?', 'wd-fb-og');?></th>
|
183 |
+
<td>
|
184 |
+
<input type="checkbox" name="fb_sitename_show" id="fb_sitename_show" value="1" <?php echo (intval($fb_sitename_show)==1 ? ' checked="checked"' : ''); ?>/>
|
185 |
+
</td>
|
186 |
+
</tr>
|
187 |
+
<tr>
|
188 |
+
<td colspan="2"><hr/></td>
|
189 |
+
</tr>
|
190 |
+
<tr>
|
191 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include Post/Page title (og:title) tag?', 'wd-fb-og');?></th>
|
192 |
+
<td>
|
193 |
+
<input type="checkbox" name="fb_title_show" id="fb_title_show" value="1" <?php echo (intval($fb_title_show)==1 ? ' checked="checked"' : ''); ?> onclick="showTitleOptions();"/>
|
194 |
+
</td>
|
195 |
+
</tr>
|
196 |
+
<tr class="fb_title_options">
|
197 |
+
<th scope="row" nowrap="nowrap"><?php _e('Also include Schema.org "itemprop" Name tag?', 'wd-fb-og');?></th>
|
198 |
+
<td>
|
199 |
+
<input type="checkbox" name="fb_title_show_schema" id="fb_title_show_schema" value="1" <?php echo (intval($fb_title_show_schema)==1 ? ' checked="checked"' : ''); ?>/>
|
200 |
+
<br/>
|
201 |
+
<i><meta itemprop="name" content="..."/></i>
|
202 |
+
<br/>
|
203 |
+
<?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
204 |
+
</td>
|
205 |
+
</tr>
|
206 |
+
<tr>
|
207 |
+
<td colspan="2"><hr/></td>
|
208 |
+
</tr>
|
209 |
+
<tr>
|
210 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include URL (og:url) tag?', 'wd-fb-og');?></th>
|
211 |
+
<td>
|
212 |
+
<input type="checkbox" name="fb_url_show" id="fb_url_show" value="1" <?php echo (intval($fb_url_show)==1 ? ' checked="checked"' : ''); ?> onclick="showUrlOptions();"/>
|
213 |
+
</td>
|
214 |
+
</tr>
|
215 |
+
<tr class="fb_url_options">
|
216 |
+
<th scope="row" nowrap="nowrap"><?php _e('Also set Canonical URL', 'wd-fb-og');?>:</th>
|
217 |
+
<td>
|
218 |
+
<input type="checkbox" name="fb_url_canonical" id="fb_url_canonical" value="1" <?php echo (intval($fb_url_canonical)==1 ? ' checked="checked"' : ''); ?>/>
|
219 |
+
<br/>
|
220 |
+
<i><link rel="canonical" href="..."/></i>
|
221 |
+
</td>
|
222 |
+
</tr>
|
223 |
+
<tr class="fb_url_options">
|
224 |
+
<th scope="row" nowrap="nowrap"><?php _e('Add trailing slash at the end', 'wd-fb-og');?>:</th>
|
225 |
+
<td>
|
226 |
+
<input type="checkbox" name="fb_url_add_trailing" id="fb_url_add_trailing" value="1" <?php echo (intval($fb_url_add_trailing)==1 ? ' checked="checked"' : ''); ?> onclick="showUrlTrail();"/>
|
227 |
+
<br/>
|
228 |
+
<?php _e('On the homepage will be', 'wd-fb-og');?>: <i><?php echo get_option('siteurl'); ?><span id="fb_url_add_trailing_example">/</span></i>
|
229 |
+
</td>
|
230 |
+
</tr>
|
231 |
+
<tr>
|
232 |
+
<td colspan="2"><hr/></td>
|
233 |
+
</tr>
|
234 |
+
<tr>
|
235 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include Type (og:type) tag?', 'wd-fb-og');?></th>
|
236 |
+
<td>
|
237 |
+
<input type="checkbox" name="fb_type_show" id="fb_type_show" value="1" <?php echo (intval($fb_type_show)==1 ? ' checked="checked"' : ''); ?> onclick="showTypeOptions();"/>
|
238 |
+
<br/>
|
239 |
+
<?php printf( __('Will be "%1$s" for posts and pages and "%2$s" or "%3$s"; for the homepage', 'wd-fb-og'), 'article', 'website', 'blog' );?>
|
240 |
+
</td>
|
241 |
+
</tr>
|
242 |
+
<tr class="fb_type_options">
|
243 |
+
<th scope="row" nowrap="nowrap"><?php _e('Homepage type', 'wd-fb-og');?>:</th>
|
244 |
+
<td>
|
245 |
+
<?php _e('Use', 'wd-fb-og');?>
|
246 |
+
<select name="fb_type_homepage" id="fb_type_homepage">
|
247 |
+
<option value="website"<?php if (trim($fb_type_homepage)=='' || trim($fb_type_homepage)=='website') echo ' selected="selected"'; ?>>website </option>
|
248 |
+
<option value="blog"<?php if (trim($fb_type_homepage)=='blog') echo ' selected="selected"'; ?>>blog </option>
|
249 |
+
</select>
|
250 |
+
</td>
|
251 |
+
</tr>
|
252 |
+
<tr>
|
253 |
+
<td colspan="2"><hr/></td>
|
254 |
+
</tr>
|
255 |
+
<tr>
|
256 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include Description (og:description) tag?', 'wd-fb-og');?></th>
|
257 |
+
<td>
|
258 |
+
<input type="checkbox" name="fb_desc_show" id="fb_desc_show" value="1" <?php echo (intval($fb_desc_show)==1 ? ' checked="checked"' : ''); ?> onclick="showDescriptionOptions();"/>
|
259 |
+
</td>
|
260 |
+
</tr>
|
261 |
+
<tr class="fb_description_options">
|
262 |
+
<th scope="row" nowrap="nowrap"><?php _e('Also include Meta Description tag?', 'wd-fb-og');?></th>
|
263 |
+
<td>
|
264 |
+
<input type="checkbox" name="fb_desc_show_meta" id="fb_desc_show_meta" value="1" <?php echo (intval($fb_desc_show_meta)==1 ? ' checked="checked"' : ''); ?>/>
|
265 |
+
<br/>
|
266 |
+
<i><meta name="description" content="..."/></i>
|
267 |
+
<br/>
|
268 |
+
<?php _e('Recommended for SEO purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
269 |
+
</td>
|
270 |
+
</tr>
|
271 |
+
<tr class="fb_description_options">
|
272 |
+
<th scope="row" nowrap="nowrap"><?php _e('Also include Schema.org "itemprop" Description tag?', 'wd-fb-og');?></th>
|
273 |
+
<td>
|
274 |
+
<input type="checkbox" name="fb_desc_show_schema" id="fb_desc_show_schema" value="1" <?php echo (intval($fb_desc_show_schema)==1 ? ' checked="checked"' : ''); ?>/>
|
275 |
+
<br/>
|
276 |
+
<i><meta itemprop="description" content="..."/></i>
|
277 |
+
<br/>
|
278 |
+
<?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
279 |
+
</td>
|
280 |
+
</tr>
|
281 |
+
<tr class="fb_description_options">
|
282 |
+
<th scope="row" nowrap="nowrap"><?php _e('Description maximum length', 'wd-fb-og');?>:</th>
|
283 |
+
<td>
|
284 |
+
<input type="text" name="fb_desc_chars" id="fb_desc_chars" size="3" maxlength="3" value="<?php echo (intval($fb_desc_chars)>0 ? intval($fb_desc_chars) : ''); ?>"/> characters,
|
285 |
+
<br/>
|
286 |
+
<?php _e('0 or blank for no maximum length', 'wd-fb-og');?>
|
287 |
+
</td>
|
288 |
+
</tr>
|
289 |
+
<tr class="fb_description_options">
|
290 |
+
<th scope="row" nowrap="nowrap"><?php _e('Homepage description', 'wd-fb-og');?>:</th>
|
291 |
+
<td>
|
292 |
+
<?php _e('Use', 'wd-fb-og');?>
|
293 |
+
<select name="fb_desc_homepage" id="fb_desc_homepage" onchange="showDescriptionCustomText();">
|
294 |
+
<option value=""<?php if (trim($fb_desc_homepage)=='') echo ' selected="selected"'; ?>><?php _e('Website tagline', 'wd-fb-og');?> </option>
|
295 |
+
<option value="custom"<?php if (trim($fb_desc_homepage)=='custom') echo ' selected="selected"'; ?>><?php _e('Custom text', 'wd-fb-og');?> </option>
|
296 |
+
</select>
|
297 |
+
<div id="fb_desc_homepage_customtext_div">
|
298 |
+
<textarea name="fb_desc_homepage_customtext" id="fb_desc_homepage_customtext" rows="3" cols="50"><?php echo $fb_desc_homepage_customtext; ?></textarea>
|
299 |
+
</div>
|
300 |
+
</td>
|
301 |
+
</tr>
|
302 |
+
<tr>
|
303 |
+
<td colspan="2"><hr/></td>
|
304 |
+
</tr>
|
305 |
+
<tr>
|
306 |
+
<th scope="row" nowrap="nowrap"><?php _e('Include Image (og:image) tag?', 'wd-fb-og');?></th>
|
307 |
+
<td>
|
308 |
+
<input type="checkbox" name="fb_image_show" id="fb_image_show" value="1" <?php echo (intval($fb_image_show)==1 ? ' checked="checked"' : ''); ?> onclick="showImageOptions();"/>
|
309 |
+
<br/>
|
310 |
+
<?php _e('All images MUST have at least 200px on both dimensions in order to Facebook to load them at all. Minimum of 600x315px is recommended.', 'wd-fb-og');?>
|
311 |
+
</td>
|
312 |
+
</tr>
|
313 |
+
<tr class="fb_image_options">
|
314 |
+
<th scope="row" nowrap="nowrap"><?php _e('Also include Schema.org "itemprop" Image tag?', 'wd-fb-og');?></th>
|
315 |
+
<td>
|
316 |
+
<input type="checkbox" name="fb_image_show_schema" id="fb_image_show_schema" value="1" <?php echo (intval($fb_image_show_schema)==1 ? ' checked="checked"' : ''); ?>/>
|
317 |
+
<br/>
|
318 |
+
<i><meta itemprop="image" content="..."/></i>
|
319 |
+
<br/>
|
320 |
+
<?php _e('Recommended for Google+ sharing purposes if no other plugin is setting it already', 'wd-fb-og');?>
|
321 |
+
</td>
|
322 |
+
</tr>
|
323 |
+
<tr class="fb_image_options">
|
324 |
+
<th scope="row" nowrap="nowrap"><?php _e('Default image', 'wd-fb-og');?>:</th>
|
325 |
+
<td>
|
326 |
+
<input type="text" name="fb_image" id="fb_image" size="50" value="<?php echo $fb_image; ?>"/>
|
327 |
+
<input id="fb_image_button" class="button" type="button" value="Upload/Choose image" />
|
328 |
+
<br/>
|
329 |
+
<?php _e('Full URL with http://', 'wd-fb-og');?>
|
330 |
+
<br/>
|
331 |
+
<?php _e('Recommended size: 1200x630px', 'wd-fb-og'); ?>
|
332 |
+
</td>
|
333 |
+
</tr>
|
334 |
+
<tr class="fb_image_options">
|
335 |
+
<th scope="row" nowrap="nowrap"><?php _e('Also add image to RSS/RSS2 feeds?', 'wd-fb-og');?></th>
|
336 |
+
<td>
|
337 |
+
<input type="checkbox" name="fb_image_rss" id="fb_image_rss" value="1" <?php echo (intval($fb_image_rss)==1 ? ' checked="checked"' : ''); ?> onclick="showImageOptions();"/>
|
338 |
+
<br/>
|
339 |
+
<?php _e('For auto-posting apps like RSS Graffiti, twitterfeed, ...', 'wd-fb-og');?>
|
340 |
+
</td>
|
341 |
+
</tr>
|
342 |
+
<tr class="fb_image_options">
|
343 |
+
<th scope="row" nowrap="nowrap"><?php _e('On posts/pages', 'wd-fb-og');?>:</th>
|
344 |
+
<td>
|
345 |
+
<div>
|
346 |
+
1) <input type="checkbox" name="fb_image_use_specific" id="fb_image_use_specific" value="1" <?php echo (intval($fb_image_use_specific)==1 ? ' checked="checked"' : ''); ?>/>
|
347 |
+
<?php _e('Image will be fetched from the specific "Open Graph Image" custom field on the post', 'wd-fb-og');?>
|
348 |
+
</div>
|
349 |
+
<div>
|
350 |
+
2) <input type="checkbox" name="fb_image_use_featured" id="fb_image_use_featured" value="1" <?php echo (intval($fb_image_use_featured)==1 ? ' checked="checked"' : ''); ?>/>
|
351 |
+
<?php _e('If it\'s not set, image will be fetched from post/page featured/thumbnail picture', 'wd-fb-og');?>
|
352 |
+
</div>
|
353 |
+
<div>
|
354 |
+
3) <input type="checkbox" name="fb_image_use_content" id="fb_image_use_content" value="1" <?php echo (intval($fb_image_use_content)==1 ? ' checked="checked"' : ''); ?>/>
|
355 |
+
<?php _e('If it doesn\'t exist, use the first image from the post/page content', 'wd-fb-og');?>
|
356 |
+
</div>
|
357 |
+
<div>
|
358 |
+
4) <input type="checkbox" name="fb_image_use_media" id="fb_image_use_media" value="1" <?php echo (intval($fb_image_use_media)==1 ? ' checked="checked"' : ''); ?>/>
|
359 |
+
<?php _e('If it doesn\'t exist, use first image from the post/page media gallery', 'wd-fb-og');?>
|
360 |
+
</div>
|
361 |
+
<div>
|
362 |
+
5) <input type="checkbox" name="fb_image_use_default" id="fb_image_use_default" value="1" <?php echo (intval($fb_image_use_default)==1 ? ' checked="checked"' : ''); ?>/>
|
363 |
+
<?php _e('If it doesn\'t exist, use the default image above', 'wd-fb-og');?>
|
364 |
+
</div>
|
365 |
+
</td>
|
366 |
+
</tr>
|
367 |
+
</table>
|
368 |
+
</div>
|
369 |
+
</div>
|
370 |
+
<div id="wonderm00n_open_graph-thirdparty" class="postbox">
|
371 |
+
<h3 id="thirdparty"><?php _e('3rd Party Integration', 'wd-fb-og');?></h3>
|
372 |
+
<div class="inside">
|
373 |
+
<?php
|
374 |
+
$thirdparty=false;
|
375 |
+
if(is_plugin_active('subheading/index.php')) {
|
376 |
+
$thirdparty=true;
|
377 |
+
?>
|
378 |
+
<h4><a href="http://wordpress.org/extend/plugins/subheading/" target="_blank">SubHeading</a></h4>
|
379 |
+
<table width="100%" class="form-table">
|
380 |
+
<tr>
|
381 |
+
<th scope="row" nowrap="nowrap"><?php _e('Add SubHeading to Post/Page title?', 'wd-fb-og');?></th>
|
382 |
+
<td>
|
383 |
+
<input type="checkbox" name="fb_show_subheading" id="fb_show_subheading" value="1" <?php echo (intval($fb_show_subheading)==1 ? ' checked="checked"' : ''); ?>/>
|
384 |
+
</td>
|
385 |
+
</tr>
|
386 |
+
</table>
|
387 |
+
<?php
|
388 |
+
}
|
389 |
+
if(is_plugin_active('business-directory-plugin/wpbusdirman.php')) {
|
390 |
+
$thirdparty=true;
|
391 |
+
?>
|
392 |
+
<h4><a href="http://wordpress.org/extend/plugins/business-directory-plugin/" target="_blank">Business Directory Plugin</a></h4>
|
393 |
+
<table width="100%" class="form-table">
|
394 |
+
<tr>
|
395 |
+
<th scope="row" nowrap="nowrap"><?php _e('Use BDP listing contents as OG tags?', 'wd-fb-og');?></th>
|
396 |
+
<td>
|
397 |
+
<input type="checkbox" name="fb_show_businessdirectoryplugin" id="fb_show_businessdirectoryplugin" value="1" <?php echo (intval($fb_show_businessdirectoryplugin)==1 ? ' checked="checked"' : ''); ?>/>
|
398 |
+
<br/>
|
399 |
+
<?php _e('Setting "Include URL", "Also set Canonical URL", "Include Description" and "Include Image" options above is HIGHLY recommended', 'wd-fb-og');?>
|
400 |
+
</td>
|
401 |
+
</tr>
|
402 |
+
</table>
|
403 |
+
<?php
|
404 |
+
}
|
405 |
+
if (!$thirdparty) {
|
406 |
+
?>
|
407 |
+
<p><?php _e('You don\'t have any compatible 3rd Party plugin installed/active.', 'wd-fb-og');?></p>
|
408 |
+
<p><?php _e('This plugin is currently compatible with:', 'wd-fb-og');?></p>
|
409 |
+
<ul>
|
410 |
+
<li><a href="http://wordpress.org/extend/plugins/subheading/" target="_blank">SubHeading</a></li>
|
411 |
+
<li><a href="http://wordpress.org/extend/plugins/business-directory-plugin/" target="_blank">Business Directory Plugin</a></li>
|
412 |
+
</ul>
|
413 |
+
<?php
|
414 |
+
}
|
415 |
+
?>
|
416 |
+
</div>
|
417 |
+
</div>
|
418 |
+
<p class="submit">
|
419 |
+
<input type="hidden" name="action" value="save"/>
|
420 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
421 |
+
</p>
|
422 |
+
</form>
|
423 |
</div>
|
424 |
</div>
|
425 |
|
426 |
<?php
|
427 |
+
$links[0]['text']=__('Test your URLs at Facebook URL Linter / Debugger', 'wd-fb-og');
|
428 |
$links[0]['url']='https://developers.facebook.com/tools/debug';
|
429 |
+
|
430 |
+
$links[10]['text']=__('About the Open Graph Protocol (on Facebook)', 'wd-fb-og');
|
431 |
$links[10]['url']='https://developers.facebook.com/docs/opengraph/';
|
432 |
+
|
433 |
+
$links[20]['text']=__('The Open Graph Protocol (official website)', 'wd-fb-og');
|
434 |
$links[20]['url']='http://ogp.me/';
|
435 |
+
|
436 |
+
$links[30]['text']=__('Plugin official URL', 'wd-fb-og');
|
437 |
+
$links[30]['url']='http://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/';
|
438 |
+
|
439 |
+
$links[40]['text']=__('Author\'s website: Webdados', 'wd-fb-og');
|
440 |
+
$links[40]['url']='http://www.webdados.pt';
|
441 |
+
|
442 |
+
$links[50]['text']=__('Author\'s Facebook page: Webdados', 'wd-fb-og');
|
443 |
+
$links[50]['url']='http://www.facebook.com/Webdados';
|
444 |
+
|
445 |
+
$links[60]['text']=__('Author\'s Twitter account: @Wonderm00n<br/>(Webdados founder)', 'wd-fb-og');
|
446 |
+
$links[60]['url']='http://twitter.com/wonderm00n';
|
447 |
?>
|
448 |
+
<div class="postbox-container" style="width: 29%; float: right;">
|
449 |
|
450 |
<div id="poststuff">
|
451 |
<div id="wonderm00n_open_graph_links" class="postbox">
|
452 |
+
<h3 id="settings"><?php _e('Rate this plugin', 'wd-fb-og');?></h3>
|
453 |
+
<div class="inside">
|
454 |
+
<?php _e('If you like this plugin,', 'wd-fb-og');?> <a href="http://wordpress.org/extend/plugins/wonderm00ns-simple-facebook-open-graph-tags/" target="_blank"><?php _e('please give it a high Rating', 'wd-fb-og');?></a>.
|
455 |
+
</div>
|
456 |
+
</div>
|
457 |
+
</div>
|
458 |
+
|
459 |
+
<div id="poststuff">
|
460 |
+
<div id="wonderm00n_open_graph_links" class="postbox">
|
461 |
+
<h3 id="settings"><?php _e('Useful links', 'wd-fb-og');?></h3>
|
462 |
<div class="inside">
|
463 |
<ul>
|
464 |
<?php foreach($links as $link) { ?>
|
471 |
|
472 |
<div id="poststuff">
|
473 |
<div id="wonderm00n_open_graph_donation" class="postbox">
|
474 |
+
<h3 id="settings"><?php _e('Donate', 'wd-fb-og');?></h3>
|
475 |
<div class="inside">
|
476 |
+
<p><?php _e('If you find this plugin useful and want to make a contribution towards future development please consider making a small, or big ;-), donation.', 'wd-fb-og');?></p>
|
477 |
<center><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
478 |
<input type="hidden" name="cmd" value="_donations">
|
479 |
<input type="hidden" name="business" value="wonderm00n@gmail.com">
|
492 |
</div>
|
493 |
|
494 |
<div class="clear">
|
495 |
+
<p><br/>© 2011<?php if(date('Y')>2011) echo '-'.date('Y'); ?> <a href="http://www.webdados.pt" target="_blank">Webdados</a> & <a href="http://wonderm00n.com" target="_blank">Marco Almeida (Wonderm00n)</a></p>
|
496 |
</div>
|
497 |
|
498 |
</div>
|
503 |
tb_show('',"media-upload.php?type=image&TB_iframe=true");
|
504 |
});
|
505 |
window.send_to_editor = function(html) {
|
506 |
+
imgurl = jQuery('img',html).attr('src');
|
507 |
+
jQuery("input"+"#fb_image").val(imgurl);
|
508 |
+
tb_remove();
|
509 |
+
}
|
510 |
+
showAppidOptions();
|
511 |
+
showAdminOptions();
|
512 |
+
showLocaleOptions();
|
513 |
+
showTypeOptions();
|
514 |
+
showUrlOptions();
|
515 |
+
showUrlTrail();
|
516 |
+
jQuery('.fb_description_options').hide();
|
517 |
+
showDescriptionOptions();
|
518 |
+
showTitleOptions();
|
519 |
+
jQuery('#fb_desc_homepage_customtext').hide();
|
520 |
+
showDescriptionCustomText();
|
521 |
+
showImageOptions();
|
522 |
});
|
523 |
+
function showAppidOptions() {
|
524 |
+
if (jQuery('#fb_app_id_show').is(':checked')) {
|
525 |
+
jQuery('.fb_app_id_options').show();
|
526 |
+
} else {
|
527 |
+
jQuery('.fb_app_id_options').hide();
|
528 |
+
}
|
529 |
+
}
|
530 |
+
function showAdminOptions() {
|
531 |
+
if (jQuery('#fb_admin_id_show').is(':checked')) {
|
532 |
+
jQuery('.fb_admin_id_options').show();
|
533 |
+
} else {
|
534 |
+
jQuery('.fb_admin_id_options').hide();
|
535 |
+
}
|
536 |
+
}
|
537 |
+
function showLocaleOptions() {
|
538 |
+
if (jQuery('#fb_locale_show').is(':checked')) {
|
539 |
+
jQuery('.fb_locale_options').show();
|
540 |
+
} else {
|
541 |
+
jQuery('.fb_locale_options').hide();
|
542 |
+
}
|
543 |
+
}
|
544 |
+
function showUrlOptions() {
|
545 |
+
if (jQuery('#fb_url_show').is(':checked')) {
|
546 |
+
jQuery('.fb_url_options').show();
|
547 |
+
} else {
|
548 |
+
jQuery('.fb_url_options').hide();
|
549 |
+
}
|
550 |
+
}
|
551 |
+
function showUrlTrail() {
|
552 |
+
if (jQuery('#fb_url_add_trailing').is(':checked')) {
|
553 |
+
jQuery('#fb_url_add_trailing_example').show();
|
554 |
+
} else {
|
555 |
+
jQuery('#fb_url_add_trailing_example').hide();
|
556 |
+
}
|
557 |
+
}
|
558 |
+
function showTypeOptions() {
|
559 |
+
if (jQuery('#fb_type_show').is(':checked')) {
|
560 |
+
jQuery('.fb_type_options').show();
|
561 |
+
} else {
|
562 |
+
jQuery('.fb_type_options').hide();
|
563 |
+
}
|
564 |
+
}
|
565 |
+
function showDescriptionOptions() {
|
566 |
+
if (jQuery('#fb_desc_show').is(':checked')) {
|
567 |
+
jQuery('.fb_description_options').show();
|
568 |
+
} else {
|
569 |
+
jQuery('.fb_description_options').hide();
|
570 |
+
}
|
571 |
+
}
|
572 |
+
function showTitleOptions() {
|
573 |
+
if (jQuery('#fb_title_show').is(':checked')) {
|
574 |
+
jQuery('.fb_title_options').show();
|
575 |
+
} else {
|
576 |
+
jQuery('.fb_title_options').hide();
|
577 |
+
}
|
578 |
+
}
|
579 |
+
function showDescriptionCustomText() {
|
580 |
+
if (jQuery('#fb_desc_homepage').val()=='custom') {
|
581 |
+
jQuery('#fb_desc_homepage_customtext').show().focus();
|
582 |
+
} else {
|
583 |
+
jQuery('#fb_desc_homepage_customtext').hide();
|
584 |
+
}
|
585 |
+
}
|
586 |
+
function showImageOptions() {
|
587 |
+
if (jQuery('#fb_image_show').is(':checked')) {
|
588 |
+
jQuery('.fb_image_options').show();
|
589 |
+
} else {
|
590 |
+
jQuery('.fb_image_options').hide();
|
591 |
+
}
|
592 |
+
}
|
593 |
</script>
|
594 |
<style type="text/css">
|
595 |
TABLE.form-table TR TH {
|
596 |
font-weight: bold;
|
597 |
}
|
598 |
+
TABLE.form-table TR TD HR {
|
599 |
+
height: 1px;
|
600 |
+
margin: 0px;
|
601 |
+
background-color: #DFDFDF;
|
602 |
+
border: none;
|
603 |
+
}
|
604 |
</style>
|
lang/wd-fb-og-pt_PT.mo
ADDED
Binary file
|
lang/wd-fb-og-pt_PT.po
ADDED
@@ -0,0 +1,420 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v1.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-11-18 10:33-0000\n"
|
7 |
+
"Last-Translator: Wonderm00n <wonderm00n@gmail.com>\n"
|
8 |
+
"Language-Team: Webdados <info@webdados.pt>\n"
|
9 |
+
"Language: pt_PT\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Generator: Poedit 1.5.7\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
18 |
+
"X-Poedit-Basepath: ../\n"
|
19 |
+
"X-Textdomain-Support: yes\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ wd-fb-og
|
23 |
+
#: includes/settings-page.php:61
|
24 |
+
msgid ""
|
25 |
+
"Please set some default values and which tags should, or should not, be "
|
26 |
+
"included. It may be necessary to exclude some tags if other plugins are "
|
27 |
+
"already including them."
|
28 |
+
msgstr ""
|
29 |
+
"Por favor defina alguns valores padrão e que tags devem, ou não, ser "
|
30 |
+
"incluídas. Pode ser necessário excluir algumas tags se outros plugins já as "
|
31 |
+
"estão a incluir."
|
32 |
+
|
33 |
+
# @ wd-fb-og
|
34 |
+
#: includes/settings-page.php:75
|
35 |
+
msgid "Include Facebook Platform App ID (fb:app_id) tag?"
|
36 |
+
msgstr "Incluir tag \"Facebook Platform App ID\" (fb:app_id)?"
|
37 |
+
|
38 |
+
# @ wd-fb-og
|
39 |
+
#: includes/settings-page.php:81
|
40 |
+
msgid "Facebook Platform App ID"
|
41 |
+
msgstr "Facebook Platform App ID"
|
42 |
+
|
43 |
+
# @ wd-fb-og
|
44 |
+
#: includes/settings-page.php:90
|
45 |
+
msgid "Include Facebook Admin(s) ID (fb:admins) tag?"
|
46 |
+
msgstr "Inluir tag com ID dos admin de Facebook (fb:admins)?"
|
47 |
+
|
48 |
+
# @ wd-fb-og
|
49 |
+
#: includes/settings-page.php:96
|
50 |
+
msgid "Facebook Admin(s) ID"
|
51 |
+
msgstr "ID do(s) Admin(s) no Facebook"
|
52 |
+
|
53 |
+
# @ wd-fb-og
|
54 |
+
#: includes/settings-page.php:100
|
55 |
+
msgid "Comma separated if more than one"
|
56 |
+
msgstr "Separados por vírgulas se mais do que um"
|
57 |
+
|
58 |
+
# @ wd-fb-og
|
59 |
+
#: includes/settings-page.php:107
|
60 |
+
msgid "Include locale (fb:locale) tag?"
|
61 |
+
msgstr "Incluir tag \"Locale\" (fb:locale)?"
|
62 |
+
|
63 |
+
# @ wd-fb-og
|
64 |
+
#: includes/settings-page.php:113
|
65 |
+
msgid "Locale"
|
66 |
+
msgstr "Locale"
|
67 |
+
|
68 |
+
# @ wd-fb-og
|
69 |
+
#: includes/settings-page.php:116
|
70 |
+
msgid "WordPress current locale/language"
|
71 |
+
msgstr "O \"locale\"/idíoma actual do WordPress"
|
72 |
+
|
73 |
+
# @ wd-fb-og
|
74 |
+
#: includes/settings-page.php:167
|
75 |
+
msgid "List loaded from Facebook (online)"
|
76 |
+
msgstr "Lista carregada do Facebook (online)"
|
77 |
+
|
78 |
+
# @ wd-fb-og
|
79 |
+
#: includes/settings-page.php:170
|
80 |
+
msgid "List loaded from local cache (offline)"
|
81 |
+
msgstr "Lista carregada da cache local (offline)"
|
82 |
+
|
83 |
+
# @ wd-fb-og
|
84 |
+
#: includes/settings-page.php:170
|
85 |
+
msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
|
86 |
+
msgstr ""
|
87 |
+
"Vai perder quaisquer modificações que não tenha gravado. Tem a certeza?"
|
88 |
+
|
89 |
+
# @ wd-fb-og
|
90 |
+
#: includes/settings-page.php:170
|
91 |
+
msgid "Reload from Facebook"
|
92 |
+
msgstr "(Re)carregar a partir do Facebook"
|
93 |
+
|
94 |
+
# @ wd-fb-og
|
95 |
+
#: includes/settings-page.php:172
|
96 |
+
msgid "List not loaded"
|
97 |
+
msgstr "Lista não carregada"
|
98 |
+
|
99 |
+
# @ wd-fb-og
|
100 |
+
#: includes/settings-page.php:182
|
101 |
+
msgid "Include Site Name (og:site_name) tag?"
|
102 |
+
msgstr "Incluir tag Nome do site (og:site_name)?"
|
103 |
+
|
104 |
+
# @ wd-fb-og
|
105 |
+
#: includes/settings-page.php:191
|
106 |
+
msgid "Include Post/Page title (og:title) tag?"
|
107 |
+
msgstr "Incluir tag Título do artigo/página (og:title)?"
|
108 |
+
|
109 |
+
# @ wd-fb-og
|
110 |
+
#: includes/settings-page.php:197
|
111 |
+
msgid "Also include Schema.org \"itemprop\" Name tag?"
|
112 |
+
msgstr "Incluir também a tag \"itemprop Name\" do Schema.org?"
|
113 |
+
|
114 |
+
# @ wd-fb-og
|
115 |
+
#: includes/settings-page.php:203 includes/settings-page.php:278
|
116 |
+
#: includes/settings-page.php:320
|
117 |
+
msgid ""
|
118 |
+
"Recommended for Google+ sharing purposes if no other plugin is setting it "
|
119 |
+
"already"
|
120 |
+
msgstr ""
|
121 |
+
"Recomendado para efeitos de partilha no Google+, se outro plugin ainda não a "
|
122 |
+
"está a definir"
|
123 |
+
|
124 |
+
# @ wd-fb-og
|
125 |
+
#: includes/settings-page.php:210
|
126 |
+
msgid "Include URL (og:url) tag?"
|
127 |
+
msgstr "Incluir tag URL (og:url)?"
|
128 |
+
|
129 |
+
# @ wd-fb-og
|
130 |
+
#: includes/settings-page.php:216
|
131 |
+
msgid "Also set Canonical URL"
|
132 |
+
msgstr "Incluir também a tag URL Canónico"
|
133 |
+
|
134 |
+
# @ wd-fb-og
|
135 |
+
#: includes/settings-page.php:224
|
136 |
+
msgid "Add trailing slash at the end"
|
137 |
+
msgstr "Adicionar barra invertida no final"
|
138 |
+
|
139 |
+
# @ wd-fb-og
|
140 |
+
#: includes/settings-page.php:228
|
141 |
+
msgid "On the homepage will be"
|
142 |
+
msgstr "Na página inicial será"
|
143 |
+
|
144 |
+
# @ wd-fb-og
|
145 |
+
#: includes/settings-page.php:235
|
146 |
+
msgid "Include Type (og:type) tag?"
|
147 |
+
msgstr "Incluir tag Tipo (og:type)?"
|
148 |
+
|
149 |
+
# @ wd-fb-og
|
150 |
+
#: includes/settings-page.php:239
|
151 |
+
#, php-format
|
152 |
+
msgid ""
|
153 |
+
"Will be \"%1$s\" for posts and pages and \"%2$s\" or \"%3$s\"; for the "
|
154 |
+
"homepage"
|
155 |
+
msgstr ""
|
156 |
+
"Será \"%1$s\" para artigos e páginas, e \"%2$s\" ou \"%3$s\"; para a página "
|
157 |
+
"inicial"
|
158 |
+
|
159 |
+
# @ wd-fb-og
|
160 |
+
#: includes/settings-page.php:243
|
161 |
+
msgid "Homepage type"
|
162 |
+
msgstr "Tipo para a página inicial"
|
163 |
+
|
164 |
+
# @ wd-fb-og
|
165 |
+
#: includes/settings-page.php:245 includes/settings-page.php:292
|
166 |
+
msgid "Use"
|
167 |
+
msgstr "Utilizar"
|
168 |
+
|
169 |
+
# @ wd-fb-og
|
170 |
+
#: includes/settings-page.php:256
|
171 |
+
msgid "Include Description (og:description) tag?"
|
172 |
+
msgstr "Incluir tag Descrição (og:description)?"
|
173 |
+
|
174 |
+
# @ wd-fb-og
|
175 |
+
#: includes/settings-page.php:262
|
176 |
+
msgid "Also include Meta Description tag?"
|
177 |
+
msgstr "Incluir também a tag \"Meta Description\"?"
|
178 |
+
|
179 |
+
# @ wd-fb-og
|
180 |
+
#: includes/settings-page.php:268
|
181 |
+
msgid "Recommended for SEO purposes if no other plugin is setting it already"
|
182 |
+
msgstr ""
|
183 |
+
"Recomendado para efeitos de Optimização para Motores de Busca, se outro "
|
184 |
+
"plugin ainda não a está a definir"
|
185 |
+
|
186 |
+
# @ wd-fb-og
|
187 |
+
#: includes/settings-page.php:272
|
188 |
+
msgid "Also include Schema.org \"itemprop\" Description tag?"
|
189 |
+
msgstr "Incluir também a tag \"itemprop Description\" do Schema.org?"
|
190 |
+
|
191 |
+
# @ wd-fb-og
|
192 |
+
#: includes/settings-page.php:282
|
193 |
+
msgid "Description maximum length"
|
194 |
+
msgstr "Comprimento máximo da descrição"
|
195 |
+
|
196 |
+
# @ wd-fb-og
|
197 |
+
#: includes/settings-page.php:286
|
198 |
+
msgid "0 or blank for no maximum length"
|
199 |
+
msgstr "0 ou em branco para não definir máximo"
|
200 |
+
|
201 |
+
# @ wd-fb-og
|
202 |
+
#: includes/settings-page.php:290
|
203 |
+
msgid "Homepage description"
|
204 |
+
msgstr "Descrição da página inicial"
|
205 |
+
|
206 |
+
# @ wd-fb-og
|
207 |
+
#: includes/settings-page.php:294
|
208 |
+
msgid "Website tagline"
|
209 |
+
msgstr "Descrição do site"
|
210 |
+
|
211 |
+
# @ wd-fb-og
|
212 |
+
#: includes/settings-page.php:295
|
213 |
+
msgid "Custom text"
|
214 |
+
msgstr "Texto personalizado"
|
215 |
+
|
216 |
+
# @ wd-fb-og
|
217 |
+
#: includes/settings-page.php:306
|
218 |
+
msgid "Include Image (og:image) tag?"
|
219 |
+
msgstr "Incluir tag Imagem (og:image)?"
|
220 |
+
|
221 |
+
# @ wd-fb-og
|
222 |
+
#: includes/settings-page.php:310
|
223 |
+
msgid ""
|
224 |
+
"All images MUST have at least 200px on both dimensions in order to Facebook "
|
225 |
+
"to load them at all. Minimum of 600x315px is recommended."
|
226 |
+
msgstr ""
|
227 |
+
"Todas as imagens TÊM de ter pelo menos 200px em ambas as dimensões para que "
|
228 |
+
"o Facebook as carregue. Um mínimo de 600x315px é recomendado."
|
229 |
+
|
230 |
+
# @ wd-fb-og
|
231 |
+
#: includes/settings-page.php:314
|
232 |
+
msgid "Also include Schema.org \"itemprop\" Image tag?"
|
233 |
+
msgstr "Incluir também a tag \"itemprop Image\" do Schema.org?"
|
234 |
+
|
235 |
+
# @ wd-fb-og
|
236 |
+
#: includes/settings-page.php:324
|
237 |
+
msgid "Default image"
|
238 |
+
msgstr "Imagem por omissão"
|
239 |
+
|
240 |
+
# @ wd-fb-og
|
241 |
+
#: includes/settings-page.php:329
|
242 |
+
msgid "Full URL with http://"
|
243 |
+
msgstr "URL completo com http://"
|
244 |
+
|
245 |
+
# @ wd-fb-og
|
246 |
+
#: includes/settings-page.php:331
|
247 |
+
msgid "Recommended size: 1200x630px"
|
248 |
+
msgstr "Tamanho recomendado: 1200x630px"
|
249 |
+
|
250 |
+
# @ wd-fb-og
|
251 |
+
#: includes/settings-page.php:335
|
252 |
+
msgid "Also add image to RSS/RSS2 feeds?"
|
253 |
+
msgstr "Incluir também a imagem aos feeds RSS/RSS2?"
|
254 |
+
|
255 |
+
# @ wd-fb-og
|
256 |
+
#: includes/settings-page.php:339
|
257 |
+
msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
|
258 |
+
msgstr ""
|
259 |
+
"Para aplicação de posts automáticos como o RSS Graffitti, twitterfeed, etc..."
|
260 |
+
|
261 |
+
# @ wd-fb-og
|
262 |
+
#: includes/settings-page.php:343
|
263 |
+
msgid "On posts/pages"
|
264 |
+
msgstr "Nos artigos/páginas"
|
265 |
+
|
266 |
+
# @ wd-fb-og
|
267 |
+
#: includes/settings-page.php:347
|
268 |
+
msgid ""
|
269 |
+
"Image will be fetched from the specific \"Open Graph Image\" custom field on "
|
270 |
+
"the post"
|
271 |
+
msgstr ""
|
272 |
+
"A imagem utilizada será a definida no campo específico \"Open Graph Image\" "
|
273 |
+
"no artigo"
|
274 |
+
|
275 |
+
# @ wd-fb-og
|
276 |
+
#: includes/settings-page.php:351
|
277 |
+
msgid ""
|
278 |
+
"If it's not set, image will be fetched from post/page featured/thumbnail "
|
279 |
+
"picture"
|
280 |
+
msgstr ""
|
281 |
+
"Se não definida, a imagem utilizada será a imagem de destaque do artigo/"
|
282 |
+
"página"
|
283 |
+
|
284 |
+
# @ wd-fb-og
|
285 |
+
#: includes/settings-page.php:355
|
286 |
+
msgid "If it doesn't exist, use the first image from the post/page content"
|
287 |
+
msgstr ""
|
288 |
+
"Se não existir, será utilizada a primeira imagem no conteúdo do artigo/página"
|
289 |
+
|
290 |
+
# @ wd-fb-og
|
291 |
+
#: includes/settings-page.php:359
|
292 |
+
msgid "If it doesn't exist, use first image from the post/page media gallery"
|
293 |
+
msgstr ""
|
294 |
+
"Se não existir, será usada a primeira imagem na galeria multimédia do artigo/"
|
295 |
+
"página"
|
296 |
+
|
297 |
+
# @ wd-fb-og
|
298 |
+
#: includes/settings-page.php:363
|
299 |
+
msgid "If it doesn't exist, use the default image above"
|
300 |
+
msgstr "Se não existir, utilizar a imagem por omissão em cima"
|
301 |
+
|
302 |
+
# @ wd-fb-og
|
303 |
+
#: includes/settings-page.php:371
|
304 |
+
msgid "3rd Party Integration"
|
305 |
+
msgstr "Integração com outros plugins"
|
306 |
+
|
307 |
+
# @ wd-fb-og
|
308 |
+
#: includes/settings-page.php:381
|
309 |
+
msgid "Add SubHeading to Post/Page title?"
|
310 |
+
msgstr "Adicionar \"SubHeading\" ao título do artigo/página?"
|
311 |
+
|
312 |
+
# @ wd-fb-og
|
313 |
+
#: includes/settings-page.php:395
|
314 |
+
msgid "Use BDP listing contents as OG tags?"
|
315 |
+
msgstr "Utilizar o conteúdo dos anúncios BDP como tags OG?"
|
316 |
+
|
317 |
+
# @ wd-fb-og
|
318 |
+
#: includes/settings-page.php:399
|
319 |
+
msgid ""
|
320 |
+
"Setting \"Include URL\", \"Also set Canonical URL\", \"Include Description\" "
|
321 |
+
"and \"Include Image\" options above is HIGHLY recommended"
|
322 |
+
msgstr ""
|
323 |
+
"Activar as opções \"Incluir tag URL (og:url)\", \"Incluir também a tag URL "
|
324 |
+
"Canónico\", \"Incluir tag Descrição (og:description)\" e \"Incluir tag "
|
325 |
+
"Imagem (og:image)\" é ALTAMENTE recomendado"
|
326 |
+
|
327 |
+
# @ wd-fb-og
|
328 |
+
#: includes/settings-page.php:407
|
329 |
+
msgid "You don't have any compatible 3rd Party plugin installed/active."
|
330 |
+
msgstr "Não tem nenhum plugin compatível instalado/activo."
|
331 |
+
|
332 |
+
# @ wd-fb-og
|
333 |
+
#: includes/settings-page.php:408
|
334 |
+
msgid "This plugin is currently compatible with:"
|
335 |
+
msgstr "Este plugin é actualmente compatível com:"
|
336 |
+
|
337 |
+
# @ wd-fb-og
|
338 |
+
#: includes/settings-page.php:427
|
339 |
+
msgid "Test your URLs at Facebook URL Linter / Debugger"
|
340 |
+
msgstr "Teste os seus URLs no \"Facebook URL Linter / Debugger\""
|
341 |
+
|
342 |
+
# @ wd-fb-og
|
343 |
+
#: includes/settings-page.php:430
|
344 |
+
msgid "About the Open Graph Protocol (on Facebook)"
|
345 |
+
msgstr "Sobre o Protocolo Open Graph (no Facebook)"
|
346 |
+
|
347 |
+
# @ wd-fb-og
|
348 |
+
#: includes/settings-page.php:433
|
349 |
+
msgid "The Open Graph Protocol (official website)"
|
350 |
+
msgstr "O Protocolo Open Graph (website oficial)"
|
351 |
+
|
352 |
+
# @ wd-fb-og
|
353 |
+
#: includes/settings-page.php:436
|
354 |
+
msgid "Plugin official URL"
|
355 |
+
msgstr "URL oficial do plugin"
|
356 |
+
|
357 |
+
# @ wd-fb-og
|
358 |
+
#: includes/settings-page.php:439
|
359 |
+
msgid "Author's website: Webdados"
|
360 |
+
msgstr "Website do autor: Webdados"
|
361 |
+
|
362 |
+
# @ wd-fb-og
|
363 |
+
#: includes/settings-page.php:442
|
364 |
+
msgid "Author's Facebook page: Webdados"
|
365 |
+
msgstr "Página Facebook do autor: Webdados"
|
366 |
+
|
367 |
+
# @ wd-fb-og
|
368 |
+
#: includes/settings-page.php:445
|
369 |
+
msgid "Author's Twitter account: @Wonderm00n<br/>(Webdados founder)"
|
370 |
+
msgstr "Conta Twitter do autor: @Wonderm00n<br/>(fundador da Webdados)"
|
371 |
+
|
372 |
+
# @ wd-fb-og
|
373 |
+
#: includes/settings-page.php:452
|
374 |
+
msgid "Rate this plugin"
|
375 |
+
msgstr "Avalie este plugin"
|
376 |
+
|
377 |
+
# @ wd-fb-og
|
378 |
+
#: includes/settings-page.php:454
|
379 |
+
msgid "If you like this plugin,"
|
380 |
+
msgstr "Se gosta deste plugin,"
|
381 |
+
|
382 |
+
# @ wd-fb-og
|
383 |
+
#: includes/settings-page.php:454
|
384 |
+
msgid "please give it a high Rating"
|
385 |
+
msgstr "dê-lhe uma nota elevada"
|
386 |
+
|
387 |
+
# @ wd-fb-og
|
388 |
+
#: includes/settings-page.php:461
|
389 |
+
msgid "Useful links"
|
390 |
+
msgstr "Links úteis"
|
391 |
+
|
392 |
+
# @ wd-fb-og
|
393 |
+
#: includes/settings-page.php:474
|
394 |
+
msgid "Donate"
|
395 |
+
msgstr "Doar"
|
396 |
+
|
397 |
+
# @ wd-fb-og
|
398 |
+
#: includes/settings-page.php:476
|
399 |
+
msgid ""
|
400 |
+
"If you find this plugin useful and want to make a contribution towards "
|
401 |
+
"future development please consider making a small, or big ;-), donation."
|
402 |
+
msgstr ""
|
403 |
+
"Se pensa que este plugin é útil e quer fazer uma contribuição para o "
|
404 |
+
"desenvolvimento no futuro, considere fazer uma pequena, ou grande ;-), "
|
405 |
+
"doação."
|
406 |
+
|
407 |
+
# @ wd-fb-og
|
408 |
+
#: wonderm00n-open-graph.php:500
|
409 |
+
msgid "Use this image:"
|
410 |
+
msgstr "Utilizar esta imagem:"
|
411 |
+
|
412 |
+
# @ wd-fb-og
|
413 |
+
#: wonderm00n-open-graph.php:503 wonderm00n-open-graph.php:508
|
414 |
+
msgid "Upload/Choose Open Graph Image"
|
415 |
+
msgstr "Carregar/Escolher Imagem Open Graph"
|
416 |
+
|
417 |
+
# @ wd-fb-og
|
418 |
+
#: wonderm00n-open-graph.php:589
|
419 |
+
msgid "Use as Image Open Graph Tag"
|
420 |
+
msgstr "Utilizar como Imagem Open Graph"
|
lang/wd-fb-og.pot
ADDED
@@ -0,0 +1,394 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v1.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2013-11-15 13:25-0000\n"
|
7 |
+
"Last-Translator: Webdados <info@webdados.pt>\n"
|
8 |
+
"Language-Team: Webdados <info@webdados.pt>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Generator: Poedit 1.5.7\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
17 |
+
"X-Poedit-Basepath: ../\n"
|
18 |
+
"X-Textdomain-Support: yes\n"
|
19 |
+
"Language: en_US\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ wd-fb-og
|
23 |
+
#: includes/settings-page.php:61
|
24 |
+
msgid ""
|
25 |
+
"Please set some default values and which tags should, or should not, be "
|
26 |
+
"included. It may be necessary to exclude some tags if other plugins are "
|
27 |
+
"already including them."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
# @ wd-fb-og
|
31 |
+
#: includes/settings-page.php:75
|
32 |
+
msgid "Include Facebook Platform App ID (fb:app_id) tag?"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
# @ wd-fb-og
|
36 |
+
#: includes/settings-page.php:81
|
37 |
+
msgid "Facebook Platform App ID"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
# @ wd-fb-og
|
41 |
+
#: includes/settings-page.php:90
|
42 |
+
msgid "Include Facebook Admin(s) ID (fb:admins) tag?"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
# @ wd-fb-og
|
46 |
+
#: includes/settings-page.php:96
|
47 |
+
msgid "Facebook Admin(s) ID"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
# @ wd-fb-og
|
51 |
+
#: includes/settings-page.php:100
|
52 |
+
msgid "Comma separated if more than one"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
# @ wd-fb-og
|
56 |
+
#: includes/settings-page.php:107
|
57 |
+
msgid "Include locale (fb:locale) tag?"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
# @ wd-fb-og
|
61 |
+
#: includes/settings-page.php:113
|
62 |
+
msgid "Locale"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
# @ wd-fb-og
|
66 |
+
#: includes/settings-page.php:116
|
67 |
+
msgid "WordPress current locale/language"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
# @ wd-fb-og
|
71 |
+
#: includes/settings-page.php:167
|
72 |
+
msgid "List loaded from Facebook (online)"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
# @ wd-fb-og
|
76 |
+
#: includes/settings-page.php:170
|
77 |
+
msgid "List loaded from local cache (offline)"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
# @ wd-fb-og
|
81 |
+
#: includes/settings-page.php:170
|
82 |
+
msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
# @ wd-fb-og
|
86 |
+
#: includes/settings-page.php:170
|
87 |
+
msgid "Reload from Facebook"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
# @ wd-fb-og
|
91 |
+
#: includes/settings-page.php:172
|
92 |
+
msgid "List not loaded"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
# @ wd-fb-og
|
96 |
+
#: includes/settings-page.php:182
|
97 |
+
msgid "Include Site Name (og:site_name) tag?"
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
# @ wd-fb-og
|
101 |
+
#: includes/settings-page.php:191
|
102 |
+
msgid "Include Post/Page title (og:title) tag?"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
# @ wd-fb-og
|
106 |
+
#: includes/settings-page.php:197
|
107 |
+
msgid "Also include Schema.org \"itemprop\" Name tag?"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
# @ wd-fb-og
|
111 |
+
#: includes/settings-page.php:203 includes/settings-page.php:278
|
112 |
+
#: includes/settings-page.php:320
|
113 |
+
msgid ""
|
114 |
+
"Recommended for Google+ sharing purposes if no other plugin is setting it "
|
115 |
+
"already"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
# @ wd-fb-og
|
119 |
+
#: includes/settings-page.php:210
|
120 |
+
msgid "Include URL (og:url) tag?"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
# @ wd-fb-og
|
124 |
+
#: includes/settings-page.php:216
|
125 |
+
msgid "Also set Canonical URL"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
# @ wd-fb-og
|
129 |
+
#: includes/settings-page.php:224
|
130 |
+
msgid "Add trailing slash at the end"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
# @ wd-fb-og
|
134 |
+
#: includes/settings-page.php:228
|
135 |
+
msgid "On the homepage will be"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
# @ wd-fb-og
|
139 |
+
#: includes/settings-page.php:235
|
140 |
+
msgid "Include Type (og:type) tag?"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
# @ wd-fb-og
|
144 |
+
#: includes/settings-page.php:239
|
145 |
+
#, php-format
|
146 |
+
msgid ""
|
147 |
+
"Will be \"%1$s\" for posts and pages and \"%2$s\" or \"%3$s\"; for the "
|
148 |
+
"homepage"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
# @ wd-fb-og
|
152 |
+
#: includes/settings-page.php:243
|
153 |
+
msgid "Homepage type"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
# @ wd-fb-og
|
157 |
+
#: includes/settings-page.php:245 includes/settings-page.php:292
|
158 |
+
msgid "Use"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
# @ wd-fb-og
|
162 |
+
#: includes/settings-page.php:256
|
163 |
+
msgid "Include Description (og:description) tag?"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
# @ wd-fb-og
|
167 |
+
#: includes/settings-page.php:262
|
168 |
+
msgid "Also include Meta Description tag?"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
# @ wd-fb-og
|
172 |
+
#: includes/settings-page.php:268
|
173 |
+
msgid "Recommended for SEO purposes if no other plugin is setting it already"
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
# @ wd-fb-og
|
177 |
+
#: includes/settings-page.php:272
|
178 |
+
msgid "Also include Schema.org \"itemprop\" Description tag?"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
# @ wd-fb-og
|
182 |
+
#: includes/settings-page.php:282
|
183 |
+
msgid "Description maximum length"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
# @ wd-fb-og
|
187 |
+
#: includes/settings-page.php:286
|
188 |
+
msgid "0 or blank for no maximum length"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
# @ wd-fb-og
|
192 |
+
#: includes/settings-page.php:290
|
193 |
+
msgid "Homepage description"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
# @ wd-fb-og
|
197 |
+
#: includes/settings-page.php:294
|
198 |
+
msgid "Website tagline"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
# @ wd-fb-og
|
202 |
+
#: includes/settings-page.php:295
|
203 |
+
msgid "Custom text"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
# @ wd-fb-og
|
207 |
+
#: includes/settings-page.php:306
|
208 |
+
msgid "Include Image (og:image) tag?"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
# @ wd-fb-og
|
212 |
+
#: includes/settings-page.php:310
|
213 |
+
msgid ""
|
214 |
+
"All images MUST have at least 200px on both dimensions in order to Facebook "
|
215 |
+
"to load them at all. Minimum of 600x315px is recommended."
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
# @ wd-fb-og
|
219 |
+
#: includes/settings-page.php:314
|
220 |
+
msgid "Also include Schema.org \"itemprop\" Image tag?"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
# @ wd-fb-og
|
224 |
+
#: includes/settings-page.php:324
|
225 |
+
msgid "Default image"
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
# @ wd-fb-og
|
229 |
+
#: includes/settings-page.php:329
|
230 |
+
msgid "Full URL with http://"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
# @ wd-fb-og
|
234 |
+
#: includes/settings-page.php:331
|
235 |
+
msgid "Recommended size: 1200x630px"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
# @ wd-fb-og
|
239 |
+
#: includes/settings-page.php:335
|
240 |
+
msgid "Also add image to RSS/RSS2 feeds?"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
# @ wd-fb-og
|
244 |
+
#: includes/settings-page.php:339
|
245 |
+
msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
# @ wd-fb-og
|
249 |
+
#: includes/settings-page.php:343
|
250 |
+
msgid "On posts/pages"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
# @ wd-fb-og
|
254 |
+
#: includes/settings-page.php:347
|
255 |
+
msgid ""
|
256 |
+
"Image will be fetched from the specific \"Open Graph Image\" custom field on "
|
257 |
+
"the post"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
# @ wd-fb-og
|
261 |
+
#: includes/settings-page.php:351
|
262 |
+
msgid ""
|
263 |
+
"If it's not set, image will be fetched from post/page featured/thumbnail "
|
264 |
+
"picture"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
# @ wd-fb-og
|
268 |
+
#: includes/settings-page.php:355
|
269 |
+
msgid "If it doesn't exist, use the first image from the post/page content"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
# @ wd-fb-og
|
273 |
+
#: includes/settings-page.php:359
|
274 |
+
msgid "If it doesn't exist, use first image from the post/page media gallery"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
# @ wd-fb-og
|
278 |
+
#: includes/settings-page.php:363
|
279 |
+
msgid "If it doesn't exist, use the default image above"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
# @ wd-fb-og
|
283 |
+
#: includes/settings-page.php:371
|
284 |
+
msgid "3rd Party Integration"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
# @ wd-fb-og
|
288 |
+
#: includes/settings-page.php:381
|
289 |
+
msgid "Add SubHeading to Post/Page title?"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
# @ wd-fb-og
|
293 |
+
#: includes/settings-page.php:395
|
294 |
+
msgid "Use BDP listing contents as OG tags?"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
# @ wd-fb-og
|
298 |
+
#: includes/settings-page.php:399
|
299 |
+
msgid ""
|
300 |
+
"Setting \"Include URL\", \"Also set Canonical URL\", \"Include Description\" "
|
301 |
+
"and \"Include Image\" options above is HIGHLY recommended"
|
302 |
+
msgstr ""
|
303 |
+
|
304 |
+
# @ wd-fb-og
|
305 |
+
#: includes/settings-page.php:407
|
306 |
+
msgid "You don't have any compatible 3rd Party plugin installed/active."
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
# @ wd-fb-og
|
310 |
+
#: includes/settings-page.php:408
|
311 |
+
msgid "This plugin is currently compatible with:"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
# @ wd-fb-og
|
315 |
+
#: includes/settings-page.php:427
|
316 |
+
msgid "Test your URLs at Facebook URL Linter / Debugger"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
# @ wd-fb-og
|
320 |
+
#: includes/settings-page.php:430
|
321 |
+
msgid "About the Open Graph Protocol (on Facebook)"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
# @ wd-fb-og
|
325 |
+
#: includes/settings-page.php:433
|
326 |
+
msgid "The Open Graph Protocol (official website)"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
# @ wd-fb-og
|
330 |
+
#: includes/settings-page.php:436
|
331 |
+
msgid "Plugin official URL"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
# @ wd-fb-og
|
335 |
+
#: includes/settings-page.php:439
|
336 |
+
msgid "Author's website: Webdados"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
# @ wd-fb-og
|
340 |
+
#: includes/settings-page.php:442
|
341 |
+
msgid "Author's Facebook page: Webdados"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
# @ wd-fb-og
|
345 |
+
#: includes/settings-page.php:445
|
346 |
+
msgid "Author's Twitter account: @Wonderm00n<br/>(Webdados founder)"
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
# @ wd-fb-og
|
350 |
+
#: includes/settings-page.php:452
|
351 |
+
msgid "Rate this plugin"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
# @ wd-fb-og
|
355 |
+
#: includes/settings-page.php:454
|
356 |
+
msgid "If you like this plugin,"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
# @ wd-fb-og
|
360 |
+
#: includes/settings-page.php:454
|
361 |
+
msgid "please give it a high Rating"
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
# @ wd-fb-og
|
365 |
+
#: includes/settings-page.php:461
|
366 |
+
msgid "Useful links"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
# @ wd-fb-og
|
370 |
+
#: includes/settings-page.php:474
|
371 |
+
msgid "Donate"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
# @ wd-fb-og
|
375 |
+
#: includes/settings-page.php:476
|
376 |
+
msgid ""
|
377 |
+
"If you find this plugin useful and want to make a contribution towards "
|
378 |
+
"future development please consider making a small, or big ;-), donation."
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
# @ wd-fb-og
|
382 |
+
#: wonderm00n-open-graph.php:500
|
383 |
+
msgid "Use this image:"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
# @ wd-fb-og
|
387 |
+
#: wonderm00n-open-graph.php:503 wonderm00n-open-graph.php:508
|
388 |
+
msgid "Upload/Choose Open Graph Image"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#@ wd-fb-og
|
392 |
+
#: wonderm00n-open-graph.php:589
|
393 |
+
msgid "Use as Image Open Graph Tag"
|
394 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,50 +1,215 @@
|
|
1 |
-
===
|
2 |
-
Contributors: wonderm00n
|
3 |
Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
|
4 |
-
Tags: facebook, open graph, seo, share, social, meta
|
5 |
-
Requires at least: 3
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 0.1
|
8 |
|
9 |
-
This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
|
|
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
|
|
|
|
|
14 |
|
15 |
It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
|
16 |
|
17 |
-
The
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
* **og:app_id** : From settings on the options screen
|
20 |
-
* **og:admins** : From settings on the options screen
|
21 |
-
* **og:site_name** : From blog title
|
22 |
-
* **og:title** : From post/page/archive/tag/... title
|
23 |
-
* **og:url** : From the post/page permalink
|
24 |
-
* **og:type** : "article" for posts and pages and "website" for all the others
|
25 |
-
* **og:description** : From post/page excerpt if it exists, or from post/page content
|
26 |
-
* **og:image** : From post/page featured/thumbnail image, or if it doesn't exists from the first image in the post content, or if it doesn't exists from the first image on the post media gallery, or if it doesn't exists from the default image defined on the options menu
|
27 |
|
28 |
== Installation ==
|
29 |
|
30 |
1. Upload the `wonderm00n-open-graph` to the `/wp-content/plugins/` directory
|
31 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
32 |
-
3. Got to `Options`, `
|
33 |
|
34 |
== Changelog ==
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
= 0.1.3 =
|
37 |
|
38 |
-
* Just fixing some typos
|
39 |
|
40 |
= 0.1.2 =
|
41 |
|
42 |
-
* Fixing a bug for themes that do not support post thumbnail
|
43 |
|
44 |
= 0.1.1 =
|
45 |
|
46 |
-
* Adding Open Graph Namespace to the HTML tag
|
47 |
|
48 |
= 0.1 =
|
49 |
|
50 |
-
* First release
|
1 |
+
=== Facebook Open Graph Meta Tags for WordPress ===
|
2 |
+
Contributors: webdados, wonderm00n
|
3 |
Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
|
4 |
+
Tags: facebook, open graph, open graph protocol, seo, share, social, meta, schema, google+, g+, google, google plus, image, like, meta, search engine optimization
|
5 |
+
Requires at least: 3.5
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.0.1
|
8 |
|
9 |
+
This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective and efficient Facebook sharing results.
|
10 |
+
It also allows you to add the Meta Description tag and Schema.org Name, Description and Image tags for more effective and efficient Google+ sharing results.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective and efficient Facebook sharing results.
|
15 |
+
It also allows you to add the Meta Description tag and Schema.org Name, Description and Image tags for more effective and efficien Google+ sharing results.
|
16 |
+
You can also choose to insert the "enclosure" and "media:content" tags to the RSS feeds, so that apps like RSS Graffiti and twitterfeed post the image to Facebook correctly.
|
17 |
|
18 |
It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
|
19 |
|
20 |
+
The Facebook Open Graph Tags that this plugin inserts are:
|
21 |
+
|
22 |
+
* **fb:app_id** : From settings on the options screen.
|
23 |
+
* **fb:admins** : From settings on the options screen.
|
24 |
+
* **og:locale** : From Wordpress locale or chosen by the user.
|
25 |
+
* **og:site_name** : From blog title.
|
26 |
+
* **og:title** : From post/page/archive/tag/... title.
|
27 |
+
* **og:url** : From the post/page permalink.
|
28 |
+
* **og:type** : "website" or "blog" for the homepage and "article" for all the others.
|
29 |
+
* **og:description** : From post/page excerpt if it exist, or from post/page content. From category/tag description on it's pages, if it exist. From tagline, or custom text, on all the others.
|
30 |
+
* **og:image** : From a specific custom field of the post/page, or if not set from the post/page featured/thumbnail image, or if it doesn't exist from the first image in the post content, or if it doesn't exist from the first image on the post media gallery, or if it doesn't exist from the default image defined on the options menu. The same image chosen here will be used and enclosure/media:content on the RSS feed.
|
31 |
+
|
32 |
+
The Schema.org Tags that this plugin inserts are:
|
33 |
+
|
34 |
+
* **name** : Same as "og:title".
|
35 |
+
* **description** : Same as "og:description".
|
36 |
+
* **image** : Same as "og:image".
|
37 |
+
|
38 |
+
Other Tags:
|
39 |
+
|
40 |
+
* **meta description** : Same as "og:description".
|
41 |
+
* **enclosure** : On RSS feeds, same as "og:image".
|
42 |
+
* **media:content** : On RSS feeds, same as "og:image".
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
== Installation ==
|
46 |
|
47 |
1. Upload the `wonderm00n-open-graph` to the `/wp-content/plugins/` directory
|
48 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
49 |
+
3. Got to `Options`, `Facebook Open Graph Tags` to set it up
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 1.0.1 =
|
54 |
+
|
55 |
+
* Corrected a nasty bug which would break the "Add Media" option. Thanks to @flynsarmy (yet again)
|
56 |
+
* Fix: version field upgrade on the database
|
57 |
+
|
58 |
+
= 1.0 =
|
59 |
+
|
60 |
+
* Plugin name changed from "Wonderm00n's Simple Facebook Open Graph Meta Tags" to "Facebook Open Graph Meta Tags for WordPress"
|
61 |
+
* You can now set a specific Open Graph image per post, if you don't want it to be the same as the post featured image
|
62 |
+
* Settings are now stored on a array instead of multiple variables on the options table (and necessary changes along the code)
|
63 |
+
* Internationalization support added
|
64 |
+
* Portuguese translation added (we welcome other translations if you want to do it)
|
65 |
+
* Added webdados as contributor (Wonderm00n's company)
|
66 |
+
* Fix: Several PHP warnings when WP_DEBUG is turned on. Thanks to @flynsarmy (yet again)
|
67 |
+
* Fix: og:type was not set correctly for the homepage in case it was a static page. Thanks to yakitori
|
68 |
+
* Fix: When the site url was not the same as the wordpress installation folder the wrong url was used in the homepage og:url/canonical tag. Thanks to theonetruebix
|
69 |
+
* Using the requested url as og:urgl/canonical on not known areas of wordpress. Not really a canonical url but better than using the homepage one
|
70 |
+
|
71 |
+
= 0.5.4 =
|
72 |
+
|
73 |
+
* Fix in order to be compatible with "Business Directory Plugin" 3.0
|
74 |
+
|
75 |
+
= 0.5.3 =
|
76 |
+
|
77 |
+
* Minor fix to avoid php notices filling up error logs. Thanks to @flynsarmy (yet again).
|
78 |
+
|
79 |
+
= 0.5.2.1 =
|
80 |
+
|
81 |
+
* Fixed version number.
|
82 |
+
|
83 |
+
= 0.5.2 =
|
84 |
+
|
85 |
+
* Minor fix to avoid php notices filling up error logs. Thanks to @flynsarmy (again).
|
86 |
+
* Fixed FacebookLocales.xml URL.
|
87 |
+
* By default the FacebookLocales.xml is loaded from the local cache (to save on bandwidth) and it's only loaded from Facebook URL by user request.
|
88 |
+
* Deleted some commented debug stuff and translate portuguese comments to english.
|
89 |
+
|
90 |
+
= 0.5.1 =
|
91 |
+
|
92 |
+
* Fixed a typo.
|
93 |
+
* Added the information about the recommended minimum image size.
|
94 |
+
|
95 |
+
= 0.5 =
|
96 |
+
|
97 |
+
* Added meta description and Schema.org name, description and image tags.
|
98 |
+
|
99 |
+
= 0.4.3 =
|
100 |
+
|
101 |
+
* Fixed a bug where the original, Wordpress stock, Canonical URL was not being removed.
|
102 |
+
|
103 |
+
= 0.4.2 =
|
104 |
+
|
105 |
+
* If using the "Business Directory Plugin" integration, the "og:url" tag is now correctly set in the category listing pages.
|
106 |
+
|
107 |
+
= 0.4.1 =
|
108 |
+
|
109 |
+
* Added the ability to set/replace the Canonical URL tag. Very important for SEO in the "Business Directory Plugin" integration.
|
110 |
+
|
111 |
+
= 0.4 =
|
112 |
+
|
113 |
+
* "Business Directory Plugin" plugin integration. It's now possible to populate "og:title", "og:url", "og:description" and "og:image" tags with each listing details. If a featured image is set it will be used. If not, the listing main image is used.
|
114 |
+
|
115 |
+
= 0.3.5 =
|
116 |
+
|
117 |
+
* Minor fixes to avoid php notices filling up error logs. Thanks to @flynsarmy.
|
118 |
+
|
119 |
+
= 0.3.4 =
|
120 |
+
|
121 |
+
* Fixed a bug where all the settings could be lost when saving other plugins options (Shame on me!!).
|
122 |
+
|
123 |
+
= 0.3.3 =
|
124 |
+
|
125 |
+
* Fixed a bug where unset options would become active again. Thanks to @scrumpit.
|
126 |
+
|
127 |
+
= 0.3.2 =
|
128 |
+
|
129 |
+
* Fixed a typo on the settings page.
|
130 |
+
|
131 |
+
= 0.3.1 =
|
132 |
+
|
133 |
+
* When saving the settings the $_POST array was showned for debug/development reasons. This output has been removed.
|
134 |
+
|
135 |
+
= 0.3 =
|
136 |
+
|
137 |
+
* "SubHeading" plugin integration. It's now possible add this field to the "og:title" tag.
|
138 |
+
* Changed the way defaults and user settings are loaded and saved, to "try" to eliminate the problem some users experienced where the user settings would disappear.
|
139 |
+
* Bugfix: "Also add image to RSS/RSS2 feeds?" option was not being correctly loaded.
|
140 |
+
* The plugin version is now showed both as a comment before the open graph tags and on the settings page.
|
141 |
+
|
142 |
+
= 0.2.3 =
|
143 |
+
|
144 |
+
* No changes. Had a problem updating to 0.2.2 on the Wordpress website.
|
145 |
+
|
146 |
+
= 0.2.2 =
|
147 |
+
|
148 |
+
* Bugfix: small change to avoid using the "has_cap" function (deprecated). Thanks to @flynsarmy.
|
149 |
+
|
150 |
+
= 0.2.1 =
|
151 |
+
|
152 |
+
* Bugfix: when the og:image is not hosted on the same domain as the website/blog.
|
153 |
+
|
154 |
+
= 0.2 =
|
155 |
+
|
156 |
+
* If the option is set to true, the same image obtained to the og:image will be added to the RSS feed on the "enclosure" and "media:content" tags so that apps like RSS Graffiti and twitterfeed post them correctly.
|
157 |
+
|
158 |
+
= 0.1.9.5 =
|
159 |
+
|
160 |
+
* It's now possible to choose how the post/page og:image tag is set. It means that if the user doesn't want to use the featured/thumbnail image, or the first image in the post content, or the first image on the media gallery, or even the default image, he can choose not to.
|
161 |
+
|
162 |
+
= 0.1.9 =
|
163 |
+
|
164 |
+
* Added the og:locale tag. This will be the Wordpress locale by default, but can be chosen by the user also.
|
165 |
+
* The og:type tag can now be set as 'website' or 'blog' for the homepage.
|
166 |
+
* A final trailing slash can now be added to the homepage url, if the user wants to. Avoids 'circular reference error' on the Facebook debugger.
|
167 |
+
|
168 |
+
|
169 |
+
= 0.1.8.1 =
|
170 |
+
|
171 |
+
* Fixed the namespace declarations.
|
172 |
+
|
173 |
+
= 0.1.8 =
|
174 |
+
|
175 |
+
* Type 'website' was being used as default for all the urls beside posts. This is wrong. According to Facebook Open Graph specification only the homepage should be 'website' and all the other contents must bu 'article'. This was fixed.
|
176 |
+
* On Category and Tags pages, their descriptions, if not blank, are used for the og:description tag.
|
177 |
+
* If the description comes out empty, the title is used on this tag.
|
178 |
+
|
179 |
+
= 0.1.7 =
|
180 |
+
|
181 |
+
* Changed the plugin priority, so that it shows up as late as possible on the <head> tag, and it won't be override by another plugin's Open Graph implementation, because other plugins usually don't allow to disable the tags. If you want to keep a specific tag from another plugin, you can just disable that tag on this plugin options.
|
182 |
+
|
183 |
+
= 0.1.6 =
|
184 |
+
|
185 |
+
* Settings link now shows up on the plugins list.
|
186 |
+
* Small fix to ensure admin functions only are running when on the admin interface.
|
187 |
+
* Some admin options now only show up when the tag is set to be included.
|
188 |
+
|
189 |
+
|
190 |
+
= 0.1.5 =
|
191 |
+
|
192 |
+
* Fixed the way Categories and Tags pages links were being retrieved that would cause an error on WP 3.0.
|
193 |
+
* Added the option to use a Custom text as homepage og:description instead of the Website Tagline.
|
194 |
+
* Fixed a bug that wouldn't allow to uncheck the og:image tag.
|
195 |
+
|
196 |
+
= 0.1.4 =
|
197 |
+
|
198 |
+
* Shortcodes are now stripped from og:description.
|
199 |
+
* Changed og:app_id and og:admins not to be included by default.
|
200 |
+
|
201 |
= 0.1.3 =
|
202 |
|
203 |
+
* Just fixing some typos.
|
204 |
|
205 |
= 0.1.2 =
|
206 |
|
207 |
+
* Fixing a bug for themes that do not support post thumbnail.
|
208 |
|
209 |
= 0.1.1 =
|
210 |
|
211 |
+
* Adding Open Graph Namespace to the HTML tag.
|
212 |
|
213 |
= 0.1 =
|
214 |
|
215 |
+
* First release.
|
wonderm00n-open-graph.php
CHANGED
@@ -1,102 +1,225 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @package
|
4 |
-
* @version 0.1
|
5 |
*/
|
6 |
/*
|
7 |
-
Plugin Name:
|
8 |
Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
|
9 |
-
Description: This plugin inserts Facebook Open Graph Tags into your
|
10 |
-
|
11 |
-
|
12 |
-
Author URI: http://
|
|
|
|
|
13 |
*/
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
function wonderm00n_open_graph() {
|
|
|
|
|
|
|
|
|
16 |
|
17 |
-
//
|
18 |
-
$
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
$
|
23 |
-
$fb_title_show=get_option('wonderm00n_open_graph_fb_title_show');
|
24 |
-
$fb_url_show=get_option('wonderm00n_open_graph_fb_url_show');
|
25 |
-
$fb_type_show=get_option('wonderm00n_open_graph_fb_type_show');
|
26 |
-
$fb_desc_show=get_option('wonderm00n_open_graph_fb_desc_show');
|
27 |
-
$fb_desc_chars=intval(get_option('wonderm00n_open_graph_fb_desc_chars'));
|
28 |
-
$fb_image_show=get_option('wonderm00n_open_graph_fb_image_show');
|
29 |
-
$fb_image=get_option('wonderm00n_open_graph_fb_image');
|
30 |
|
|
|
|
|
|
|
|
|
31 |
if (is_singular()) {
|
32 |
-
//It's a Post or a Page or an attachment page
|
33 |
global $post;
|
34 |
$fb_title=esc_attr(strip_tags(stripslashes($post->post_title)));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
$fb_url=get_permalink();
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
if (trim($post->post_excerpt)!='') {
|
38 |
-
//If there's an excerpt that's
|
39 |
$fb_desc=trim($post->post_excerpt);
|
40 |
} else {
|
41 |
//If not we grab it from the content
|
42 |
$fb_desc=trim($post->post_content);
|
43 |
}
|
44 |
-
$fb_desc=(intval($fb_desc_chars)>0 ? substr(esc_attr(strip_tags(stripslashes($fb_desc))),0,$fb_desc_chars) : esc_attr(strip_tags(stripslashes($fb_desc))));
|
45 |
-
$
|
46 |
-
|
47 |
-
$thumbok=true;
|
48 |
-
}
|
49 |
-
if ($thumbok) {
|
50 |
-
if ($id_attachment=get_post_thumbnail_id($post->ID)) {
|
51 |
-
//There's a featured/thumbnail image for this post
|
52 |
-
$fb_image=wp_get_attachment_url($id_attachment, false);
|
53 |
-
} else {
|
54 |
-
$thumbok=false;
|
55 |
-
}
|
56 |
}
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
}
|
79 |
}
|
80 |
} else {
|
|
|
81 |
//Other pages - Defaults
|
82 |
$fb_title=esc_attr(strip_tags(stripslashes(get_bloginfo('name'))));
|
83 |
-
|
84 |
-
$
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
if (is_category()) {
|
88 |
$fb_title=esc_attr(strip_tags(stripslashes(single_cat_title('', false))));
|
89 |
-
$term
|
90 |
$fb_url=get_term_link($term, $term->taxonomy);
|
|
|
|
|
91 |
} else {
|
92 |
if (is_tag()) {
|
93 |
$fb_title=esc_attr(strip_tags(stripslashes(single_tag_title('', false))));
|
94 |
-
$term
|
95 |
$fb_url=get_term_link($term, $term->taxonomy);
|
|
|
|
|
96 |
} else {
|
97 |
if (is_tax()) {
|
98 |
$fb_title=esc_attr(strip_tags(stripslashes(single_term_title('', false))));
|
99 |
-
$term
|
100 |
$fb_url=get_term_link($term, $term->taxonomy);
|
101 |
} else {
|
102 |
if (is_search()) {
|
@@ -123,7 +246,12 @@ function wonderm00n_open_graph() {
|
|
123 |
}
|
124 |
}
|
125 |
} else {
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
}
|
129 |
}
|
@@ -131,108 +259,435 @@ function wonderm00n_open_graph() {
|
|
131 |
}
|
132 |
}
|
133 |
}
|
|
|
|
|
134 |
|
135 |
-
$html
|
|
|
136 |
';
|
137 |
if (intval($fb_app_id_show)==1 && trim($fb_app_id)!='') $html.='<meta property="fb:app_id" content="'.trim($fb_app_id).'" />
|
138 |
';
|
139 |
if (intval($fb_admin_id_show)==1 && trim($fb_admin_id)!='') $html.='<meta property="fb:admins" content="'.trim($fb_admin_id).'" />
|
|
|
|
|
140 |
';
|
141 |
if (intval($fb_sitename_show)==1) $html.='<meta property="og:site_name" content="'.get_bloginfo('name').'" />
|
142 |
';
|
143 |
if (intval($fb_title_show)==1) $html.='<meta property="og:title" content="'.trim($fb_title).'" />
|
144 |
';
|
145 |
-
if (intval($
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
';
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
if (intval($fb_type_show)==1) $html.='<meta property="og:type" content="'.trim(esc_attr($fb_type)).'" />
|
148 |
';
|
149 |
if (intval($fb_desc_show)==1) $html.='<meta property="og:description" content="'.trim($fb_desc).'" />
|
|
|
|
|
|
|
|
|
150 |
';
|
151 |
if(intval($fb_image_show)==1 && trim($fb_image)!='') $html.='<meta property="og:image" content="'.trim(esc_attr($fb_image)).'" />
|
152 |
';
|
153 |
-
$html.='
|
|
|
|
|
154 |
';
|
155 |
echo $html;
|
156 |
}
|
157 |
-
add_action('wp_head', 'wonderm00n_open_graph',
|
158 |
|
159 |
function wonderm00n_open_graph_add_opengraph_namespace( $output ) {
|
160 |
if (stristr($output,'xmlns:og')) {
|
161 |
//Already there
|
162 |
-
return $output;
|
163 |
} else {
|
164 |
//Let's add it
|
165 |
-
|
166 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
//We want to be last to add the namespace because some other plugin may already added it ;-)
|
169 |
add_filter('language_attributes', 'wonderm00n_open_graph_add_opengraph_namespace',9999);
|
170 |
|
171 |
-
//
|
172 |
-
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
-
|
176 |
-
|
177 |
-
function wonderm00n_open_graph_add_options() {
|
178 |
-
if(function_exists('add_options_page')){
|
179 |
-
add_options_page('Wonderm00n\'s Open Graph', 'Wonderm00n\'s Open Graph', 9, basename(__FILE__), 'wonderm00n_open_graph_admin');
|
180 |
-
}
|
181 |
}
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
}
|
|
|
|
|
195 |
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
}
|
202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
-
add_filter( 'plugin_action_links', 'wonderm00n_open_graph_settings_link', 9, 2 );
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
-
function
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
}
|
216 |
-
function
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
update_option('wonderm00n_open_graph_fb_title_show', intval($_POST['fb_title_show']));
|
230 |
-
update_option('wonderm00n_open_graph_fb_url_show', intval($_POST['fb_url_show']));
|
231 |
-
update_option('wonderm00n_open_graph_fb_type_show', intval($_POST['fb_type_show']));
|
232 |
-
update_option('wonderm00n_open_graph_fb_desc_show', intval($_POST['fb_desc_show']));
|
233 |
-
update_option('wonderm00n_open_graph_fb_desc_chars', intval($_POST['fb_desc_chars']));
|
234 |
-
update_option('wonderm00n_open_graph_fb_image', trim($_POST['fb_image']));
|
235 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
}
|
237 |
|
238 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @package Facebook Open Graph Meta Tags for WordPress
|
4 |
+
* @version 1.0.1
|
5 |
*/
|
6 |
/*
|
7 |
+
Plugin Name: Facebook Open Graph Meta Tags for WordPress
|
8 |
Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
|
9 |
+
Description: This plugin (formerly known as "Wonderm00n's Simple Facebook Open Graph Meta Tags") inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective and efficient Facebook sharing results. It also allows you to add the Meta Description tag and Schema.org Name, Description and Image tags for more effective and efficient Google+ sharing results. You can also choose to insert the "enclosure" and "media:content" tags to the RSS feeds, so that apps like RSS Graffiti and twitterfeed post the image to Facebook correctly.
|
10 |
+
Version: 1.0.1
|
11 |
+
Author: Webdados
|
12 |
+
Author URI: http://www.webdados.pt
|
13 |
+
Text Domain: wd-fb-og
|
14 |
+
Domain Path: /lang
|
15 |
*/
|
16 |
|
17 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
18 |
+
|
19 |
+
$wonderm00n_open_graph_plugin_version='1.0.1';
|
20 |
+
$wonderm00n_open_graph_plugin_settings=array(
|
21 |
+
'fb_app_id_show',
|
22 |
+
'fb_app_id',
|
23 |
+
'fb_admin_id_show',
|
24 |
+
'fb_admin_id',
|
25 |
+
'fb_locale_show',
|
26 |
+
'fb_locale',
|
27 |
+
'fb_sitename_show',
|
28 |
+
'fb_title_show',
|
29 |
+
'fb_title_show_schema',
|
30 |
+
'fb_url_show',
|
31 |
+
'fb_url_canonical',
|
32 |
+
'fb_url_add_trailing',
|
33 |
+
'fb_type_show',
|
34 |
+
'fb_type_homepage',
|
35 |
+
'fb_desc_show',
|
36 |
+
'fb_desc_show_meta',
|
37 |
+
'fb_desc_show_schema',
|
38 |
+
'fb_desc_chars',
|
39 |
+
'fb_desc_homepage',
|
40 |
+
'fb_desc_homepage_customtext',
|
41 |
+
'fb_image_show',
|
42 |
+
'fb_image_show_schema',
|
43 |
+
'fb_image',
|
44 |
+
'fb_image_rss',
|
45 |
+
'fb_image_use_specific',
|
46 |
+
'fb_image_use_featured',
|
47 |
+
'fb_image_use_content',
|
48 |
+
'fb_image_use_media',
|
49 |
+
'fb_image_use_default',
|
50 |
+
'fb_show_subheading',
|
51 |
+
'fb_show_businessdirectoryplugin'
|
52 |
+
);
|
53 |
+
|
54 |
+
//We have to remove canonical NOW because the plugin runs too late - We're also loading the settings which is cool
|
55 |
+
$webdados_fb_open_graph_settings=wonderm00n_open_graph_load_settings();
|
56 |
+
if (intval($webdados_fb_open_graph_settings['fb_url_show'])==1) {
|
57 |
+
if (intval($webdados_fb_open_graph_settings['fb_url_canonical'])==1) {
|
58 |
+
remove_action('wp_head', 'rel_canonical');
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
//Languages
|
63 |
+
function wonderm00n_open_graph_init() {
|
64 |
+
load_plugin_textdomain('wd-fb-og', false, dirname(plugin_basename(__FILE__)) . '/lang/');
|
65 |
+
}
|
66 |
+
add_action('plugins_loaded', 'wonderm00n_open_graph_init');
|
67 |
+
|
68 |
function wonderm00n_open_graph() {
|
69 |
+
global $wonderm00n_open_graph_plugin_settings, $wonderm00n_open_graph_plugin_version, $webdados_fb_open_graph_settings;
|
70 |
+
|
71 |
+
//Upgrade
|
72 |
+
wonderm00n_open_graph_upgrade();
|
73 |
|
74 |
+
//Get options - OLD (until 0.5.4)
|
75 |
+
/*foreach($wonderm00n_open_graph_plugin_settings as $key) {
|
76 |
+
$$key=get_option('wonderm00n_open_graph_'.$key);
|
77 |
+
}*/
|
78 |
+
//Get options - NEW (after 0.5.4)
|
79 |
+
extract($webdados_fb_open_graph_settings);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
//Also set Title Tag?
|
82 |
+
$fb_set_title_tag=0;
|
83 |
+
|
84 |
+
$fb_type='article';
|
85 |
if (is_singular()) {
|
86 |
+
//It's a Post or a Page or an attachment page - It can also be the homepage if it's set as a page
|
87 |
global $post;
|
88 |
$fb_title=esc_attr(strip_tags(stripslashes($post->post_title)));
|
89 |
+
//All In One SEO - To Do
|
90 |
+
/*if ($fb_show_allinoneseo==1) {
|
91 |
+
@include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
92 |
+
if (is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php')) {
|
93 |
+
//Code still missing here
|
94 |
+
}
|
95 |
+
}*/
|
96 |
+
//Platinum SEO - To Do
|
97 |
+
/*if ($fb_show_platinumseo==1) {
|
98 |
+
@include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
99 |
+
if (is_plugin_active('platinum-seo-pack/platinum_seo_pack.php')) {
|
100 |
+
//Code still missing here
|
101 |
+
}
|
102 |
+
}*/
|
103 |
+
//SubHeading
|
104 |
+
if ($fb_show_subheading==1) {
|
105 |
+
@include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
106 |
+
if (is_plugin_active('subheading/index.php')) {
|
107 |
+
if (function_exists('get_the_subheading')) {
|
108 |
+
$fb_title.=' - '.get_the_subheading();
|
109 |
+
}
|
110 |
+
}
|
111 |
+
}
|
112 |
$fb_url=get_permalink();
|
113 |
+
if (is_front_page()) {
|
114 |
+
/* Fix homepage type when it's a static page */
|
115 |
+
$fb_url=get_option('home').(intval($fb_url_add_trailing)==1 ? '/' : '');
|
116 |
+
$fb_type=trim($fb_type_homepage=='' ? 'website' : $fb_type_homepage);
|
117 |
+
}
|
118 |
if (trim($post->post_excerpt)!='') {
|
119 |
+
//If there's an excerpt that's what we'll use
|
120 |
$fb_desc=trim($post->post_excerpt);
|
121 |
} else {
|
122 |
//If not we grab it from the content
|
123 |
$fb_desc=trim($post->post_content);
|
124 |
}
|
125 |
+
$fb_desc=(intval($fb_desc_chars)>0 ? substr(esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))),0,$fb_desc_chars) : esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))));
|
126 |
+
if (intval($fb_image_show)==1) {
|
127 |
+
$fb_image=wonderm00n_open_graph_post_image($fb_image_use_specific, $fb_image_use_featured, $fb_image_use_content, $fb_image_use_media, $fb_image_use_default, $fb_image);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
+
//Business Directory Plugin
|
130 |
+
if ($fb_show_businessdirectoryplugin==1) {
|
131 |
+
@include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
132 |
+
if (is_plugin_active('business-directory-plugin/wpbusdirman.php')) {
|
133 |
+
global $wpbdp;
|
134 |
+
//$bdpaction = _wpbdp_current_action();
|
135 |
+
$bdpaction=$wpbdp->controller->get_current_action();
|
136 |
+
switch($bdpaction) {
|
137 |
+
case 'showlisting':
|
138 |
+
//Listing
|
139 |
+
$listing_id = get_query_var('listing') ? wpbdp_get_post_by_slug(get_query_var('listing'))->ID : wpbdp_getv($_GET, 'id', get_query_var('id'));
|
140 |
+
$bdppost=get_post($listing_id);
|
141 |
+
$fb_title=esc_attr(strip_tags(stripslashes($bdppost->post_title))).' - '.$fb_title;
|
142 |
+
$fb_set_title_tag=1;
|
143 |
+
$fb_url=get_permalink($listing_id);
|
144 |
+
if (trim($bdppost->post_excerpt)!='') {
|
145 |
+
//If there's an excerpt that's what we'll use
|
146 |
+
$fb_desc=trim($bdppost->post_excerpt);
|
147 |
+
} else {
|
148 |
+
//If not we grab it from the content
|
149 |
+
$fb_desc=trim($bdppost->post_content);
|
150 |
+
}
|
151 |
+
$fb_desc=(intval($fb_desc_chars)>0 ? substr(esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))),0,$fb_desc_chars) : esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))));
|
152 |
+
if (intval($fb_image_show)==1) {
|
153 |
+
$thumbdone=false;
|
154 |
+
if (intval($fb_image_use_featured)==1) {
|
155 |
+
//Featured
|
156 |
+
if ($id_attachment=get_post_thumbnail_id($bdppost->ID)) {
|
157 |
+
//There's a featured/thumbnail image for this listing
|
158 |
+
$fb_image=wp_get_attachment_url($id_attachment, false);
|
159 |
+
$thumbdone=true;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
if (!$thumbdone) {
|
163 |
+
//Main image loaded
|
164 |
+
if ($thumbnail_id = wpbdp_listings_api()->get_thumbnail_id($bdppost->ID)) {
|
165 |
+
$fb_image=wp_get_attachment_url($thumbnail_id, false);
|
166 |
+
}
|
167 |
+
}
|
168 |
+
}
|
169 |
+
break;
|
170 |
+
case 'browsecategory':
|
171 |
+
//Categories
|
172 |
+
$term = get_term_by('slug', get_query_var('category'), wpbdp_categories_taxonomy());
|
173 |
+
$fb_title=esc_attr(strip_tags(stripslashes($term->name))).' - '.$fb_title;
|
174 |
+
$fb_set_title_tag=1;
|
175 |
+
$fb_url=get_term_link($term);
|
176 |
+
if (trim($term->description)!='') {
|
177 |
+
$fb_desc=trim($term->description);
|
178 |
+
}
|
179 |
+
break;
|
180 |
+
case 'main':
|
181 |
+
//Main page
|
182 |
+
//No changes
|
183 |
+
break;
|
184 |
+
default:
|
185 |
+
//No changes
|
186 |
+
break;
|
187 |
}
|
188 |
}
|
189 |
}
|
190 |
} else {
|
191 |
+
global $wp_query;
|
192 |
//Other pages - Defaults
|
193 |
$fb_title=esc_attr(strip_tags(stripslashes(get_bloginfo('name'))));
|
194 |
+
//$fb_url=get_option('home').(intval($fb_url_add_trailing)==1 ? '/' : ''); //2013-11-4 changed from 'siteurl' to 'home'
|
195 |
+
$fb_url=((!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; //Not really canonical but will work for now
|
196 |
+
|
197 |
+
switch(trim($fb_desc_homepage)) {
|
198 |
+
case 'custom':
|
199 |
+
$fb_desc=esc_attr(strip_tags(stripslashes($fb_desc_homepage_customtext)));
|
200 |
+
break;
|
201 |
+
default:
|
202 |
+
$fb_desc=esc_attr(strip_tags(stripslashes(get_bloginfo('description'))));
|
203 |
+
break;
|
204 |
+
}
|
205 |
|
206 |
if (is_category()) {
|
207 |
$fb_title=esc_attr(strip_tags(stripslashes(single_cat_title('', false))));
|
208 |
+
$term=$wp_query->get_queried_object();
|
209 |
$fb_url=get_term_link($term, $term->taxonomy);
|
210 |
+
$cat_desc=trim(esc_attr(strip_tags(stripslashes(category_description()))));
|
211 |
+
if (trim($cat_desc)!='') $fb_desc=$cat_desc;
|
212 |
} else {
|
213 |
if (is_tag()) {
|
214 |
$fb_title=esc_attr(strip_tags(stripslashes(single_tag_title('', false))));
|
215 |
+
$term=$wp_query->get_queried_object();
|
216 |
$fb_url=get_term_link($term, $term->taxonomy);
|
217 |
+
$tag_desc=trim(esc_attr(strip_tags(stripslashes(tag_description()))));
|
218 |
+
if (trim($tag_desc)!='') $fb_desc=$tag_desc;
|
219 |
} else {
|
220 |
if (is_tax()) {
|
221 |
$fb_title=esc_attr(strip_tags(stripslashes(single_term_title('', false))));
|
222 |
+
$term=$wp_query->get_queried_object();
|
223 |
$fb_url=get_term_link($term, $term->taxonomy);
|
224 |
} else {
|
225 |
if (is_search()) {
|
246 |
}
|
247 |
}
|
248 |
} else {
|
249 |
+
if (is_front_page()) {
|
250 |
+
$fb_url=get_option('home').(intval($fb_url_add_trailing)==1 ? '/' : '');
|
251 |
+
$fb_type=trim($fb_type_homepage=='' ? 'website' : $fb_type_homepage);
|
252 |
+
} else {
|
253 |
+
//Others... Defaults already set up there
|
254 |
+
}
|
255 |
}
|
256 |
}
|
257 |
}
|
259 |
}
|
260 |
}
|
261 |
}
|
262 |
+
//If no description let's just add the title
|
263 |
+
if (trim($fb_desc)=='') $fb_desc=$fb_title;
|
264 |
|
265 |
+
$html='
|
266 |
+
<!-- START - Facebook Open Graph Meta Tags for WordPress '.$wonderm00n_open_graph_plugin_version.' -->
|
267 |
';
|
268 |
if (intval($fb_app_id_show)==1 && trim($fb_app_id)!='') $html.='<meta property="fb:app_id" content="'.trim($fb_app_id).'" />
|
269 |
';
|
270 |
if (intval($fb_admin_id_show)==1 && trim($fb_admin_id)!='') $html.='<meta property="fb:admins" content="'.trim($fb_admin_id).'" />
|
271 |
+
';
|
272 |
+
if (intval($fb_locale_show)==1) $html.='<meta property="og:locale" content="'.trim(trim($fb_locale)!='' ? trim($fb_locale) : trim(get_locale())).'" />
|
273 |
';
|
274 |
if (intval($fb_sitename_show)==1) $html.='<meta property="og:site_name" content="'.get_bloginfo('name').'" />
|
275 |
';
|
276 |
if (intval($fb_title_show)==1) $html.='<meta property="og:title" content="'.trim($fb_title).'" />
|
277 |
';
|
278 |
+
if (intval($fb_set_title_tag)==1) {
|
279 |
+
//Does nothing so far. We try to create the <title> tag but it's too late now
|
280 |
+
}
|
281 |
+
if (intval($fb_title_show_schema)==1) $html.='<meta itemprop="name" content="'.trim($fb_title).'" />
|
282 |
+
';
|
283 |
+
if (intval($fb_url_show)==1) {
|
284 |
+
$html.='<meta property="og:url" content="'.trim(esc_attr($fb_url)).'" />
|
285 |
';
|
286 |
+
if (intval($fb_url_canonical)==1) {
|
287 |
+
//remove_action('wp_head', 'rel_canonical'); //This is already done
|
288 |
+
$html.='<link rel="canonical" href="'.trim(esc_attr($fb_url)).'" />
|
289 |
+
';
|
290 |
+
}
|
291 |
+
}
|
292 |
if (intval($fb_type_show)==1) $html.='<meta property="og:type" content="'.trim(esc_attr($fb_type)).'" />
|
293 |
';
|
294 |
if (intval($fb_desc_show)==1) $html.='<meta property="og:description" content="'.trim($fb_desc).'" />
|
295 |
+
';
|
296 |
+
if (intval($fb_desc_show_meta)==1) $html.='<meta name="description" content="'.trim($fb_desc).'" />
|
297 |
+
';
|
298 |
+
if (intval($fb_desc_show_schema)==1) $html.='<meta itemprop="description" content="'.trim($fb_desc).'" />
|
299 |
';
|
300 |
if(intval($fb_image_show)==1 && trim($fb_image)!='') $html.='<meta property="og:image" content="'.trim(esc_attr($fb_image)).'" />
|
301 |
';
|
302 |
+
if(intval($fb_image_show_schema)==1 && trim($fb_image)!='') $html.='<meta itemprop="image" content="'.trim(esc_attr($fb_image)).'" />
|
303 |
+
';
|
304 |
+
$html.='<!-- END - Facebook Open Graph Meta Tags for WordPress -->
|
305 |
';
|
306 |
echo $html;
|
307 |
}
|
308 |
+
add_action('wp_head', 'wonderm00n_open_graph', 9999);
|
309 |
|
310 |
function wonderm00n_open_graph_add_opengraph_namespace( $output ) {
|
311 |
if (stristr($output,'xmlns:og')) {
|
312 |
//Already there
|
|
|
313 |
} else {
|
314 |
//Let's add it
|
315 |
+
$output=$output . ' xmlns:og="http://ogp.me/ns#"';
|
316 |
}
|
317 |
+
if (stristr($output,'xmlns:fb')) {
|
318 |
+
//Already there
|
319 |
+
} else {
|
320 |
+
//Let's add it
|
321 |
+
$output=$output . ' xmlns:fb="http://ogp.me/ns/fb#"';
|
322 |
+
}
|
323 |
+
return $output;
|
324 |
}
|
325 |
//We want to be last to add the namespace because some other plugin may already added it ;-)
|
326 |
add_filter('language_attributes', 'wonderm00n_open_graph_add_opengraph_namespace',9999);
|
327 |
|
328 |
+
//Add images also to RSS feed. Most code from WP RSS Images by Alain Gonzalez
|
329 |
+
function wonderm00n_open_graph_images_on_feed($for_comments) {
|
330 |
+
global $webdados_fb_open_graph_settings;
|
331 |
+
if (intval($webdados_fb_open_graph_settings['fb_image_rss'])==1) {
|
332 |
+
if (!$for_comments) {
|
333 |
+
add_action('rss2_ns', 'wonderm00n_open_graph_images_on_feed_yahoo_media_tag');
|
334 |
+
add_action('rss_item', 'wonderm00n_open_graph_images_on_feed_image');
|
335 |
+
add_action('rss2_item', 'wonderm00n_open_graph_images_on_feed_image');
|
336 |
+
}
|
337 |
+
}
|
338 |
}
|
339 |
+
function wonderm00n_open_graph_images_on_feed_yahoo_media_tag() {
|
340 |
+
echo 'xmlns:media="http://search.yahoo.com/mrss/"';
|
|
|
|
|
|
|
|
|
341 |
}
|
342 |
+
function wonderm00n_open_graph_images_on_feed_image() {
|
343 |
+
global $webdados_fb_open_graph_settings;
|
344 |
+
$fb_image = wonderm00n_open_graph_post_image($webdados_fb_open_graph_settings['fb_image_use_specific'], $webdados_fb_open_graph_settings['fb_image_use_featured'], $webdados_fb_open_graph_settings['fb_image_use_content'], $webdados_fb_open_graph_settings['fb_image_use_media'], $webdados_fb_open_graph_settings['fb_image_use_default'], $webdados_fb_open_graph_settings['fb_image']);
|
345 |
+
if ($fb_image!='') {
|
346 |
+
$uploads = wp_upload_dir();
|
347 |
+
$url = parse_url($fb_image);
|
348 |
+
$path = $uploads['basedir'] . preg_replace( '/.*uploads(.*)/', '${1}', $url['path'] );
|
349 |
+
if (file_exists($path)) {
|
350 |
+
$filesize=filesize($path);
|
351 |
+
$url=$path;
|
352 |
+
} else {
|
353 |
+
$header=get_headers($fb_image, 1);
|
354 |
+
$filesize=$header['Content-Length'];
|
355 |
+
$url=$fb_image;
|
356 |
+
}
|
357 |
+
list($width, $height, $type, $attr) = getimagesize($url);
|
358 |
+
echo '<enclosure url="' . $fb_image . '" length="' . $filesize . '" type="'.image_type_to_mime_type($type).'" />';
|
359 |
+
echo '<media:content url="'.$fb_image.'" width="'.$width.'" height="'.$height.'" medium="image" type="'.image_type_to_mime_type($type).'" />';
|
360 |
+
}
|
361 |
}
|
362 |
+
add_action("do_feed_rss","wonderm00n_open_graph_images_on_feed",5,1);
|
363 |
+
add_action("do_feed_rss2","wonderm00n_open_graph_images_on_feed",5,1);
|
364 |
|
365 |
+
//Post image
|
366 |
+
function wonderm00n_open_graph_post_image($fb_image_use_specific=1,$fb_image_use_featured=1, $fb_image_use_content=1, $fb_image_use_media=1, $fb_image_use_default=1, $default_image='') {
|
367 |
+
global $post;
|
368 |
+
$thumbdone=false;
|
369 |
+
$fb_image='';
|
370 |
+
//Specific post image
|
371 |
+
if (intval($fb_image_use_featured)==1) {
|
372 |
+
if ($fb_image=trim(get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true))) {
|
373 |
+
if (trim($fb_image)!='') {
|
374 |
+
$thumbdone=true;
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
378 |
+
//Featured image
|
379 |
+
if (!$thumbdone) {
|
380 |
+
if (function_exists('get_post_thumbnail_id')) {
|
381 |
+
if (intval($fb_image_use_featured)==1) {
|
382 |
+
if ($id_attachment=get_post_thumbnail_id($post->ID)) {
|
383 |
+
//There's a featured/thumbnail image for this post
|
384 |
+
$fb_image=wp_get_attachment_url($id_attachment, false);
|
385 |
+
$thumbdone=true;
|
386 |
+
}
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
//From post/page content
|
391 |
+
if (!$thumbdone) {
|
392 |
+
if (intval($fb_image_use_content)==1) {
|
393 |
+
$imgreg = '/<img .*src=["\']([^ ^"^\']*)["\']/';
|
394 |
+
preg_match_all($imgreg, trim($post->post_content), $matches);
|
395 |
+
if (isset($matches[1][0])) {
|
396 |
+
//There's an image on the content
|
397 |
+
$image=$matches[1][0];
|
398 |
+
$pos = strpos($image, site_url());
|
399 |
+
if ($pos === false) {
|
400 |
+
if (stristr($image, 'http://') || stristr($image, 'https://')) {
|
401 |
+
//Complete URL - offsite
|
402 |
+
$fb_image=$image;
|
403 |
+
} else {
|
404 |
+
$fb_image=site_url().$image;
|
405 |
+
}
|
406 |
+
} else {
|
407 |
+
//Complete URL - onsite
|
408 |
+
$fb_image=$image;
|
409 |
+
}
|
410 |
+
$thumbdone=true;
|
411 |
+
}
|
412 |
+
}
|
413 |
}
|
414 |
+
//From media gallery
|
415 |
+
if (!$thumbdone) {
|
416 |
+
if (intval($fb_image_use_media)==1) {
|
417 |
+
$images = get_posts(array('post_type' => 'attachment','numberposts' => 1,'post_status' => null,'order' => 'ASC','orderby' => 'menu_order','post_mime_type' => 'image','post_parent' => $post->ID));
|
418 |
+
if ($images) {
|
419 |
+
$fb_image=wp_get_attachment_url($images[0]->ID, false);
|
420 |
+
$thumbdone=true;
|
421 |
+
}
|
422 |
+
}
|
423 |
+
}
|
424 |
+
//From default
|
425 |
+
if (!$thumbdone) {
|
426 |
+
if (intval($fb_image_use_default)==1) {
|
427 |
+
//Well... We sure did try. We'll just keep the default one!
|
428 |
+
$fb_image=$default_image;
|
429 |
+
} else {
|
430 |
+
//User chose not to use default on pages/posts
|
431 |
+
$fb_image='';
|
432 |
+
}
|
433 |
+
}
|
434 |
+
return $fb_image;
|
435 |
}
|
|
|
436 |
|
437 |
+
//Admin
|
438 |
+
if ( is_admin() ) {
|
439 |
+
|
440 |
+
add_action('admin_menu', 'wonderm00n_open_graph_add_options');
|
441 |
+
|
442 |
+
register_activation_hook(__FILE__, 'wonderm00n_open_graph_activate');
|
443 |
+
|
444 |
+
function wonderm00n_open_graph_add_options() {
|
445 |
+
if(function_exists('add_options_page')){
|
446 |
+
add_options_page('Facebook Open Graph Tags', 'Facebook Open Graph Tags', 'manage_options', basename(__FILE__), 'wonderm00n_open_graph_admin');
|
447 |
+
}
|
448 |
+
}
|
449 |
+
|
450 |
+
function wonderm00n_open_graph_activate() {
|
451 |
+
// Let's not!
|
452 |
+
}
|
453 |
+
|
454 |
+
function wonderm00n_open_graph_settings_link( $links, $file ) {
|
455 |
+
if( $file == 'wonderm00ns-simple-facebook-open-graph-tags/wonderm00n-open-graph.php' && function_exists( "admin_url" ) ) {
|
456 |
+
$settings_link = '<a href="' . admin_url( 'options-general.php?page=wonderm00n-open-graph.php' ) . '">' . __('Settings') . '</a>';
|
457 |
+
array_push( $links, $settings_link ); // after other links
|
458 |
+
}
|
459 |
+
return $links;
|
460 |
+
}
|
461 |
+
add_filter('plugin_row_meta', 'wonderm00n_open_graph_settings_link', 9, 2 );
|
462 |
+
|
463 |
+
|
464 |
+
function wonderm00n_open_graph_admin() {
|
465 |
+
global $wonderm00n_open_graph_plugin_settings, $wonderm00n_open_graph_plugin_version;
|
466 |
+
wonderm00n_open_graph_upgrade();
|
467 |
+
include_once 'includes/settings-page.php';
|
468 |
+
}
|
469 |
+
|
470 |
+
function wonderm00n_open_graph_scripts() {
|
471 |
+
wp_enqueue_script('media-upload');
|
472 |
+
wp_enqueue_script('thickbox');
|
473 |
+
wp_enqueue_script('jquery');
|
474 |
+
}
|
475 |
+
function wonderm00n_open_graph_styles() {
|
476 |
+
wp_enqueue_style('thickbox');
|
477 |
+
}
|
478 |
+
add_action('admin_print_scripts', 'wonderm00n_open_graph_scripts');
|
479 |
+
add_action('admin_print_styles', 'wonderm00n_open_graph_styles');
|
480 |
|
481 |
+
function wonderm00n_open_graph_add_posts_options() {
|
482 |
+
global $webdados_fb_open_graph_settings;
|
483 |
+
if (intval($webdados_fb_open_graph_settings['fb_image_use_specific'])==1) {
|
484 |
+
global $post;
|
485 |
+
add_meta_box(
|
486 |
+
'webdados_fb_open_graph',
|
487 |
+
'Facebook Open Graph Meta Tags for WordPress',
|
488 |
+
'wonderm00n_open_graph_add_posts_options_box',
|
489 |
+
$post->post_type
|
490 |
+
);
|
491 |
+
}
|
492 |
+
}
|
493 |
+
function wonderm00n_open_graph_add_posts_options_box() {
|
494 |
+
global $post;
|
495 |
+
// Add an nonce field so we can check for it later.
|
496 |
+
wp_nonce_field( 'webdados_fb_open_graph_custom_box', 'webdados_fb_open_graph_custom_box_nonce' );
|
497 |
+
// Current value
|
498 |
+
$value = get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true);
|
499 |
+
echo '<label for="webdados_fb_open_graph_specific_image">';
|
500 |
+
_e('Use this image:', 'wd-fb-og');
|
501 |
+
echo '</label> ';
|
502 |
+
echo '<input type="text" id="webdados_fb_open_graph_specific_image" name="webdados_fb_open_graph_specific_image" value="' . esc_attr( $value ) . '" size="75" />
|
503 |
+
<input id="webdados_fb_open_graph_specific_image_button" class="button" type="button" value="'.__('Upload/Choose Open Graph Image','wd-fb-og').'" />';
|
504 |
+
echo '<br/>'.__('Recommended size: 1200x630px', 'wd-fb-og');
|
505 |
+
echo '<script type="text/javascript">
|
506 |
+
jQuery(document).ready(function() {
|
507 |
+
jQuery(document).ready(function(){
|
508 |
+
jQuery(\'#webdados_fb_open_graph_specific_image_button\').live(\'click\', function() {
|
509 |
+
tb_show(\'Upload image\', \'media-upload.php?post_id='.$post->ID.'&type=image&context=webdados_fb_open_graph_specific_image_button&TB_iframe=true\');
|
510 |
+
});
|
511 |
+
});
|
512 |
+
//function webdados_fb_open_graph_media_insert(url) {
|
513 |
+
// jQuery(\'#webdados_fb_open_graph_specific_image\').val(url);
|
514 |
+
// tb_remove();
|
515 |
+
//}
|
516 |
+
});
|
517 |
+
</script>';
|
518 |
+
}
|
519 |
+
add_action('add_meta_boxes', 'wonderm00n_open_graph_add_posts_options');
|
520 |
+
function wonderm00n_open_graph_add_posts_options_box_save( $post_id ) {
|
521 |
+
|
522 |
+
/*
|
523 |
+
* We need to verify this came from the our screen and with proper authorization,
|
524 |
+
* because save_post can be triggered at other times.
|
525 |
+
*/
|
526 |
+
|
527 |
+
// Check if our nonce is set.
|
528 |
+
if ( ! isset( $_POST['webdados_fb_open_graph_custom_box_nonce'] ) )
|
529 |
+
return $post_id;
|
530 |
+
|
531 |
+
$nonce = $_POST['webdados_fb_open_graph_custom_box_nonce'];
|
532 |
+
|
533 |
+
// Verify that the nonce is valid.
|
534 |
+
if ( ! wp_verify_nonce( $nonce, 'webdados_fb_open_graph_custom_box' ) )
|
535 |
+
return $post_id;
|
536 |
+
|
537 |
+
// If this is an autosave, our form has not been submitted, so we don't want to do anything.
|
538 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
|
539 |
+
return $post_id;
|
540 |
+
|
541 |
+
// Check the user's permissions.
|
542 |
+
if ( 'page' == $_POST['post_type'] ) {
|
543 |
+
|
544 |
+
if ( ! current_user_can( 'edit_page', $post_id ) )
|
545 |
+
return $post_id;
|
546 |
+
|
547 |
+
} else {
|
548 |
+
|
549 |
+
if ( ! current_user_can( 'edit_post', $post_id ) )
|
550 |
+
return $post_id;
|
551 |
+
}
|
552 |
+
|
553 |
+
/* OK, its safe for us to save the data now. */
|
554 |
+
|
555 |
+
// Sanitize user input.
|
556 |
+
$mydata = sanitize_text_field( $_POST['webdados_fb_open_graph_specific_image'] );
|
557 |
+
|
558 |
+
// Update the meta field in the database.
|
559 |
+
update_post_meta( $post_id, '_webdados_fb_open_graph_specific_image', $mydata );
|
560 |
+
}
|
561 |
+
add_action('save_post', 'wonderm00n_open_graph_add_posts_options_box_save' );
|
562 |
+
|
563 |
+
// Media insert code
|
564 |
+
function webdados_fb_open_graph_media_admin_head() {
|
565 |
+
|
566 |
+
?>
|
567 |
+
<script type="text/javascript">
|
568 |
+
function wdfbogFieldsFileMediaTrigger(guid) {
|
569 |
+
window.parent.jQuery('#webdados_fb_open_graph_specific_image').val(guid);
|
570 |
+
window.parent.jQuery('#TB_closeWindowButton').trigger('click');
|
571 |
+
}
|
572 |
+
</script>
|
573 |
+
<style type="text/css">
|
574 |
+
tr.submit, .ml-submit, #save, #media-items .A1B1 p:last-child { display: none; }
|
575 |
+
</style>
|
576 |
+
<?php
|
577 |
+
}
|
578 |
+
function webdados_fb_open_graph_media_fields_to_edit_filter($form_fields, $post) {
|
579 |
+
// Reset form
|
580 |
+
$form_fields = array();
|
581 |
+
$url = wp_get_attachment_url( $post->ID );
|
582 |
+
$form_fields['wd-fb-og_fields_file'] = array(
|
583 |
+
'label' => '',
|
584 |
+
'input' => 'html',
|
585 |
+
'html' => '<a href="#" title="' . $url
|
586 |
+
. '" class="wd-fb-og-fields-file-insert-button'
|
587 |
+
. ' button-primary" onclick="wdfbogFieldsFileMediaTrigger(\''
|
588 |
+
. $url . '\')">'
|
589 |
+
. __( 'Use as Image Open Graph Tag', 'wd-fb-og') . '</a><br /><br />',
|
590 |
+
);
|
591 |
+
return $form_fields;
|
592 |
+
}
|
593 |
+
if ( (isset( $_GET['context'] ) && $_GET['context'] == 'webdados_fb_open_graph_specific_image_button')
|
594 |
+
|| (isset( $_SERVER['HTTP_REFERER'] )
|
595 |
+
&& strpos( $_SERVER['HTTP_REFERER'],
|
596 |
+
'context=webdados_fb_open_graph_specific_image_button' ) !== false)
|
597 |
+
) {
|
598 |
+
// Add button
|
599 |
+
add_filter( 'attachment_fields_to_edit', 'webdados_fb_open_graph_media_fields_to_edit_filter', 9999, 2 );
|
600 |
+
// Add JS
|
601 |
+
add_action( 'admin_head', 'webdados_fb_open_graph_media_admin_head' );
|
602 |
+
}
|
603 |
}
|
604 |
|
605 |
+
|
606 |
+
|
607 |
+
function wonderm00n_open_graph_default_values() {
|
608 |
+
return array(
|
609 |
+
'fb_locale_show' => 1,
|
610 |
+
'fb_sitename_show' => 1,
|
611 |
+
'fb_title_show' => 1,
|
612 |
+
'fb_url_show' => 1,
|
613 |
+
'fb_url_canonical' => 1,
|
614 |
+
'fb_type_show' => 1,
|
615 |
+
'fb_desc_show' => 1,
|
616 |
+
'fb_desc_chars' => 300,
|
617 |
+
'fb_image_show' => 1,
|
618 |
+
'fb_image_use_specific' => 1,
|
619 |
+
'fb_image_use_featured' => 1,
|
620 |
+
'fb_image_use_content' => 1,
|
621 |
+
'fb_image_use_media' => 1,
|
622 |
+
'fb_image_use_default' => 1,
|
623 |
+
'fb_keep_data_uninstall' => 1
|
624 |
+
);
|
625 |
}
|
626 |
+
function wonderm00n_open_graph_load_settings() {
|
627 |
+
$defaults=wonderm00n_open_graph_default_values();
|
628 |
+
//Load the user settings (if they exist)
|
629 |
+
if ($usersettings=get_option('webdados_fb_open_graph_settings')) {
|
630 |
+
//Merge the settings "all together now" (yes, it's a Beatles reference)
|
631 |
+
foreach($usersettings as $key => $value) {
|
632 |
+
//if ($value=='') {
|
633 |
+
if (strlen(trim($value))==0) {
|
634 |
+
if (!empty($defaults[$key])) {
|
635 |
+
$usersettings[$key]=$defaults[$key];
|
636 |
+
}
|
637 |
+
}
|
638 |
+
}
|
639 |
+
} else {
|
640 |
+
$usersettings=$defaults;
|
641 |
+
}
|
642 |
+
return $usersettings;
|
643 |
+
}
|
644 |
+
|
645 |
+
function wonderm00n_open_graph_upgrade() {
|
646 |
+
global $wonderm00n_open_graph_plugin_version;
|
647 |
+
$upgrade=false;
|
648 |
+
//Upgrade from 0.5.4 - Last version with individual settings
|
649 |
+
if (!$v=get_option('webdados_fb_open_graph_version')) {
|
650 |
+
//Convert settings
|
651 |
+
$upgrade=true;
|
652 |
+
global $wonderm00n_open_graph_plugin_settings;
|
653 |
+
foreach($wonderm00n_open_graph_plugin_settings as $key) {
|
654 |
+
$webdados_fb_open_graph_settings[$key]=get_option('wonderm00n_open_graph_'.$key);
|
655 |
+
}
|
656 |
+
// New fb_image_use_specific
|
657 |
+
$webdados_fb_open_graph_settings['fb_image_use_specific']=1;
|
658 |
+
update_option('webdados_fb_open_graph_settings', $webdados_fb_open_graph_settings);
|
659 |
+
foreach($wonderm00n_open_graph_plugin_settings as $key) {
|
660 |
+
delete_option('wonderm00n_open_graph_'.$key);
|
661 |
+
}
|
662 |
+
} else {
|
663 |
+
if ($v<$wonderm00n_open_graph_plugin_version) {
|
664 |
+
//Any version upgrade
|
665 |
+
$upgrade=true;
|
666 |
+
}
|
667 |
+
}
|
668 |
+
//Set version on database
|
669 |
+
if ($upgrade) {
|
670 |
+
update_option('webdados_fb_open_graph_version', $wonderm00n_open_graph_plugin_version);
|
671 |
+
}
|
672 |
}
|
673 |
+
|
674 |
+
|
675 |
+
//Uninstall stuff
|
676 |
+
register_uninstall_hook(__FILE__, 'wonderm00n_open_graph_uninstall'); //NOT WORKING! WHY?
|
677 |
+
function wonderm00n_open_graph_uninstall() {
|
678 |
+
//NOT WORKING! WHY?
|
679 |
+
//global $wonderm00n_open_graph_plugin_settings;
|
680 |
+
//Remove data
|
681 |
+
/*foreach($wonderm00n_open_graph_plugin_settings as $key) {
|
682 |
+
delete_option('wonderm00n_open_graph_'.$key);
|
|
|
|
|
|
|
|
|
|
|
|
|
683 |
}
|
684 |
+
delete_option('wonderm00n_open_graph_activated');*/
|
685 |
+
}
|
686 |
+
|
687 |
+
//To avoid notices when updating options on settings-page.php
|
688 |
+
//Hey @flynsarmy you are here, see?
|
689 |
+
function wonderm00n_open_graph_post($var, $default='') {
|
690 |
+
return isset($_POST[$var]) ? $_POST[$var] : $default;
|
691 |
}
|
692 |
|
693 |
?>
|