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

Version Description

  • Default og:type to website on non-singular pages because Facebook deprecated it (Thanks @alexiswilke)
  • Automatically disable the overlay feature if GD is not installed (Thanks @tiagomagalhaes)
  • Set og:type to website instead of article when a page is set as a blog page
  • Use image from the page (our custom field, featured, etc...) when a page is set as a blog page (Thanks @alexiswilke)
  • Use description from our custom field when a page is set as a blog page
  • Adds the product:availability tag for WooCommerce products (Thanks @steveokk)
  • Improved the FAQ
Download this release

Release Info

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

Code changes from version 2.1.6.1 to 2.1.6.2

admin/options-page-facebook.php CHANGED
@@ -122,14 +122,17 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
122
  <tr class="fb_type_options">
123
  <th><?php _e( 'Homepage Type', 'wonderm00ns-simple-facebook-open-graph-tags' );?>:</th>
124
  <td>
125
- <select name="wonderm00n_open_graph_settings[fb_type_homepage]" id="fb_type_homepage">
 
 
126
  <option value="website"<?php if (trim($options['fb_type_homepage'])=='' || trim($options['fb_type_homepage'])=='website') echo ' selected="selected"'; ?>>website</option>
127
  <option value="blog"<?php if (trim($options['fb_type_homepage'])=='blog') echo ' selected="selected"'; ?>>blog</option>
128
- </select>
129
  </td>
130
  </tr>
131
  <tr class="fb_type_options">
132
  <td colspan="2" class="info">
 
133
  </td>
134
  </tr>
135
 
122
  <tr class="fb_type_options">
123
  <th><?php _e( 'Homepage Type', 'wonderm00ns-simple-facebook-open-graph-tags' );?>:</th>
124
  <td>
125
+ website
126
+ <input type="hidden" name="wonderm00n_open_graph_settings[fb_type_homepage]" value="website"/>
127
+ <!--<select name="wonderm00n_open_graph_settings[fb_type_homepage]" id="fb_type_homepage">
128
  <option value="website"<?php if (trim($options['fb_type_homepage'])=='' || trim($options['fb_type_homepage'])=='website') echo ' selected="selected"'; ?>>website</option>
129
  <option value="blog"<?php if (trim($options['fb_type_homepage'])=='blog') echo ' selected="selected"'; ?>>blog</option>
130
+ </select>-->
131
  </td>
132
  </tr>
133
  <tr class="fb_type_options">
134
  <td colspan="2" class="info">
