Open Graph for Facebook, Google+ and Twitter Card Tags - Version 0.1.9

Version Description

  • Added the og:locale tag. This will be the Wordpress locale by default, but can be chosen by the user also.
  • The og:type tag can now be set as 'website' or 'blog' for the homepage.
  • 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.
Download this release

Release Info

Developer wonderm00n
Plugin Icon Open Graph for Facebook, Google+ and Twitter Card Tags
Version 0.1.9
Comparing to
See all releases

Code changes from version 0.1.8.1 to 0.1.9

includes/FacebookLocales.xml ADDED
@@ -0,0 +1,850 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
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>Azeri</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
@@ -14,20 +14,24 @@
14
  wonderm00n_open_graph_activate();
15
  }
16
 
17
- $fb_app_id_show = get_option('wonderm00n_open_graph_fb_app_id_show');
18
- $fb_app_id = get_option('wonderm00n_open_graph_fb_app_id');
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_desc_homepage = get_option('wonderm00n_open_graph_fb_desc_homepage');
28
  $fb_desc_homepage_customtext = get_option('wonderm00n_open_graph_fb_desc_homepage_customtext');
29
- $fb_image_show = get_option('wonderm00n_open_graph_fb_image_show');
30
- $fb_image = get_option('wonderm00n_open_graph_fb_image');
31
 
32
  ?>
33
  <div class="wrap">
@@ -50,7 +54,7 @@
50
  <form name="form1" method="post">
51
  <table width="100%" class="form-table">
52
  <tr>
53
- <th scope="row" nowrap="nowrap">Include Facebook Platform App ID (og:app_id) tag?</th>
54
  <td>
55
  <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();"/>
56
  </td>
@@ -62,11 +66,11 @@
62
  </td>
63
  </tr>
64
  <tr>
65
- <td>&nbsp;</td>
66
- <td></td>
67
  </tr>
68
  <tr>
69
- <th scope="row" nowrap="nowrap">Include Facebook Admin(s) ID (og:admins) tag?</th>
70
  <td>
71
  <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();"/>
72
  </td>
@@ -80,8 +84,60 @@
80
  </td>
81
  </tr>
82
  <tr>
83
- <td>&nbsp;</td>
84
- <td></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  </tr>
86
  <tr>
87
  <th scope="row" nowrap="nowrap">Include Site Name (og:site_name) tag?</th>
@@ -90,8 +146,8 @@
90
  </td>
91
  </tr>
92
  <tr>
93
- <td>&nbsp;</td>
94
- <td></td>
95
  </tr>
96
  <tr>
97
  <th scope="row" nowrap="nowrap">Include Post/Page title (og:title) tag?</th>
@@ -100,29 +156,50 @@
100
  </td>
101
  </tr>
102
  <tr>
103
- <td>&nbsp;</td>
104
- <td></td>
105
  </tr>
106
  <tr>
107
  <th scope="row" nowrap="nowrap">Include URL (og:url) tag?</th>
108
  <td>
109
- <input type="checkbox" name="fb_url_show" id="fb_url_show" value="1" <?php echo (intval($fb_url_show)==1 ? ' checked="checked"' : ''); ?>/>
 
 
 
 
 
 
 
 
 
 
 
110
  </td>
111
  </tr>
112
  <tr>
113
- <td>&nbsp;</td>
114
- <td></td>
115
  </tr>
116
  <tr>
117
  <th scope="row" nowrap="nowrap">Include Type (og:type) tag?</th>
118
  <td>
119
- <input type="checkbox" name="fb_type_show" id="fb_type_show" value="1" <?php echo (intval($fb_type_show)==1 ? ' checked="checked"' : ''); ?>/>
120
- (will be &quot;article&quot; for posts and pages and &quot;website&quot; for the homepage)
 
 
 
 
 
 
 
 
 
 
121
  </td>
122
  </tr>
123
  <tr>
124
- <td>&nbsp;</td>
125
- <td></td>
126
  </tr>
127
  <tr>
128
  <th scope="row" nowrap="nowrap">Include Description (og:description) tag?</th>
@@ -141,8 +218,8 @@
141
  <td>
142
  Use
143
  <select name="fb_desc_homepage" id="fb_desc_homepage" onchange="showDescriptionCustomText();">
