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

Version Description

  • Bug fix: WooCommerce price integration wasn't working on WooCommerce >
Download this release

Release Info

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

Code changes from version 1.7.4.3 to 1.7.4.4

Files changed (2) hide show
  1. readme.txt +6 -2
  2. wonderm00n-open-graph.php +17 -17
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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, subheading, php7
5
  Requires at least: 4.0
6
- Tested up to: 4.5
7
- Stable tag: 1.7.4.3
8
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and other Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
@@ -112,6 +112,10 @@ We DO NOT provide email support for this plugin. If you send us an email asking
112
 
113
  == Changelog ==
114
 
 
 
 
 
115
  = 1.7.4.3 =
116
  - Version number fix
117
  - Portuguese translation update
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, subheading, php7
5
  Requires at least: 4.0
6
+ Tested up to: 4.6.1
7
+ Stable tag: 1.7.4.4
8
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and other Meta Tags into your WordPress Website for more efficient sharing results.
9
 
10
  == Description ==
112
 
113
  == Changelog ==
114
 
115
+ = 1.7.4.4 =
116
+ - Bug fix: WooCommerce price integration wasn't working on WooCommerce >= 2.6 (Thanks @jluisfreitas)
117
+ - Bumped `Tested up to` tag
118
+
119
  = 1.7.4.3 =
120
  - Version number fix
121
  - Portuguese translation update
wonderm00n-open-graph.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 1.7.4.3
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 and Twitter Card 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
- Version: 1.7.4.3
11
  Author: Webdados
12
  Author URI: http://www.webdados.pt
13
  Text Domain: wd-fb-og
@@ -16,7 +16,7 @@ Domain Path: /lang
16
 
17
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
 
19
- $webdados_fb_open_graph_plugin_version='1.7.4.3';
20
  $webdados_fb_open_graph_plugin_name='Facebook Open Graph, Google+ and Twitter Card Tags';
21
  $webdados_fb_open_graph_plugin_settings=array(
22
  'fb_app_id_show',
@@ -391,22 +391,12 @@ function webdados_fb_open_graph() {
391
  }
392
  }
393
 
394
- //WooCommerce - Additional product images?
395
- if ( intval($fb_image_show)==1 && class_exists('woocommerce') && $fb_wc_useproductgallery==1 && is_product() ) {
396
- global $post;
397
- $product = new WC_Product( $post->ID );
398
- if ( $attachment_ids = $product->get_gallery_attachment_ids() ) {
399
- foreach ( $attachment_ids as $attachment_id ) {
400
- if ( $image_link = wp_get_attachment_url( $attachment_id ) ) {
401
- if ( trim($image_link)!='' ) $fb_image_additional[]=trim($image_link);
402
- }
403
- }
404
- }
405
- }
406
- //WooCommerce - og:type, price, etc...
407
  if ( class_exists('woocommerce') && is_product() ) {
408
  $fb_type = 'product';
409
- global $product;
 
 
410
  $fb_additional_tags['og_price_amount']=array(
411
  $product->get_price_including_tax()
412
  );
@@ -419,6 +409,16 @@ function webdados_fb_open_graph() {
419
  if (function_exists('get_woocommerce_currency')) $fb_additional_tags['twitter_data1']=array(
420
  $product->get_price_including_tax().' '.get_woocommerce_currency()
421
  );
 
 
 
 
 
 
 
 
 
 
422
  }
423
 
424
  //Apply Filters
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 1.7.4.4
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 and Twitter Card 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
+ Version: 1.7.4.4
11
  Author: Webdados
12
  Author URI: http://www.webdados.pt
13
  Text Domain: wd-fb-og
16
 
17
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
 
19
+ $webdados_fb_open_graph_plugin_version='1.7.4.4';
20
  $webdados_fb_open_graph_plugin_name='Facebook Open Graph, Google+ and Twitter Card Tags';
21
  $webdados_fb_open_graph_plugin_settings=array(
22
  'fb_app_id_show',
391
  }
392
  }
393
 
394
+ //WooCommerce - og:type, price, etc...
 
 
 
 
 
 
 
 
 
 
 
 
395
  if ( class_exists('woocommerce') && is_product() ) {
396
  $fb_type = 'product';
397
+ global $post;
398
+ $product = new WC_Product( $post->ID );
399
+ //Price
400
  $fb_additional_tags['og_price_amount']=array(
401
  $product->get_price_including_tax()
402
  );
409
  if (function_exists('get_woocommerce_currency')) $fb_additional_tags['twitter_data1']=array(
410
  $product->get_price_including_tax().' '.get_woocommerce_currency()
411
  );
412
+ //Additional product images?
413
+ if ( intval($fb_image_show)==1 && $fb_wc_useproductgallery==1 ) {
414
+ if ( $attachment_ids = $product->get_gallery_attachment_ids() ) {
415
+ foreach ( $attachment_ids as $attachment_id ) {
416
+ if ( $image_link = wp_get_attachment_url( $attachment_id ) ) {
417
+ if ( trim($image_link)!='' ) $fb_image_additional[]=trim($image_link);
418
+ }
419
+ }
420
+ }
421
+ }
422
  }
423
 
424
  //Apply Filters