135
+ - <?php _e( 'Facebook does not support <i>blog</i> anymore, so we have to default to <i>website</i>', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
136
  </td>
137
  </tr>
138
 
admin/options-page-general.php CHANGED
@@ -165,35 +165,48 @@ global $webdados_fb;
165
  <tr>
166
  <th><?php _e( 'Overlay PNG logo', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>:</th>
167
  <td>
168
- <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_overlay]" id="fb_image_overlay" value="1" <?php echo (intval($options['fb_image_overlay'])==1 ? ' checked="checked"' : '' ); ?>/>
169
- </td>
170
- </tr>
171
- <tr>
172
- <td colspan="2" class="info">
173
- - <?php _e('Experimental', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>
174
- <br/>
175
- - <?php printf( __( 'The original image will be resized/cropped to %dx%dpx and the chosen PNG (that should also have this size) will be overlaid on it. It will only work for locally hosted images.', 'wonderm00ns-simple-facebook-open-graph-tags' ), WEBDADOS_FB_W, WEBDADOS_FB_H);?>
176
- <br/>
177
- - <?php printf( __( 'You can see an example of the end result <a href="%s" target="_blank">here</a>', '' ), 'https://www.flickr.com/photos/wonderm00n/29890263040/in/dateposted-public/' ); ?>
178
- <br/>
179
- - <?php printf( __( 'If you activate this option globally, you can disable it based on your conditions using the <i>%1$s</i> filter', 'wonderm00ns-simple-facebook-open-graph-tags' ), 'fb_og_image_overlay' ); ?>
180
- </td>
181
- </tr>
182
-
183
- <tr class="fb_image_overlay_options">
184
- <th><?php _e( 'PNG logo', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>:</th>
185
- <td>
186
- <input type="text" name="wonderm00n_open_graph_settings[fb_image_overlay_image]" id="fb_image_overlay_image" size="45" value="<?php echo trim(esc_attr($options['fb_image_overlay_image'])); ?>"/>
187
- <input id="fb_image_overlay_button" class="button" type="button" value="<?php echo esc_attr( __('Upload/Choose', 'wonderm00ns-simple-facebook-open-graph-tags') ); ?>" />
188
- </td>
189
- </tr>
190
- <tr class="fb_image_overlay_options">
191
- <td colspan="2" class="info">
192
- - <?php _e( 'URL (with http(s)://)', 'wonderm00ns-simple-facebook-open-graph-tags' );?>
193
- <br/>
194
- - <?php printf( __( 'Size: %dx%dpx', 'wonderm00ns-simple-facebook-open-graph-tags' ), WEBDADOS_FB_W, WEBDADOS_FB_H); ?>
195
  </td>
196
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
 
198
  <tr>
199
  <th><?php _e( 'Add image to RSS/RSS2 feeds', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>:</th>
165
  <tr>
166
  <th><?php _e( 'Overlay PNG logo', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>:</th>
167
  <td>
168
+ <?php if ( extension_loaded('gd') ) { ?>
169
+ <input type="checkbox" name="wonderm00n_open_graph_settings[fb_image_overlay]" id="fb_image_overlay" value="1" <?php echo (intval($options['fb_image_overlay'])==1 ? ' checked="checked"' : '' ); ?>/>
170
+ <?php } else { ?>
171
+ <?php _e( 'No', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
172
+ <input type="hidden" name="wonderm00n_open_graph_settings[fb_image_overlay]" id="fb_image_overlay" value="0"/>
173
+ <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  </td>
175
  </tr>
176
+ <?php if ( extension_loaded('gd') ) { ?>
177
+ <tr>
178
+ <td colspan="2" class="info">
179
+ - <?php _e('Experimental', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>
180
+ <br/>
181
+ - <?php printf( __( 'The original image will be resized/cropped to %dx%dpx and the chosen PNG (that should also have this size) will be overlaid on it. It will only work for locally hosted images.', 'wonderm00ns-simple-facebook-open-graph-tags' ), WEBDADOS_FB_W, WEBDADOS_FB_H);?>
182
+ <br/>
183
+ - <?php printf( __( 'You can see an example of the end result <a href="%s" target="_blank">here</a>', '' ), 'https://www.flickr.com/photos/wonderm00n/29890263040/in/dateposted-public/' ); ?>
184
+ <br/>
185
+ - <?php printf( __( 'If you activate this option globally, you can disable it based on your conditions using the <i>%1$s</i> filter', 'wonderm00ns-simple-facebook-open-graph-tags' ), 'fb_og_image_overlay' ); ?>
186
+ </td>
187
+ </tr>
188
+
189
+ <tr class="fb_image_overlay_options">
190
+ <th><?php _e( 'PNG logo', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>:</th>
191
+ <td>
192
+ <input type="text" name="wonderm00n_open_graph_settings[fb_image_overlay_image]" id="fb_image_overlay_image" size="45" value="<?php echo trim(esc_attr($options['fb_image_overlay_image'])); ?>"/>
193
+ <input id="fb_image_overlay_button" class="button" type="button" value="<?php echo esc_attr( __('Upload/Choose', 'wonderm00ns-simple-facebook-open-graph-tags') ); ?>" />
194
+ </td>
195
+ </tr>
196
+ <tr class="fb_image_overlay_options">
197
+ <td colspan="2" class="info">
198
+ - <?php _e( 'URL (with http(s)://)', 'wonderm00ns-simple-facebook-open-graph-tags' );?>
199
+ <br/>
200
+ - <?php printf( __( 'Size: %dx%dpx', 'wonderm00ns-simple-facebook-open-graph-tags' ), WEBDADOS_FB_W, WEBDADOS_FB_H); ?>
201
+ </td>
202
+ </tr>
203
+ <?php } else { ?>
204
+ <tr>
205
+ <td colspan="2" class="info">
206
+ - <?php printf( __( 'You need the <a href="%s" target="_blank">PHP GD library</a> to use this feature. Please ask your hosting company to enable it.', 'wonderm00ns-simple-facebook-open-graph-tags' ), 'http://php.net/manual/en/book.image.php' ); ?>
207
+ </td>
208
+ </tr>
209
+ <?php } ?>
210
 
211
  <tr>
212
  <th><?php _e( 'Add image to RSS/RSS2 feeds', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>:</th>
includes/class-webdados-fb-open-graph.php CHANGED
@@ -191,6 +191,11 @@ class Webdados_FB {
191
  }
192
  }
193
  }
 
 
 
 
 
194
  return $user_options;
195
  }
196
 
191
  }
192
  }
193
  }
194
+ //Some defaults...
195
+ //Default type to 'website' - https://wordpress.org/support/topic/the-ogtype-blog-is-not-valid-anymore/
196
+ $user_options['fb_type_homepage'] = 'website';
197
+ //No GD? No overlay
198
+ if ( !extension_loaded('gd') ) $user_options['fb_image_overlay'] = 0;
199
  return $user_options;
200
  }
201
 
lang/wonderm00ns-simple-facebook-open-graph-tags.pot CHANGED
@@ -4,7 +4,7 @@ msgstr ""
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Facebook Open Graph, Google+ and Twitter Card Tags "
6
  "2.0.3\n"
7
- "POT-Creation-Date: 2017-12-23 13:41+0000\n"
8
  "PO-Revision-Date: 2016-09-26 14:52+0100\n"
9
  "Last-Translator: \n"
10
  "Language-Team: \n"
@@ -45,7 +45,7 @@ msgid "Use this image"
45
  msgstr ""
46
 
47
  #: admin/class-webdados-fb-open-graph-admin.php:120
48
- #: admin/options-page-general.php:121 admin/options-page-general.php:187
49
  msgid "Upload/Choose"
50
  msgstr ""
51
 
@@ -213,7 +213,7 @@ msgstr ""
213
  #: admin/options-page-3rdparty.php:167 admin/options-page-facebook.php:28
214
  #: admin/options-page-facebook.php:56 admin/options-page-facebook.php:70
215
  #: admin/options-page-facebook.php:86 admin/options-page-facebook.php:118
216
- #: admin/options-page-facebook.php:294 admin/options-page-general.php:130
217
  #: admin/options-page-schema.php:28 admin/options-page-schema.php:42
218
  #: admin/options-page-schema.php:56 admin/options-page-schema.php:74
219
  #: admin/options-page-seo.php:36 admin/options-page-seo.php:58
@@ -321,7 +321,7 @@ msgstr ""
321
  msgid "Include Image Dimensions"
322
  msgstr ""
323
 
324
- #: admin/options-page-facebook.php:98 admin/options-page-facebook.php:158
325
  msgid "and"
326
  msgstr ""
327
 
@@ -351,141 +351,147 @@ msgstr ""
351
  msgid "Homepage Type"
352
  msgstr ""
353
 
354
- #: admin/options-page-facebook.php:137 admin/options-page-schema.php:111
 
 
 
 
 
 
355
  #: admin/options-page-schema.php:125 admin/options-page-twitter.php:75
356
  msgid "Include Post/Page Author"
357
  msgstr ""
358
 
359
- #: admin/options-page-facebook.php:146
360
  msgid "The user's Facebook URL must be filled in on his profile"
361
  msgstr ""
362
 
363
- #: admin/options-page-facebook.php:151
364
  msgid "Include Published/Modified Dates"
365
  msgstr ""
366
 
367
- #: admin/options-page-facebook.php:160 admin/options-page-facebook.php:174
368
  msgid "For posts only"
369
  msgstr ""
370
 
371
- #: admin/options-page-facebook.php:165
372
  msgid "Include Article Sections"
373
  msgstr ""
374
 
375
- #: admin/options-page-facebook.php:174
376
  msgid "from the categories names"
377
  msgstr ""
378
 
379
- #: admin/options-page-facebook.php:179 admin/options-page-schema.php:138
380
  #: admin/options-page-seo.php:77 admin/options-page-twitter.php:89
381
  msgid "Include Publisher"
382
  msgstr ""
383
 
384
- #: admin/options-page-facebook.php:188 admin/options-page-facebook.php:214
385
  msgid "The website's Facebook Page"
386
  msgstr ""
387
 
388
- #: admin/options-page-facebook.php:193
389
  msgid "Website's Facebook Page"
390
  msgstr ""
391
 
392
- #: admin/options-page-facebook.php:200
393
  msgid "Facebook Page URL (with https://)"
394
  msgstr ""
395
 
396
- #: admin/options-page-facebook.php:205
397
  msgid "Include Locale"
398
  msgstr ""
399
 
400
- #: admin/options-page-facebook.php:219
401
  msgid "Locale"
402
  msgstr ""
403
 
404
- #: admin/options-page-facebook.php:261
405
  msgid "WordPress current locale/language"
406
  msgstr ""
407
 
408
- #: admin/options-page-facebook.php:282
409
  msgid "List loaded from Facebook (online)"
410
  msgstr ""
411
 
412
- #: admin/options-page-facebook.php:285
413
  msgid "List loaded from local cache (offline)"
414
  msgstr ""
415
 
416
- #: admin/options-page-facebook.php:286
417
  msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
418
  msgstr ""
419
 
420
- #: admin/options-page-facebook.php:286
421
  msgid "Reload from Facebook"
422
  msgstr ""
423
 
424
- #: admin/options-page-facebook.php:289
425
  msgid "List not loaded"
426
  msgstr ""
427
 
428
- #: admin/options-page-facebook.php:299
429
  msgid "Include Facebook Admin(s) ID"
430
  msgstr ""
431
 
432
- #: admin/options-page-facebook.php:311
433
  msgid "Facebook Admin(s) ID"
434
  msgstr ""
435
 
436
- #: admin/options-page-facebook.php:318
437
  msgid "Comma separated if more than one"
438
  msgstr ""
439
 
440
- #: admin/options-page-facebook.php:323
441
  msgid "Include Facebook Platform App ID"
442
  msgstr ""
443
 
444
- #: admin/options-page-facebook.php:335
445
  msgid "Facebook Platform App ID"
446
  msgstr ""
447
 
448
- #: admin/options-page-facebook.php:342
449
  msgid "From your Facebook Developers dashboard"
450
  msgstr ""
451
 
452
- #: admin/options-page-facebook.php:346
453
  msgid "Declaration Method"
454
  msgstr ""
455
 
456
- #: admin/options-page-facebook.php:356
457
  msgid "or"
458
  msgstr ""
459
 
460
- #: admin/options-page-facebook.php:358
461
  msgid ""
462
  "Prefix is recommended because it validates properly with the W3C validator, "
463
  "xmlns is the legacy method"
464
  msgstr ""
465
 
466
- #: admin/options-page-facebook.php:367
467
  msgid "Facebook Open Graph Tags cache"
468
  msgstr ""
469
 
470
- #: admin/options-page-facebook.php:373
471
  msgid "Clear cache"
472
  msgstr ""
473
 
474
- #: admin/options-page-facebook.php:380
475
  msgid ""
476
  "Try to clear the Facebook Open Graph Tags cache when saving a post or page, "
477
  "so the link preview on Facebook is immediately updated"
478
  msgstr ""
479
 
480
- #: admin/options-page-facebook.php:385
481
  msgid "App ID"
482
  msgstr ""
483
 
484
- #: admin/options-page-facebook.php:392
485
  msgid "App Secret"
486
  msgstr ""
487
 
488
- #: admin/options-page-facebook.php:399
489
  #, php-format
490
  msgid ""
491
  "Facebook no longer allows updating the cache anonymously, so you have to use "
@@ -493,24 +499,24 @@ msgid ""
493
  "how to do it."
494
  msgstr ""
495
 
496
- #: admin/options-page-facebook.php:401
497
  msgid ""
498
  "If you are using the (now deprecated) <i>fb_og_update_cache_url</i> filter, "
499
  "this ID and Secret will NOT be used. You should stop using the filter and "
500
  "use these settings."
501
  msgstr ""
502
 
503
- #: admin/options-page-facebook.php:403
504
  msgid ""
505
  "Please do not ask for support regarding this feature. Everything is "
506
  "explained in the blog post linked above."
507
  msgstr ""
508
 
509
- #: admin/options-page-facebook.php:408
510
  msgid "Suppress cache notices"
511
  msgstr ""
512
 
513
- #: admin/options-page-facebook.php:415
514
  msgid ""
515
  "Sometimes we aren't able to update the cache and the post author will see a "
516
  "notice if this option is not checked"
@@ -591,7 +597,7 @@ msgstr ""
591
  msgid "Default image"
592
  msgstr ""
593
 
594
- #: admin/options-page-general.php:126 admin/options-page-general.php:192
595
  msgid "URL (with http(s)://)"
596
  msgstr ""
597
 
@@ -626,12 +632,16 @@ msgid ""
626
  "is always used."
627
  msgstr ""
628
 
629
- #: admin/options-page-general.php:173 admin/options-page-general.php:234
 
 
 
 
630
  #: admin/options-page-schema.php:70
631
  msgid "Experimental"
632
  msgstr ""
633
 
634
- #: admin/options-page-general.php:175
635
  #, php-format
636
  msgid ""
637
  "The original image will be resized/cropped to %dx%dpx and the chosen PNG "
@@ -639,111 +649,118 @@ msgid ""
639
  "for locally hosted images."
640
  msgstr ""
641
 
642
- #: admin/options-page-general.php:177
643
  #, php-format
644
  msgid ""
645
  "You can see an example of the end result <a href=\"%s\" target=\"_blank"
646
  "\">here</a>"
647
  msgstr ""
648
 
649
- #: admin/options-page-general.php:179
650
  #, php-format
651
  msgid ""
652
  "If you activate this option globally, you can disable it based on your "
653
  "conditions using the <i>%1$s</i> filter"
654
  msgstr ""
655
 
656
- #: admin/options-page-general.php:184
657
  msgid "PNG logo"
658
  msgstr ""
659
 
660
- #: admin/options-page-general.php:194
661
  #, php-format
662
  msgid "Size: %dx%dpx"
663
  msgstr ""
664
 
665
- #: admin/options-page-general.php:199
 
 
 
 
 
 
 
666
  msgid "Add image to RSS/RSS2 feeds"
667
  msgstr ""
668
 
669
- #: admin/options-page-general.php:206
670
  msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
671
  msgstr ""
672
 
673
- #: admin/options-page-general.php:211
674
  msgid "Force getimagesize on local file"
675
  msgstr ""
676
 
677
- #: admin/options-page-general.php:218 admin/options-page-general.php:236
678
  msgid ""
679
  "This is an advanced option: Don't mess with this unless you know what you're "
680
  "doing"
681
  msgstr ""
682
 
683
- #: admin/options-page-general.php:220
684
  msgid "Force getimagesize on local file even if allow_url_fopen=1"
685
  msgstr ""
686
 
687
- #: admin/options-page-general.php:222
688
  msgid ""
689
  "May cause problems with some multisite configurations but fixes \"HTTP "
690
  "request failed\" errors"
691
  msgstr ""
692
 
693
- #: admin/options-page-general.php:227
694
  msgid "Do not get image size"
695
  msgstr ""
696
 
697
- #: admin/options-page-general.php:238
698
  msgid ""
699
  "You should only activate this option if you're getting fatal errors (white "
700
  "screen of death) and only keep it active if this options does solve those "
701
  "errors"
702
  msgstr ""
703
 
704
- #: admin/options-page-general.php:240
705
  msgid ""
706
  "This can render the \"Add image to RSS/RSS2 feeds\" and \"Open Graph - "
707
  "Include Image Dimensions\" options useless"
708
  msgstr ""
709
 
710
- #: admin/options-page-general.php:251
711
  msgid "URL settings"
712
  msgstr ""
713
 
714
- #: admin/options-page-general.php:257
715
  msgid "Add trailing slash at the end"
716
  msgstr ""
717
 
718
- #: admin/options-page-general.php:264
719
  msgid "If missing, a trailing slash will be added at the end"
720
  msgstr ""
721
 
722
- #: admin/options-page-general.php:266
723
  msgid "Homepage example:"
724
  msgstr ""
725
 
726
- #: admin/options-page-general.php:275
727
  msgid "Author settings"
728
  msgstr ""
729
 
730
- #: admin/options-page-general.php:281
731
  msgid "Hide Author on Pages"
732
  msgstr ""
733
 
734
- #: admin/options-page-general.php:288
735
  msgid "Hides all Author tags on Pages"
736
  msgstr ""
737
 
738
- #: admin/options-page-general.php:297
739
  msgid "Other settings"
740
  msgstr ""
741
 
742
- #: admin/options-page-general.php:303
743
  msgid "Keep data on uninstall"
744
  msgstr ""
745
 
746
- #: admin/options-page-general.php:310
747
  msgid ""
748
  "Keep the plugin settings on the database even if the plugin is uninstalled"
749
  msgstr ""
@@ -970,13 +987,13 @@ msgstr ""
970
  msgid "Price"
971
  msgstr ""
972
 
973
- #: public/class-webdados-fb-open-graph-public.php:290
974
  msgid "Search for"
975
  msgstr ""
976
 
977
- #: public/class-webdados-fb-open-graph-public.php:299
978
- #: public/class-webdados-fb-open-graph-public.php:303
979
- #: public/class-webdados-fb-open-graph-public.php:307
980
  msgid "Archives"
981
  msgstr ""
982
 
4
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
  "Project-Id-Version: Facebook Open Graph, Google+ and Twitter Card Tags "
6
  "2.0.3\n"
7
+ "POT-Creation-Date: 2017-12-23 17:11+0000\n"
8
  "PO-Revision-Date: 2016-09-26 14:52+0100\n"
9
  "Last-Translator: \n"
10
  "Language-Team: \n"
45
  msgstr ""
46
 
47
  #: admin/class-webdados-fb-open-graph-admin.php:120
48
+ #: admin/options-page-general.php:121 admin/options-page-general.php:193
49
  msgid "Upload/Choose"
50
  msgstr ""
51
 
213
  #: admin/options-page-3rdparty.php:167 admin/options-page-facebook.php:28
214
  #: admin/options-page-facebook.php:56 admin/options-page-facebook.php:70
215
  #: admin/options-page-facebook.php:86 admin/options-page-facebook.php:118
216
+ #: admin/options-page-facebook.php:297 admin/options-page-general.php:130
217
  #: admin/options-page-schema.php:28 admin/options-page-schema.php:42
218
  #: admin/options-page-schema.php:56 admin/options-page-schema.php:74
219
  #: admin/options-page-seo.php:36 admin/options-page-seo.php:58
321
  msgid "Include Image Dimensions"
322
  msgstr ""
323
 
324
+ #: admin/options-page-facebook.php:98 admin/options-page-facebook.php:161
325
  msgid "and"
326
  msgstr ""
327
 
351
  msgid "Homepage Type"
352
  msgstr ""
353
 
354
+ #: admin/options-page-facebook.php:135
355
+ msgid ""
356
+ "Facebook does not support <i>blog</i> anymore, so we have to default to "
357
+ "<i>website</i>"
358
+ msgstr ""
359
+
360
+ #: admin/options-page-facebook.php:140 admin/options-page-schema.php:111
361
  #: admin/options-page-schema.php:125 admin/options-page-twitter.php:75
362
  msgid "Include Post/Page Author"
363
  msgstr ""
364
 
365
+ #: admin/options-page-facebook.php:149
366
  msgid "The user's Facebook URL must be filled in on his profile"
367
  msgstr ""
368
 
369
+ #: admin/options-page-facebook.php:154
370
  msgid "Include Published/Modified Dates"
371
  msgstr ""
372
 
373
+ #: admin/options-page-facebook.php:163 admin/options-page-facebook.php:177
374
  msgid "For posts only"
375
  msgstr ""
376
 
377
+ #: admin/options-page-facebook.php:168
378
  msgid "Include Article Sections"
379
  msgstr ""
380
 
381
+ #: admin/options-page-facebook.php:177
382
  msgid "from the categories names"
383
  msgstr ""
384
 
385
+ #: admin/options-page-facebook.php:182 admin/options-page-schema.php:138
386
  #: admin/options-page-seo.php:77 admin/options-page-twitter.php:89
387
  msgid "Include Publisher"
388
  msgstr ""
389
 
390
+ #: admin/options-page-facebook.php:191 admin/options-page-facebook.php:217
391
  msgid "The website's Facebook Page"
392
  msgstr ""
393
 
394
+ #: admin/options-page-facebook.php:196
395
  msgid "Website's Facebook Page"
396
  msgstr ""
397
 
398
+ #: admin/options-page-facebook.php:203
399
  msgid "Facebook Page URL (with https://)"
400
  msgstr ""
401
 
402
+ #: admin/options-page-facebook.php:208
403
  msgid "Include Locale"
404
  msgstr ""
405
 
406
+ #: admin/options-page-facebook.php:222
407
  msgid "Locale"
408
  msgstr ""
409
 
410
+ #: admin/options-page-facebook.php:264
411
  msgid "WordPress current locale/language"
412
  msgstr ""
413
 
414
+ #: admin/options-page-facebook.php:285
415
  msgid "List loaded from Facebook (online)"
416
  msgstr ""
417
 
418
+ #: admin/options-page-facebook.php:288
419
  msgid "List loaded from local cache (offline)"
420
  msgstr ""
421
 
422
+ #: admin/options-page-facebook.php:289
423
  msgid "You\\'l lose any changes you haven\\'t saved. Are you sure?"
424
  msgstr ""
425
 
426
+ #: admin/options-page-facebook.php:289
427
  msgid "Reload from Facebook"
428
  msgstr ""
429
 
430
+ #: admin/options-page-facebook.php:292
431
  msgid "List not loaded"
432
  msgstr ""
433
 
434
+ #: admin/options-page-facebook.php:302
435
  msgid "Include Facebook Admin(s) ID"
436
  msgstr ""
437
 
438
+ #: admin/options-page-facebook.php:314
439
  msgid "Facebook Admin(s) ID"
440
  msgstr ""
441
 
442
+ #: admin/options-page-facebook.php:321
443
  msgid "Comma separated if more than one"
444
  msgstr ""
445
 
446
+ #: admin/options-page-facebook.php:326
447
  msgid "Include Facebook Platform App ID"
448
  msgstr ""
449
 
450
+ #: admin/options-page-facebook.php:338
451
  msgid "Facebook Platform App ID"
452
  msgstr ""
453
 
454
+ #: admin/options-page-facebook.php:345
455
  msgid "From your Facebook Developers dashboard"
456
  msgstr ""
457
 
458
+ #: admin/options-page-facebook.php:349
459
  msgid "Declaration Method"
460
  msgstr ""
461
 
462
+ #: admin/options-page-facebook.php:359
463
  msgid "or"
464
  msgstr ""
465
 
466
+ #: admin/options-page-facebook.php:361
467
  msgid ""
468
  "Prefix is recommended because it validates properly with the W3C validator, "
469
  "xmlns is the legacy method"
470
  msgstr ""
471
 
472
+ #: admin/options-page-facebook.php:370
473
  msgid "Facebook Open Graph Tags cache"
474
  msgstr ""
475
 
476
+ #: admin/options-page-facebook.php:376
477
  msgid "Clear cache"
478
  msgstr ""
479
 
480
+ #: admin/options-page-facebook.php:383
481
  msgid ""
482
  "Try to clear the Facebook Open Graph Tags cache when saving a post or page, "
483
  "so the link preview on Facebook is immediately updated"
484
  msgstr ""
485
 
486
+ #: admin/options-page-facebook.php:388
487
  msgid "App ID"
488
  msgstr ""
489
 
490
+ #: admin/options-page-facebook.php:395
491
  msgid "App Secret"
492
  msgstr ""
493
 
494
+ #: admin/options-page-facebook.php:402
495
  #, php-format
496
  msgid ""
497
  "Facebook no longer allows updating the cache anonymously, so you have to use "
499
  "how to do it."
500
  msgstr ""
501
 
502
+ #: admin/options-page-facebook.php:404
503
  msgid ""
504
  "If you are using the (now deprecated) <i>fb_og_update_cache_url</i> filter, "
505
  "this ID and Secret will NOT be used. You should stop using the filter and "
506
  "use these settings."
507
  msgstr ""
508
 
509
+ #: admin/options-page-facebook.php:406
510
  msgid ""
511
  "Please do not ask for support regarding this feature. Everything is "
512
  "explained in the blog post linked above."
513
  msgstr ""
514
 
515
+ #: admin/options-page-facebook.php:411
516
  msgid "Suppress cache notices"
517
  msgstr ""
518
 
519
+ #: admin/options-page-facebook.php:418
520
  msgid ""
521
  "Sometimes we aren't able to update the cache and the post author will see a "
522
  "notice if this option is not checked"
597
  msgid "Default image"
598
  msgstr ""
599
 
600
+ #: admin/options-page-general.php:126 admin/options-page-general.php:198
601
  msgid "URL (with http(s)://)"
602
  msgstr ""
603
 
632
  "is always used."
633
  msgstr ""
634
 
635
+ #: admin/options-page-general.php:171
636
+ msgid "No"
637
+ msgstr ""
638
+
639
+ #: admin/options-page-general.php:179 admin/options-page-general.php:247
640
  #: admin/options-page-schema.php:70
641
  msgid "Experimental"
642
  msgstr ""
643
 
644
+ #: admin/options-page-general.php:181
645
  #, php-format
646
  msgid ""
647
  "The original image will be resized/cropped to %dx%dpx and the chosen PNG "
649
  "for locally hosted images."
650
  msgstr ""
651
 
652
+ #: admin/options-page-general.php:183
653
  #, php-format
654
  msgid ""
655
  "You can see an example of the end result <a href=\"%s\" target=\"_blank"
656
  "\">here</a>"
657
  msgstr ""
658
 
659
+ #: admin/options-page-general.php:185
660
  #, php-format
661
  msgid ""
662
  "If you activate this option globally, you can disable it based on your "
663
  "conditions using the <i>%1$s</i> filter"
664
  msgstr ""
665
 
666
+ #: admin/options-page-general.php:190
667
  msgid "PNG logo"
668
  msgstr ""
669
 
670
+ #: admin/options-page-general.php:200
671
  #, php-format
672
  msgid "Size: %dx%dpx"
673
  msgstr ""
674
 
675
+ #: admin/options-page-general.php:206
676
+ #, php-format
677
+ msgid ""
678
+ "You need the <a href=\"%s\" target=\"_blank\">PHP GD library</a> to use this "
679
+ "feature. Please ask your hosting company to enable it."
680
+ msgstr ""
681
+
682
+ #: admin/options-page-general.php:212
683
  msgid "Add image to RSS/RSS2 feeds"
684
  msgstr ""
685
 
686
+ #: admin/options-page-general.php:219
687
  msgid "For auto-posting apps like RSS Graffiti, twitterfeed, ..."
688
  msgstr ""
689
 
690
+ #: admin/options-page-general.php:224
691
  msgid "Force getimagesize on local file"
692
  msgstr ""
693
 
694
+ #: admin/options-page-general.php:231 admin/options-page-general.php:249
695
  msgid ""
696
  "This is an advanced option: Don't mess with this unless you know what you're "
697
  "doing"
698
  msgstr ""
699
 
700
+ #: admin/options-page-general.php:233
701
  msgid "Force getimagesize on local file even if allow_url_fopen=1"
702
  msgstr ""
703
 
704
+ #: admin/options-page-general.php:235
705
  msgid ""
706
  "May cause problems with some multisite configurations but fixes \"HTTP "
707
  "request failed\" errors"
708
  msgstr ""
709
 
710
+ #: admin/options-page-general.php:240
711
  msgid "Do not get image size"
712
  msgstr ""
713
 
714
+ #: admin/options-page-general.php:251
715
  msgid ""
716
  "You should only activate this option if you're getting fatal errors (white "
717
  "screen of death) and only keep it active if this options does solve those "
718
  "errors"
719
  msgstr ""
720
 
721
+ #: admin/options-page-general.php:253
722
  msgid ""
723
  "This can render the \"Add image to RSS/RSS2 feeds\" and \"Open Graph - "
724
  "Include Image Dimensions\" options useless"
725
  msgstr ""
726
 
727
+ #: admin/options-page-general.php:264
728
  msgid "URL settings"
729
  msgstr ""
730
 
731
+ #: admin/options-page-general.php:270
732
  msgid "Add trailing slash at the end"
733
  msgstr ""
734
 
735
+ #: admin/options-page-general.php:277
736
  msgid "If missing, a trailing slash will be added at the end"
737
  msgstr ""
738
 
739
+ #: admin/options-page-general.php:279
740
  msgid "Homepage example:"
741
  msgstr ""
742
 
743
+ #: admin/options-page-general.php:288
744
  msgid "Author settings"
745
  msgstr ""
746
 
747
+ #: admin/options-page-general.php:294
748
  msgid "Hide Author on Pages"
749
  msgstr ""
750
 
751
+ #: admin/options-page-general.php:301
752
  msgid "Hides all Author tags on Pages"
753
  msgstr ""
754
 
755
+ #: admin/options-page-general.php:310
756
  msgid "Other settings"
757
  msgstr ""
758
 
759
+ #: admin/options-page-general.php:316
760
  msgid "Keep data on uninstall"
761
  msgstr ""
762
 
763
+ #: admin/options-page-general.php:323
764
  msgid ""
765
  "Keep the plugin settings on the database even if the plugin is uninstalled"
766
  msgstr ""
987
  msgid "Price"
988
  msgstr ""
989
 
990
+ #: public/class-webdados-fb-open-graph-public.php:300
991
  msgid "Search for"
992
  msgstr ""
993
 
994
+ #: public/class-webdados-fb-open-graph-public.php:309
995
+ #: public/class-webdados-fb-open-graph-public.php:313
996
+ #: public/class-webdados-fb-open-graph-public.php:317
997
  msgid "Archives"
998
  msgstr ""
999
 
public/class-webdados-fb-open-graph-public.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.6.1
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -96,7 +96,7 @@ class Webdados_FB_Public {
96
  $fb_desc_homepage = get_bloginfo( 'description' );
97
  break;
98
  }
99
-
100
  if ( is_singular() ) {
101
 
102
  global $post;
@@ -222,6 +222,16 @@ class Webdados_FB_Public {
222
  if ( function_exists('get_woocommerce_currency') ) $fb_additional_tags['name']['twitter_data1'] = array(
223
  $price.' '.get_woocommerce_currency()
224
  );
 
 
 
 
 
 
 
 
 
 
225
  //Additional product images?
226
  if ( intval($this->options['fb_image_show'])==1 && $this->options['fb_wc_useproductgallery']==1 ) {
227
  if ( $attachment_ids = version_compare( WC_VERSION, '3.0', '>=' ) ? $product->get_gallery_image_ids() : $product->get_gallery_attachment_ids() ) {
@@ -310,12 +320,29 @@ class Webdados_FB_Public {
310
  }
311
  }
312
  } else {
313
- if (is_front_page()) {
314
  $fb_url = get_option('home').(intval($this->options['fb_url_add_trailing'])==1 ? '/' : '');
315
  $fb_type = trim( $this->options['fb_type_homepage']=='' ? 'website' : $this->options['fb_type_homepage'] );
316
  $fb_desc = $fb_desc_homepage;
317
  } else {
318
- //Others... Defaults already set up there
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  }
320
  }
321
  }
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.6.2
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
96
  $fb_desc_homepage = get_bloginfo( 'description' );
97
  break;
98
  }
99
+
100
  if ( is_singular() ) {
101
 
102
  global $post;
222
  if ( function_exists('get_woocommerce_currency') ) $fb_additional_tags['name']['twitter_data1'] = array(
223
  $price.' '.get_woocommerce_currency()
224
  );
225
+ //Stock
226
+ if ( $product->is_in_stock() ) {
227
+ $fb_additional_tags['property']['product_availability'] = array(
228
+ 'instock'
229
+ );
230
+ } else {
231
+ $fb_additional_tags['property']['product_availability'] = array(
232
+ 'oos'
233
+ );
234
+ }
235
  //Additional product images?
236
  if ( intval($this->options['fb_image_show'])==1 && $this->options['fb_wc_useproductgallery']==1 ) {
237
  if ( $attachment_ids = version_compare( WC_VERSION, '3.0', '>=' ) ? $product->get_gallery_image_ids() : $product->get_gallery_attachment_ids() ) {
320
  }
321
  }
322
  } else {
323
+ if ( is_front_page() ) {
324
  $fb_url = get_option('home').(intval($this->options['fb_url_add_trailing'])==1 ? '/' : '');
325
  $fb_type = trim( $this->options['fb_type_homepage']=='' ? 'website' : $this->options['fb_type_homepage'] );
326
  $fb_desc = $fb_desc_homepage;
327
  } else {
328
+ if ( is_home() ) {
329
+ global $post;
330
+ if ( $post ) {
331
+ //Blog page
332
+ $fb_type = trim( $this->options['fb_type_homepage']=='' ? 'website' : $this->options['fb_type_homepage'] );
333
+ if ( $fb_desc = trim( get_post_meta($post->ID, '_webdados_fb_open_graph_specific_description', true) ) ) {
334
+ //OK - From our metabox
335
+ } else {
336
+ //Use default
337
+ $fb_desc = $fb_desc_homepage;
338
+ }
339
+ if ( intval($this->options['fb_image_show'])==1 || intval($this->options['fb_image_show_schema'])==1 || intval($this->options['fb_image_show_twitter'])==1 ) {
340
+ $fb_image = $this->get_post_image();
341
+ }
342
+ }
343
+ } else {
344
+ //Others... Defaults already set up there
345
+ }
346
  }
347
  }
348
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bit.ly/donate_fb_opengraph
4
  Tags: facebook, open graph, open graph protocol, share, social, meta, rss, twitter card, twitter, schema, google+, g+, google, google plus, image, like, seo, search engine optimization, woocommerce, yoast seo, wordpress seo, woocommerce, subheading, php7
5
  Requires at least: 4.5
6
  Tested up to: 4.9.1
7
- Stable tag: 2.1.6.1
8
 
9
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
10
 
@@ -73,7 +73,7 @@ Our settings page is discreetly kept under "Options", as it should, instead of t
73
  = 3rd Party Integration: =
74
 
75
  * **[Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)**: Allows you to use title, url (canonical) and description from the Yoast SEO plugin.
76
- * **[WooCommerce](https://wordpress.org/plugins/woocommerce/)**: On product pages sets `og:type` to "product" and adds the price including tax to the `product:price` tags. Also allows you to use the Product Category thumbnails as Open Graph Image and have Product Gallery images as additional Open Graph Images
77
  * **[SubHeading](https://wordpress.org/extend/plugins/subheading/)**: Add the SubHeading to the post/page title.
78
  * **[Business Directory Plugin](https://wordpress.org/extend/plugins/business-directory-plugin/)**: Allows you to use BDP listing contents as Open Graph Tags.
79
 
@@ -82,7 +82,7 @@ Our settings page is discreetly kept under "Options", as it should, instead of t
82
 
83
  1. Use the included automatic install feature on your WordPress admin panel and search for “Facebook Open Graph, Google+ and Twitter Card Tags”.
84
  2. Activate the plugin through the `Plugins` menu in WordPress
85
- 3. Got to `Options`, `Facebook Open Graph, Google+ and Twitter Card Tags` to set it up
86
 
87
  == Frequently Asked Questions ==
88
 
@@ -108,6 +108,10 @@ Sometimes the plugin just can't update the Facebook cache itself and you may nee
108
  Yes, you can. Create a Facebook App and fill in the details on the "Facebook Open Graph Tags cache" panel of the plugin settings page.
109
  Do NOT ask us support on this. There is [a blog post on our website](https://www.webdados.pt/2017/12/successfully-update-facebook-cache-using-our-facebook-open-graph-plugin/) explaining everything you need to do.
110
 
 
 
 
 
111
  = Can this plugin get content from "random plugin"? =
112
 
113
  If there's a popular plugin you think we could get content from to use on the meta tags, use the support forum to tell us that.
@@ -143,6 +147,15 @@ We DO NOT provide email support for this plugin. If you send us an email asking
143
 
144
  == Changelog ==
145
 
 
 
 
 
 
 
 
 
 
146
  = 2.1.6.1 =
147
  * Updated the error message when the Facebook cache is not updated, in order to include instructions and a link to setup the App ID and Secret
148
 
4
  Tags: facebook, open graph, open graph protocol, share, social, meta, rss, twitter card, twitter, schema, google+, g+, google, google plus, image, like, seo, search engine optimization, woocommerce, yoast seo, wordpress seo, woocommerce, subheading, php7
5
  Requires at least: 4.5
6
  Tested up to: 4.9.1
7
+ Stable tag: 2.1.6.2
8
 
9
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
10
 
73
  = 3rd Party Integration: =
74
 
75
  * **[Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)**: Allows you to use title, url (canonical) and description from the Yoast SEO plugin.
76
+ * **[WooCommerce](https://wordpress.org/plugins/woocommerce/)**: On product pages sets `og:type` to "product" and adds the price including tax to the `product:price` and `product:availability` tags. Also allows you to use the Product Category thumbnails as Open Graph Image and have Product Gallery images as additional Open Graph Images
77
  * **[SubHeading](https://wordpress.org/extend/plugins/subheading/)**: Add the SubHeading to the post/page title.
78
  * **[Business Directory Plugin](https://wordpress.org/extend/plugins/business-directory-plugin/)**: Allows you to use BDP listing contents as Open Graph Tags.
79
 
82
 
83
  1. Use the included automatic install feature on your WordPress admin panel and search for “Facebook Open Graph, Google+ and Twitter Card Tags”.
84
  2. Activate the plugin through the `Plugins` menu in WordPress
85
+ 3. Go to `Options`, `Facebook Open Graph, Google+ and Twitter Card Tags` to set it up
86
 
87
  == Frequently Asked Questions ==
88
 
108
  Yes, you can. Create a Facebook App and fill in the details on the "Facebook Open Graph Tags cache" panel of the plugin settings page.
109
  Do NOT ask us support on this. There is [a blog post on our website](https://www.webdados.pt/2017/12/successfully-update-facebook-cache-using-our-facebook-open-graph-plugin/) explaining everything you need to do.
110
 
111
+ = Facebook says "The following required properties are missing: fb:app_id". Should I worry? =
112
+
113
+ No. Move along.
114
+
115
  = Can this plugin get content from "random plugin"? =
116
 
117
  If there's a popular plugin you think we could get content from to use on the meta tags, use the support forum to tell us that.
147
 
148
  == Changelog ==
149
 
150
+ = 2.1.6.2 =
151
+ * Default `og:type` to `website` on non-singular pages because Facebook deprecated it (Thanks @alexiswilke)
152
+ * Automatically disable the overlay feature if GD is not installed (Thanks @tiagomagalhaes)
153
+ * Set `og:type` to `website` instead of `article` when a page is set as a blog page
154
+ * Use image from the page (our custom field, featured, etc...) when a page is set as a blog page (Thanks @alexiswilke)
155
+ * Use description from our custom field when a page is set as a blog page
156
+ * Adds the `product:availability` tag for WooCommerce products (Thanks @steveokk)
157
+ * Improved the FAQ
158
+
159
  = 2.1.6.1 =
160
  * Updated the error message when the Facebook cache is not updated, in order to include instructions and a link to setup the App ID and Secret
161
 
wonderm00n-open-graph.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.6.1
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
8
  Plugin URI: https://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
9
  Description: Inserts Facebook Open Graph, Google+/Schema.org, Twitter Card and SEO Meta Tags into your WordPress Blog/Website for more effective and efficient Facebook, Google+ and Twitter 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
 
11
- Version: 2.1.6.1
12
  Author: Webdados
13
  Author URI: https://www.webdados.pt
14
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
@@ -18,7 +18,7 @@ WC tested up to: 3.2.6
18
 
19
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
 
21
- define( 'WEBDADOS_FB_VERSION', '2.1.6.1' );
22
  define( 'WEBDADOS_FB_PLUGIN_NAME', 'Facebook Open Graph, Google+ and Twitter Card Tags' );
23
  define( 'WEBDADOS_FB_W', 1200 );
24
  define( 'WEBDADOS_FB_H', 630 );
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.6.2
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
8
  Plugin URI: https://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
9
  Description: Inserts Facebook Open Graph, Google+/Schema.org, Twitter Card and SEO Meta Tags into your WordPress Blog/Website for more effective and efficient Facebook, Google+ and Twitter 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
 
11
+ Version: 2.1.6.2
12
  Author: Webdados
13
  Author URI: https://www.webdados.pt
14
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
18
 
19
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
 
21
+ define( 'WEBDADOS_FB_VERSION', '2.1.6.2' );
22
  define( 'WEBDADOS_FB_PLUGIN_NAME', 'Facebook Open Graph, Google+ and Twitter Card Tags' );
23
  define( 'WEBDADOS_FB_W', 1200 );
24
  define( 'WEBDADOS_FB_H', 630 );