144
- <option value=""<?php if (trim($fb_desc_homepage)=='') echo ' selected="selected"'; ?>>Website tagline</option>
145
- <option value="custom"<?php if (trim($fb_desc_homepage)=='custom') echo ' selected="selected"'; ?>>Custom text</option>
146
  </select>
147
  <div id="fb_desc_homepage_customtext_div">
148
  <textarea name="fb_desc_homepage_customtext" id="fb_desc_homepage_customtext" rows="3" cols="50"><?php echo $fb_desc_homepage_customtext; ?></textarea>
@@ -181,7 +258,7 @@
181
  </div>
182
 
183
  <?php
184
- $links[0]['text']='Test your URLs at Facebook URL Linter';
185
  $links[0]['url']='https://developers.facebook.com/tools/debug';
186
  $links[10]['text']='About the Open Graph Protocol (on Facebook)';
187
  $links[10]['url']='https://developers.facebook.com/docs/opengraph/';
@@ -196,8 +273,17 @@
196
  $links[60]['text']='Author\'s Facebook account: Wonderm00n';
197
  $links[60]['url']='http://www.facebook.com/wonderm00n';
198
  ?>
199
- <div class="postbox-container" style="width: 29%;">
200
 
 
 
 
 
 
 
 
 
 
201
  <div id="poststuff">
202
  <div id="wonderm00n_open_graph_links" class="postbox">
203
  <h3 id="settings">Useful links</h3>
@@ -234,7 +320,7 @@
234
  </div>
235
 
236
  <div class="clear">
237
- <p><br/>&copy 2011<?php if(date('Y')>2010) echo '-'.date('Y'); ?> <a href="http://wonderm00n.com" target="_blank">Marco Almeida (Wonderm00n)</a></p>
238
  </div>
239
 
240
  </div>
@@ -251,6 +337,10 @@
251
  }
252
  showAppidOptions();
253
  showAdminOptions();
 
 
 
 
254
  jQuery('.fb_description_options').hide();
255
  showDescriptionOptions();
256
  jQuery('#fb_desc_homepage_customtext').hide();
@@ -271,6 +361,34 @@
271
  jQuery('.fb_admin_id_options').hide();
272
  }
