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

Version Description

  • Added a "Share this on Facebook" button to the "Post updated" notice
  • Fixed some URLs and links from http:// to https://
  • Removed the option to load Facebook locales from their website as the URL now returns 404
Download this release

Release Info

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

Code changes from version 2.1.4.2 to 2.1.4.3

admin/class-webdados-fb-open-graph-admin.php CHANGED
@@ -283,7 +283,7 @@ class Webdados_FB_Admin {
283
  case '1':
284
  ?>
285
  <div class="updated">
286
- <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a></p>
287
  </div>
288
  <?php
289
  break;
@@ -319,7 +319,7 @@ class Webdados_FB_Admin {
319
  global $post;
320
  ?>
321
  <div class="updated">
322
- <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a href="http://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a></p>
323
  </div>
324
  <?php
325
  } else {
@@ -351,8 +351,13 @@ class Webdados_FB_Admin {
351
  ( isset($_GET['wd_fb_og_status']) && intval($_GET['wd_fb_og_status'])!=1 )
352
  ) {
353
  foreach ( $messages as $type => $messages1 ) {
 
 
354
  if ( isset($messages1[1]) ) { //Post updated
355
- $messages[$type][1].=' <a class="button button-small" style="margin: 0px 1em;" href="'.esc_url( 'https://developers.facebook.com/tools/debug/sharing/?q='.urlencode(get_permalink($post->ID)) ).'" target="_blank">'.__( 'Manually update Facebook cache', '' ).'</a>';
 
 
 
356
  }
357
  }
358
  }
283
  case '1':
284
  ?>
285
  <div class="updated">
286
+ <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a></p>
287
  </div>
288
  <?php
289
  break;
319
  global $post;
320
  ?>
321
  <div class="updated">
322
+ <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a href="https://www.facebook.com/sharer.php?u=<?php echo urlencode(get_permalink($post->ID));?>" target="_blank"><?php _e('Share this on Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a></p>
323
  </div>
324
  <?php
325
  } else {
351
  ( isset($_GET['wd_fb_og_status']) && intval($_GET['wd_fb_og_status'])!=1 )
352
  ) {
353
  foreach ( $messages as $type => $messages1 ) {
354
+ $buttons = ' <a class="button button-small" style="margin: 0px 1em;" href="'.esc_url( 'https://developers.facebook.com/tools/debug/sharing/?q='.urlencode(get_permalink($post->ID)) ).'" target="_blank">'.__( 'Manually update Facebook cache', 'wonderm00ns-simple-facebook-open-graph-tags' ).'</a>
355
+ <a class="button button-small" style="margin: 0px 1em;" href="'.esc_url( 'https://www.facebook.com/sharer.php?u='.urlencode(get_permalink($post->ID)) ).'" target="_blank">'.__( 'Share this on Facebook', 'wonderm00ns-simple-facebook-open-graph-tags' ).'</a>';
356
  if ( isset($messages1[1]) ) { //Post updated
357
+ $messages[$type][1].=$buttons;
358
+ }
359
+ if ( isset($messages1[6]) ) { //Post published
360
+ $messages[$type][6].=$buttons;
361
  }
362
  }
363
  }
admin/options-page-facebook.php CHANGED
@@ -225,7 +225,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
225
  //Online
226
  if (!empty($_GET['localeOnline'])) {
227
  if (intval($_GET['localeOnline'])==1) {
228
- if ($ch = curl_init('http://www.facebook.com/translations/FacebookLocales.xml')) {
229
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
230
  $fb_locales=curl_exec($ch);
231
  if (curl_errno($ch)) {
@@ -282,7 +282,9 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
282
  _e('List loaded from Facebook (online)', 'wonderm00ns-simple-facebook-open-graph-tags');
283
  } else {
284
  if ($loadedOffline) {
285
- _e('List loaded from local cache (offline)', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> - <a href="?page=class-webdados-fb-open-graph-admin.php&amp;localeOnline=1" onClick="return(confirm('<?php _e('You\\\'l lose any changes you haven\\\'t saved. Are you sure?', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>'));"><?php _e('Reload from Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a><?php
 
 
286
  } else {
287
  _e('List not loaded', 'wonderm00ns-simple-facebook-open-graph-tags');
288
  }
225
  //Online
226
  if (!empty($_GET['localeOnline'])) {
227
  if (intval($_GET['localeOnline'])==1) {
228
+ if ($ch = curl_init('https://www.facebook.com/translations/FacebookLocales.xml')) {
229
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
230
  $fb_locales=curl_exec($ch);
231
  if (curl_errno($ch)) {
282
  _e('List loaded from Facebook (online)', 'wonderm00ns-simple-facebook-open-graph-tags');
283
  } else {
284
  if ($loadedOffline) {
285
+ _e('List loaded from local cache (offline)', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>
286
+ <!-- - <a href="?page=class-webdados-fb-open-graph-admin.php&amp;localeOnline=1" onClick="return(confirm('<?php _e('You\\\'l lose any changes you haven\\\'t saved. Are you sure?', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>'));"><?php _e('Reload from Facebook', 'wonderm00ns-simple-facebook-open-graph-tags'); ?></a>-->
287
+ <?php
288
  } else {
289
  _e('List not loaded', 'wonderm00ns-simple-facebook-open-graph-tags');
290
  }
admin/options-page-right.php CHANGED
@@ -29,19 +29,19 @@
29
  ),
30
  30 => array(
31
  'text' => __('Plugin official URL', 'wonderm00ns-simple-facebook-open-graph-tags'),
32
- 'url' => 'http://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/'.$out_link_utm,
33
  ),
34
  40 => array(
35
  'text' => __('Author\'s website: Webdados', 'wonderm00ns-simple-facebook-open-graph-tags'),
36
- 'url' => 'http://www.webdados.pt/'.$out_link_utm,
37
  ),
38
  50 => array(
39
  'text' => __('Author\'s Facebook page: Webdados', 'wonderm00ns-simple-facebook-open-graph-tags'),
40
- 'url' => 'http://www.facebook.com/Webdados',
41
  ),
42
  60 => array(
43
  'text' => __('Author\'s Twitter account: @Wonderm00n<br/>(Webdados founder)', 'wonderm00ns-simple-facebook-open-graph-tags'),
44
- 'url' => 'http://twitter.com/wonderm00n',
45
  ),
46
  );
47
 
@@ -56,7 +56,7 @@
56
  <h4><?php _e('Support forum', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>:</h4>
57
  <p><a href="https://wordpress.org/support/plugin/wonderm00ns-simple-facebook-open-graph-tags" target="_blank">WordPress.org</a></p>
58
  <h4><?php _e('Premium technical support or custom WordPress development', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>:</h4>
59
- <p id="webdadoslink"><a href="http://www.webdados.pt/contactos/<?php echo esc_attr($out_link_utm); ?>" title="<?php echo esc_attr(sprintf(__('Please contact %s', 'wonderm00ns-simple-facebook-open-graph-tags'), 'Webdados')); ?>" target="_blank"><img src="<?php echo plugins_url('webdados.png', __FILE__); ?>"/></a></p>
60
  <h4><?php _e('Please rate our plugin at WordPress.org', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>:</h4>
61
  <a href="https://wordpress.org/support/view/plugin-reviews/wonderm00ns-simple-facebook-open-graph-tags?filter=5#postform" target="_blank" style="text-align: center; display: block;">
62
  <div class="star-rating"><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div></div>
29
  ),
30
  30 => array(
31
  'text' => __('Plugin official URL', 'wonderm00ns-simple-facebook-open-graph-tags'),
32
+ 'url' => 'https://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/'.$out_link_utm,
33
  ),
34
  40 => array(
35
  'text' => __('Author\'s website: Webdados', 'wonderm00ns-simple-facebook-open-graph-tags'),
36
+ 'url' => 'https://www.webdados.pt/'.$out_link_utm,
37
  ),
38
  50 => array(
39
  'text' => __('Author\'s Facebook page: Webdados', 'wonderm00ns-simple-facebook-open-graph-tags'),
40
+ 'url' => 'https://www.facebook.com/Webdados',
41
  ),
42
  60 => array(
43
  'text' => __('Author\'s Twitter account: @Wonderm00n<br/>(Webdados founder)', 'wonderm00ns-simple-facebook-open-graph-tags'),
44
+ 'url' => 'https://twitter.com/wonderm00n',
45
  ),
46
  );
47
 
56
  <h4><?php _e('Support forum', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>:</h4>
57
  <p><a href="https://wordpress.org/support/plugin/wonderm00ns-simple-facebook-open-graph-tags" target="_blank">WordPress.org</a></p>
58
  <h4><?php _e('Premium technical support or custom WordPress development', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>:</h4>
59
+ <p id="webdadoslink"><a href="https://www.webdados.pt/contactos/<?php echo esc_attr($out_link_utm); ?>" title="<?php echo esc_attr(sprintf(__('Please contact %s', 'wonderm00ns-simple-facebook-open-graph-tags'), 'Webdados')); ?>" target="_blank"><img src="<?php echo plugins_url('webdados.png', __FILE__); ?>"/></a></p>
60
  <h4><?php _e('Please rate our plugin at WordPress.org', 'wonderm00ns-simple-facebook-open-graph-tags'); ?>:</h4>
61
  <a href="https://wordpress.org/support/view/plugin-reviews/wonderm00ns-simple-facebook-open-graph-tags?filter=5#postform" target="_blank" style="text-align: center; display: block;">
62
  <div class="star-rating"><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div><div class="star star-full"></div></div>
admin/options-page.php CHANGED
@@ -103,7 +103,7 @@ wp_enqueue_media();
103
 
104
 
105
  <div class="clear">
106
- <p><br/>&copy 2011<?php if(date( 'Y' )>2011) echo '-'.date( 'Y' ); ?> <a href="http://www.webdados.pt/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Webdados</a> &amp; <a href="http://wonderm00n.com/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Marco Almeida (Wonderm00n)</a></p>
107
  </div>
108
 
109
 
103
 
104
 
105
  <div class="clear">
106
+ <p><br/>&copy 2011<?php if(date( 'Y' )>2011) echo '-'.date( 'Y' ); ?> <a href="https://www.webdados.pt/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Webdados</a> &amp; <a href="https://wonderm00n.com/<?php echo esc_attr($out_link_utm); ?>" target="_blank">Marco Almeida (Wonderm00n)</a></p>
107
  </div>
108
 
109
 
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.4.1
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.4.3
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Facebook Open Graph, Google+ and Twitter Card Tags ===
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, 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
7
- Stable tag: 2.1.4.2
8
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
@@ -71,10 +71,10 @@ Our settings page is discreetly kept under "Options", as it should, instead of t
71
 
72
  = 3rd Party Integration: =
73
 
74
- * **[Yoast SEO](http://wordpress.org/plugins/wordpress-seo/)**: Allows you to use title, url (canonical) and description from the Yoast SEO plugin.
75
  * **[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
76
- * **[SubHeading](http://wordpress.org/extend/plugins/subheading/)**: Add the SubHeading to the post/page title.
77
- * **[Business Directory Plugin](http://wordpress.org/extend/plugins/business-directory-plugin/)**: Allows you to use BDP listing contents as Open Graph Tags.
78
 
79
 
80
  == Installation ==
@@ -136,6 +136,11 @@ We DO NOT provide email support for this plugin. If you send us an email asking
136
 
137
  == Changelog ==
138
 
 
 
 
 
 
139
  = 2.1.4.2 =
140
  * Added a "Manually update Facebook cache" button to the "Post updated" notice
141
  * Improved the FAQ
1
  === Facebook Open Graph, Google+ and Twitter Card Tags ===
2
  Contributors: webdados, wonderm00n
3
+ Donate link: https://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
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
7
+ Stable tag: 2.1.4.3
8
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
71
 
72
  = 3rd Party Integration: =
73
 
74
+ * **[Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)**: Allows you to use title, url (canonical) and description from the Yoast SEO plugin.
75
  * **[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
76
+ * **[SubHeading](https://wordpress.org/extend/plugins/subheading/)**: Add the SubHeading to the post/page title.
77
+ * **[Business Directory Plugin](https://wordpress.org/extend/plugins/business-directory-plugin/)**: Allows you to use BDP listing contents as Open Graph Tags.
78
 
79
 
80
  == Installation ==
136
 
137
  == Changelog ==
138
 
139
+ = 2.1.4.3 =
140
+ * Added a "Share this on Facebook" button to the "Post updated" notice
141
+ * Fixed some URLs and links from http:// to https://
142
+ * Removed the option to load Facebook locales from their website as the URL now returns 404
143
+
144
  = 2.1.4.2 =
145
  * Added a "Manually update Facebook cache" button to the "Post updated" notice
146
  * Improved the FAQ
wonderm00n-open-graph.php CHANGED
@@ -1,16 +1,16 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.4.2
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
8
- Plugin URI: http://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.4.2
12
  Author: Webdados
13
- Author URI: http://www.webdados.pt
14
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
15
  Domain Path: /lang
16
  WC tested up to: 3.2
@@ -18,7 +18,7 @@ WC tested up to: 3.2
18
 
19
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
 
21
- define( 'WEBDADOS_FB_VERSION', '2.1.4.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 );
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.4.3
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.4.3
12
  Author: Webdados
13
+ Author URI: https://www.webdados.pt
14
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
15
  Domain Path: /lang
16
  WC tested up to: 3.2
18
 
19
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
 
21
+ define( 'WEBDADOS_FB_VERSION', '2.1.4.3' );
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 );