273
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  function showDescriptionOptions() {
275
  if (jQuery('#fb_desc_show').is(':checked')) {
276
  jQuery('.fb_description_options').show();
14
  wonderm00n_open_graph_activate();
15
  }
16
 
17
+ $fb_app_id_show=get_option('wonderm00n_open_graph_fb_app_id_show');
18
+ $fb_app_id=get_option('wonderm00n_open_graph_fb_app_id');
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_locale_show=get_option('wonderm00n_open_graph_fb_locale_show');
22
+ $fb_locale = get_option('wonderm00n_open_graph_fb_locale');
23
+ $fb_sitename_show=get_option('wonderm00n_open_graph_fb_sitename_show');
24
+ $fb_title_show=get_option('wonderm00n_open_graph_fb_title_show');
25
+ $fb_url_show=get_option('wonderm00n_open_graph_fb_url_show');
26
+ $fb_url_add_trailing=get_option('wonderm00n_open_graph_fb_url_add_trailing');
27
+ $fb_type_show=get_option('wonderm00n_open_graph_fb_type_show');
28
+ $fb_type_homepage=get_option('wonderm00n_open_graph_fb_type_homepage');
29
+ $fb_desc_show=get_option('wonderm00n_open_graph_fb_desc_show');
30
+ $fb_desc_chars=intval(get_option('wonderm00n_open_graph_fb_desc_chars'));
31
  $fb_desc_homepage = get_option('wonderm00n_open_graph_fb_desc_homepage');
32
  $fb_desc_homepage_customtext = get_option('wonderm00n_open_graph_fb_desc_homepage_customtext');
33
+ $fb_image_show=get_option('wonderm00n_open_graph_fb_image_show');
34
+ $fb_image=get_option('wonderm00n_open_graph_fb_image');
35
 
36
  ?>
37
  <div class="wrap">
54
  <form name="form1" method="post">
55
  <table width="100%" class="form-table">
56
  <tr>
57
+ <th scope="row" nowrap="nowrap">Include Facebook Platform App ID (fb:app_id) tag?</th>
58
  <td>
59
  <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();"/>
60
  </td>
66
  </td>
67
  </tr>
68
  <tr>
69
+ <td>&nbsp;</td>
70
+ <td></td>
71
  </tr>
72
  <tr>
73
+ <th scope="row" nowrap="nowrap">Include Facebook Admin(s) ID (fb:admins) tag?</th>
74
  <td>
75
  <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();"/>
76
  </td>
84
  </td>
85
  </tr>
86
  <tr>
87
+ <td>&nbsp;</td>
88
+ <td></td>
89
+ </tr>
90
+ <tr>
91
+ <th scope="row" nowrap="nowrap">Include locale (fb:locale) tag?</th>
92
+ <td>
93
+ <input type="checkbox" name="fb_locale_show" id="fb_locale_show" value="1" <?php echo (intval($fb_locale_show)==1 ? ' checked="checked"' : ''); ?> onclick="showLocaleOptions();"/>
94
+ </td>
95
+ </tr>
96
+ <tr class="fb_locale_options">
97
+ <th scope="row" nowrap="nowrap">Locale:</th>
98
+ <td>
99
+ <select name="fb_locale" id="fb_locale">
100
+ <option value=""<?php if (trim($fb_locale)=='') echo ' selected="selected"'; ?>>Wordpress current locale/language (<?php echo get_locale(); ?>)&nbsp;</option>
101
+ <?php
102
+ $listLocales=false;
103
+ //Online
104
+ if ($ch = curl_init('http://www.facebook.com/translations/FacebookLocales.xmla')) {
105
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
106
+ $fb_locales=curl_exec($ch);
107
+ if (curl_errno($ch)) {
108
+ //echo curl_error($ch);
109
+ } else {
110
+ $info = curl_getinfo($ch);
111
+ if (intval($info['http_code'])==200) {
112
+ $listLocales=true;
113
+ }
114
+ }
115
+ curl_close($ch);
116
+ }
117
+ //Offline
118
+ if (!$listLocales) {
119
+ if ($fb_locales=file_get_contents(ABSPATH . 'wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/includes/FacebookLocales.xml')) {
120
+ $listLocales=true;
121
+ }
122
+ }
123
+ //OK
124
+ if ($listLocales) {
125
+ $xml=simplexml_load_string($fb_locales);
126
+ $json = json_encode($xml);
127
+ $locales = json_decode($json,TRUE);
128
+ if (is_array($locales['locale'])) {
129
+ foreach ($locales['locale'] as $locale) {
130
+ ?><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
131
+ }
132
+ }
133
+ }
134
+ ?>
135
+ </select>
136
+ </td>
137
+ </tr>
138
+ <tr>
139
+ <td>&nbsp;</td>
140
+ <td></td>
141
  </tr>
142
  <tr>
143
  <th scope="row" nowrap="nowrap">Include Site Name (og:site_name) tag?</th>
146
  </td>
147
  </tr>
148
  <tr>
149
+ <td>&nbsp;</td>
150
+ <td></td>
151
  </tr>
152
  <tr>
153
  <th scope="row" nowrap="nowrap">Include Post/Page title (og:title) tag?</th>
156
  </td>
157
  </tr>
158
  <tr>
159
+ <td>&nbsp;</td>
160
+ <td></td>
161
  </tr>
162
  <tr>
163
  <th scope="row" nowrap="nowrap">Include URL (og:url) tag?</th>
164
  <td>
165
+ <input type="checkbox" name="fb_url_show" id="fb_url_show" value="1" <?php echo (intval($fb_url_show)==1 ? ' checked="checked"' : ''); ?> onclick="showUrlOptions();"/>
166
+ </td>
167
+ </tr>
168
+ <tr class="fb_url_options">
169
+ <th scope="row" nowrap="nowrap">Add trailing slash at the end:</th>
170
+ <td>
171
+ <select name="fb_url_add_trailing" id="fb_url_add_trailing" onchange="showUrlTrail();">
172
+ <option value="0"<?php if (intval($fb_url_add_trailing)==0) echo ' selected="selected"'; ?>>No&nbsp;</option>
173
+ <option value="1"<?php if (intval($fb_url_add_trailing)==1) echo ' selected="selected"'; ?>>Yes&nbsp;</option>
174
+ </select>
175
+ <br/>
176
+ On the homepage will be: <i><?php echo get_option('siteurl'); ?><span id="fb_url_add_trailing_example">/</span></i>
177
  </td>
178
  </tr>
179
  <tr>
180
+ <td>&nbsp;</td>
181
+ <td></td>
182
  </tr>
183
  <tr>
184
  <th scope="row" nowrap="nowrap">Include Type (og:type) tag?</th>
185
  <td>
186
+ <input type="checkbox" name="fb_type_show" id="fb_type_show" value="1" <?php echo (intval($fb_type_show)==1 ? ' checked="checked"' : ''); ?> onclick="showTypeOptions();"/>
187
+ (will be &quot;article&quot; for posts and pages and &quot;website&quot; or &quot;blog&quot; for the homepage)
188
+ </td>
189
+ </tr>
190
+ <tr class="fb_type_options">
191
+ <th scope="row" nowrap="nowrap">Homepage type:</th>
192
+ <td>
193
+ Use
194
+ <select name="fb_type_homepage" id="fb_type_homepage">
195
+ <option value="website"<?php if (trim($fb_type_homepage)=='' || trim($fb_type_homepage)=='website') echo ' selected="selected"'; ?>>website&nbsp;</option>
196
+ <option value="blog"<?php if (trim($fb_type_homepage)=='blog') echo ' selected="selected"'; ?>>blog&nbsp;</option>
197
+ </select>
198
  </td>
199
  </tr>
200
  <tr>
201
+ <td>&nbsp;</td>
202
+ <td></td>
203
  </tr>
204
  <tr>
205
  <th scope="row" nowrap="nowrap">Include Description (og:description) tag?</th>
218
  <td>
219
  Use
220
  <select name="fb_desc_homepage" id="fb_desc_homepage" onchange="showDescriptionCustomText();">
221
+ <option value=""<?php if (trim($fb_desc_homepage)=='') echo ' selected="selected"'; ?>>Website tagline&nbsp;</option>
222
+ <option value="custom"<?php if (trim($fb_desc_homepage)=='custom') echo ' selected="selected"'; ?>>Custom text&nbsp;</option>
223
  </select>
224
  <div id="fb_desc_homepage_customtext_div">
225
  <textarea name="fb_desc_homepage_customtext" id="fb_desc_homepage_customtext" rows="3" cols="50"><?php echo $fb_desc_homepage_customtext; ?></textarea>
258
  </div>
259
 
260
  <?php
261
+ $links[0]['text']='Test your URLs at Facebook URL Linter / Debugger';
262
  $links[0]['url']='https://developers.facebook.com/tools/debug';
263
  $links[10]['text']='About the Open Graph Protocol (on Facebook)';
264
  $links[10]['url']='https://developers.facebook.com/docs/opengraph/';
273
  $links[60]['text']='Author\'s Facebook account: Wonderm00n';
274
  $links[60]['url']='http://www.facebook.com/wonderm00n';
275
  ?>
276
+ <div class="postbox-container" style="width: 29%; float: right;">
277
 
278
+ <div id="poststuff">
279
+ <div id="wonderm00n_open_graph_links" class="postbox">
280
+ <h3 id="settings">Rate this plugin</h3>
281
+ <div class="inside">
282
+ If you like this plugin, <a href="http://wordpress.org/extend/plugins/wonderm00ns-simple-facebook-open-graph-tags/" target="_blank">please give it a high Rating</a>.
283
+ </div>
284
+ </div>
285
+ </div>
286
+
287
  <div id="poststuff">
288
  <div id="wonderm00n_open_graph_links" class="postbox">
289
  <h3 id="settings">Useful links</h3>
320
  </div>
321
 
322
  <div class="clear">
323
+ <p><br/>&copy 2011<?php if(date('Y')>2011) echo '-'.date('Y'); ?> <a href="http://wonderm00n.com" target="_blank">Marco Almeida (Wonderm00n)</a></p>
324
  </div>
325
 
326
  </div>
337
  }
338
  showAppidOptions();
339
  showAdminOptions();
340
+ showLocaleOptions();
341
+ showTypeOptions();
342
+ showUrlOptions();
343
+ showUrlTrail();
344
  jQuery('.fb_description_options').hide();
345
  showDescriptionOptions();
346
  jQuery('#fb_desc_homepage_customtext').hide();
361
  jQuery('.fb_admin_id_options').hide();
362
  }
363
  }
364
+ function showLocaleOptions() {
365
+ if (jQuery('#fb_locale_show').is(':checked')) {
366
+ jQuery('.fb_locale_options').show();
367
+ } else {
368
+ jQuery('.fb_locale_options').hide();
369
+ }
370
+ }
371
+ function showUrlOptions() {
372
+ if (jQuery('#fb_url_show').is(':checked')) {
373
+ jQuery('.fb_url_options').show();
374
+ } else {
375
+ jQuery('.fb_url_options').hide();
376
+ }
377
+ }
378
+ function showUrlTrail() {
379
+ if (jQuery('#fb_url_add_trailing').val()=='1') {
380
+ jQuery('#fb_url_add_trailing_example').show();
381
+ } else {
382
+ jQuery('#fb_url_add_trailing_example').hide();
383
+ }
384
+ }
385
+ function showTypeOptions() {
386
+ if (jQuery('#fb_type_show').is(':checked')) {
387
+ jQuery('.fb_type_options').show();
388
+ } else {
389
+ jQuery('.fb_type_options').hide();
390
+ }
391
+ }
392
  function showDescriptionOptions() {
393
  if (jQuery('#fb_desc_show').is(':checked')) {
394
  jQuery('.fb_description_options').show();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-faceb
4
  Tags: facebook, open graph, seo, share, social, meta
5
  Requires at least: 3
6
  Tested up to: 3.2.1
7
- Stable tag: 0.1.8.1
8
 
9
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
@@ -18,12 +18,13 @@ The tags that this plugin inserts are:
18
 
19
  * **fb:app_id** : From settings on the options screen.
20
  * **fb: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** : "website" for the homepage and "article" for all the others.
25
- * **og:description** : From post/page excerpt if it exists, or from post/page content. From category/tag description on it's pages, if it exists. From tagline, or custom text, on all the others.
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
 
@@ -33,6 +34,13 @@ The tags that this plugin inserts are:
33
 
34
  == Changelog ==
35
 
 
 
 
 
 
 
 
36
  = 0.1.8.1 =
37
 
38
  * Fixed the namespace declarations
4
  Tags: facebook, open graph, seo, share, social, meta
5
  Requires at least: 3
6
  Tested up to: 3.2.1
7
+ Stable tag: 0.1.9
8
 
9
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
18
 
19
  * **fb:app_id** : From settings on the options screen.
20
  * **fb:admins** : From settings on the options screen.
21
+ * **og:locale** : From Wordpress locale or chosen by the user.
22
  * **og:site_name** : From blog title.
23
  * **og:title** : From post/page/archive/tag/... title.
24
  * **og:url** : From the post/page permalink.
25
+ * **og:type** : "website" or "blog" for the homepage and "article" for all the others.
26
+ * **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.
27
+ * **og:image** : From 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.
28
 
29
  == Installation ==
30
 
34
 
35
  == Changelog ==
36
 
37
+ = 0.1.9 =
38
+
39
+ * Added the og:locale tag. This will be the Wordpress locale by default, but can be chosen by the user also.
40
+ * The og:type tag can now be set as 'website' or 'blog' for the homepage.
41
+ * 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.
42
+
43
+
44
  = 0.1.8.1 =
45
 
46
  * Fixed the namespace declarations
wonderm00n-open-graph.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
- * @version 0.1.8.1
5
  */
6
  /*
7
  Plugin Name: Wonderm00n's Simple Facebook Open Graph Meta Tags
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 Wordpress Blog/Website for better Facebook sharing
10
  Author: Marco Almeida (Wonderm00n)
11
- Version: 0.1.8.1
12
  Author URI: http://wonderm00n.com
13
  */
14
 
@@ -19,10 +19,14 @@ function wonderm00n_open_graph() {
19
  $fb_app_id=get_option('wonderm00n_open_graph_fb_app_id');
20
  $fb_admin_id_show=get_option('wonderm00n_open_graph_fb_admin_id_show');
21
  $fb_admin_id=get_option('wonderm00n_open_graph_fb_admin_id');
 
 
22
  $fb_sitename_show=get_option('wonderm00n_open_graph_fb_sitename_show');
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_desc_homepage = get_option('wonderm00n_open_graph_fb_desc_homepage');
@@ -83,7 +87,7 @@ function wonderm00n_open_graph() {
83
  global $wp_query;
84
  //Other pages - Defaults
85
  $fb_title=esc_attr(strip_tags(stripslashes(get_bloginfo('name'))));
86
- $fb_url=get_option('siteurl');
87
  switch(trim($fb_desc_homepage)) {
88
  case 'custom':
89
  $fb_desc=esc_attr(strip_tags(stripslashes($fb_desc_homepage_customtext)));
@@ -137,7 +141,7 @@ function wonderm00n_open_graph() {
137
  }
138
  } else {
139
  if (is_front_page()) {
140
- $fb_type='website';
141
  } else {
142
  //Others... Defaults already set up there
143
  }
@@ -156,6 +160,8 @@ function wonderm00n_open_graph() {
156
  if (intval($fb_app_id_show)==1 && trim($fb_app_id)!='') $html.='<meta property="fb:app_id" content="'.trim($fb_app_id).'" />
157
  ';
158
  if (intval($fb_admin_id_show)==1 && trim($fb_admin_id)!='') $html.='<meta property="fb:admins" content="'.trim($fb_admin_id).'" />
 
 
159
  ';
160
  if (intval($fb_sitename_show)==1) $html.='<meta property="og:site_name" content="'.get_bloginfo('name').'" />
161
  ';
@@ -209,6 +215,7 @@ if ( is_admin() ) {
209
  update_option("wonderm00n_open_graph_activated", 1);
210
  update_option("wonderm00n_open_graph_fb_admin_id_show", 0);
211
  update_option("wonderm00n_open_graph_fb_app_id_show", 0);
 
212
  update_option("wonderm00n_open_graph_fb_sitename_show", 1);
213
  update_option("wonderm00n_open_graph_fb_title_show", 1);
214
  update_option("wonderm00n_open_graph_fb_url_show", 1);
@@ -249,10 +256,14 @@ if ( is_admin() ) {
249
  update_option('wonderm00n_open_graph_fb_app_id', trim($_POST['fb_app_id']));
250
  update_option('wonderm00n_open_graph_fb_admin_id_show', intval($_POST['fb_admin_id_show']));
251
  update_option('wonderm00n_open_graph_fb_admin_id', trim($_POST['fb_admin_id']));
 
 
252
  update_option('wonderm00n_open_graph_fb_sitename_show', intval($_POST['fb_sitename_show']));
253
  update_option('wonderm00n_open_graph_fb_title_show', intval($_POST['fb_title_show']));
254
  update_option('wonderm00n_open_graph_fb_url_show', intval($_POST['fb_url_show']));
 
255
  update_option('wonderm00n_open_graph_fb_type_show', intval($_POST['fb_type_show']));
 
256
  update_option('wonderm00n_open_graph_fb_desc_show', intval($_POST['fb_desc_show']));
257
  update_option('wonderm00n_open_graph_fb_desc_chars', intval($_POST['fb_desc_chars']));
258
  update_option('wonderm00n_open_graph_fb_desc_homepage', trim($_POST['fb_desc_homepage']));
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
+ * @version 0.1.9
5
  */
6
  /*
7
  Plugin Name: Wonderm00n's Simple Facebook Open Graph Meta Tags
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 Wordpress Blog/Website for better Facebook sharing
10
  Author: Marco Almeida (Wonderm00n)
11
+ Version: 0.1.9
12
  Author URI: http://wonderm00n.com
13
  */
14
 
19
  $fb_app_id=get_option('wonderm00n_open_graph_fb_app_id');
20
  $fb_admin_id_show=get_option('wonderm00n_open_graph_fb_admin_id_show');
21
  $fb_admin_id=get_option('wonderm00n_open_graph_fb_admin_id');
22
+ $fb_locale_show=get_option('wonderm00n_open_graph_fb_locale_show');
23
+ $fb_locale = get_option('wonderm00n_open_graph_fb_locale');
24
  $fb_sitename_show=get_option('wonderm00n_open_graph_fb_sitename_show');
25
  $fb_title_show=get_option('wonderm00n_open_graph_fb_title_show');
26
  $fb_url_show=get_option('wonderm00n_open_graph_fb_url_show');
27
+ $fb_url_add_trailing=get_option('wonderm00n_open_graph_fb_url_add_trailing');
28
  $fb_type_show=get_option('wonderm00n_open_graph_fb_type_show');
29
+ $fb_type_homepage=get_option('wonderm00n_open_graph_fb_type_homepage');
30
  $fb_desc_show=get_option('wonderm00n_open_graph_fb_desc_show');
31
  $fb_desc_chars=intval(get_option('wonderm00n_open_graph_fb_desc_chars'));
32
  $fb_desc_homepage = get_option('wonderm00n_open_graph_fb_desc_homepage');
87
  global $wp_query;
88
  //Other pages - Defaults
89
  $fb_title=esc_attr(strip_tags(stripslashes(get_bloginfo('name'))));
90
+ $fb_url=get_option('siteurl').(intval($fb_url_add_trailing)==1 ? '/' : '');
91
  switch(trim($fb_desc_homepage)) {
92
  case 'custom':
93
  $fb_desc=esc_attr(strip_tags(stripslashes($fb_desc_homepage_customtext)));
141
  }
142
  } else {
143
  if (is_front_page()) {
144
+ $fb_type=trim($fb_type_homepage=='' ? 'website' : $fb_type_homepage);
145
  } else {
146
  //Others... Defaults already set up there
147
  }
160
  if (intval($fb_app_id_show)==1 && trim($fb_app_id)!='') $html.='<meta property="fb:app_id" content="'.trim($fb_app_id).'" />
161
  ';
162
  if (intval($fb_admin_id_show)==1 && trim($fb_admin_id)!='') $html.='<meta property="fb:admins" content="'.trim($fb_admin_id).'" />
163
+ ';
164
+ if (intval($fb_locale_show)==1) $html.='<meta property="og:locale" content="'.trim(trim($fb_locale)!='' ? trim($fb_locale) : trim(get_locale())).'" />
165
  ';
166
  if (intval($fb_sitename_show)==1) $html.='<meta property="og:site_name" content="'.get_bloginfo('name').'" />
167
  ';
215
  update_option("wonderm00n_open_graph_activated", 1);
216
  update_option("wonderm00n_open_graph_fb_admin_id_show", 0);
217
  update_option("wonderm00n_open_graph_fb_app_id_show", 0);
218
+ update_option("wonderm00n_open_graph_fb_locale_show", 1);
219
  update_option("wonderm00n_open_graph_fb_sitename_show", 1);
220
  update_option("wonderm00n_open_graph_fb_title_show", 1);
221
  update_option("wonderm00n_open_graph_fb_url_show", 1);
256
  update_option('wonderm00n_open_graph_fb_app_id', trim($_POST['fb_app_id']));
257
  update_option('wonderm00n_open_graph_fb_admin_id_show', intval($_POST['fb_admin_id_show']));
258
  update_option('wonderm00n_open_graph_fb_admin_id', trim($_POST['fb_admin_id']));
259
+ update_option('wonderm00n_open_graph_fb_locale_show', intval($_POST['fb_locale_show']));
260
+ update_option('wonderm00n_open_graph_fb_locale', trim($_POST['fb_locale']));
261
  update_option('wonderm00n_open_graph_fb_sitename_show', intval($_POST['fb_sitename_show']));
262
  update_option('wonderm00n_open_graph_fb_title_show', intval($_POST['fb_title_show']));
263
  update_option('wonderm00n_open_graph_fb_url_show', intval($_POST['fb_url_show']));
264
+ update_option('wonderm00n_open_graph_fb_url_add_trailing', intval($_POST['fb_url_add_trailing']));
265
  update_option('wonderm00n_open_graph_fb_type_show', intval($_POST['fb_type_show']));
266
+ update_option('wonderm00n_open_graph_fb_type_homepage', trim($_POST['fb_type_homepage']));
267
  update_option('wonderm00n_open_graph_fb_desc_show', intval($_POST['fb_desc_show']));
268
  update_option('wonderm00n_open_graph_fb_desc_chars', intval($_POST['fb_desc_chars']));
269
  update_option('wonderm00n_open_graph_fb_desc_homepage', trim($_POST['fb_desc_homepage']));