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

Version Description

  • Fixed some PHP notices and warnings
  • Tested with WooCommerce 3.2
  • Added WC tested up to tag on the plugin main file
  • Bumped Tested up to tag
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

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.2
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -480,7 +480,7 @@ class Webdados_FB_Public {
480
  //Additional
481
  if ( isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional)>0 ) {
482
  foreach($fb_image_additional as $key => $value ) {
483
- if ($value['png_overlay']) {
484
  $temp_fb_image_overlay = $this->get_image_with_overlay($value['fb_image']);
485
  if ( $temp_fb_image_overlay['overlay'] ) {
486
  $fb_image_additional[$key]['fb_image'] = $temp_fb_image_overlay['fb_image'];
@@ -499,7 +499,7 @@ class Webdados_FB_Public {
499
  if ( isset($fb_image) && trim($fb_image)!='' ) $fb_image = str_replace(' ', '%20', trim($fb_image));
500
  if ( isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional) ) {
501
  foreach ( $fb_image_additional as $key => $value ) {
502
- $fb_image_additional[$key]['fb_image'] = str_replace( ' ', '%20', trim($value['fb_image']) );
503
  }
504
  }
505
 
@@ -534,8 +534,10 @@ class Webdados_FB_Public {
534
  //Additional Images
535
  if( intval($this->options['fb_image_show'])==1 && isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional)>0 ) {
536
  foreach ($fb_image_additional as $fb_image_additional_temp) {
537
- $html.=' <meta property="og:image" content="'.trim(esc_attr($fb_image_additional_temp['fb_image'])).'"/>
 
538
  ';
 
539
  }
540
  } else {
541
  //Image Size - We only show the image size if we only have one image
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.3
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
480
  //Additional
481
  if ( isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional)>0 ) {
482
  foreach($fb_image_additional as $key => $value ) {
483
+ if ( isset($value['png_overlay']) && $value['png_overlay'] ) {
484
  $temp_fb_image_overlay = $this->get_image_with_overlay($value['fb_image']);
485
  if ( $temp_fb_image_overlay['overlay'] ) {
486
  $fb_image_additional[$key]['fb_image'] = $temp_fb_image_overlay['fb_image'];
499
  if ( isset($fb_image) && trim($fb_image)!='' ) $fb_image = str_replace(' ', '%20', trim($fb_image));
500
  if ( isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional) ) {
501
  foreach ( $fb_image_additional as $key => $value ) {
502
+ if ( isset($value['fb_image']) ) $fb_image_additional[$key]['fb_image'] = str_replace( ' ', '%20', trim($value['fb_image']) );
503
  }
504
  }
505
 
534
  //Additional Images
535
  if( intval($this->options['fb_image_show'])==1 && isset($fb_image_additional) && is_array($fb_image_additional) && count($fb_image_additional)>0 ) {
536
  foreach ($fb_image_additional as $fb_image_additional_temp) {
537
+ if ( isset($fb_image_additional_temp['fb_image']) && trim($fb_image_additional_temp['fb_image'])!='' ) {
538
+ $html.=' <meta property="og:image" content="'.trim(esc_attr($fb_image_additional_temp['fb_image'])).'"/>
539
  ';
540
+ }
541
  }
542
  } else {
543
  //Image Size - We only show the image size if we only have one image
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, wordpress seo, woocommerce, subheading, php7
5
  Requires at least: 4.5
6
- Tested up to: 4.7.3
7
- Stable tag: 2.1.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 ==
@@ -126,6 +126,12 @@ We DO NOT provide email support for this plugin. If you send us an email asking
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
129
  = 2.1.2 =
130
  * Fix the fact that we are using `sanitize_textarea_field()` that only exists since 4.7.0 although we had a 4.0 minimum requirement (Thanks @l3lackcat)
131
  * Fix the textdomain on a couple of gettext calls
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.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 ==
126
 
127
  == Changelog ==
128
 
129
+ = 2.1.3 =
130
+ * Fixed some PHP notices and warnings
131
+ * Tested with WooCommerce 3.2
132
+ * Added `WC tested up to` tag on the plugin main file
133
+ * Bumped `Tested up to` tag
134
+
135
  = 2.1.2 =
136
  * Fix the fact that we are using `sanitize_textarea_field()` that only exists since 4.7.0 although we had a 4.0 minimum requirement (Thanks @l3lackcat)
137
  * Fix the textdomain on a couple of gettext calls
wonderm00n-open-graph.php CHANGED
@@ -1,23 +1,24 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.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.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
  */
17
 
18
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
19
 
20
- define( 'WEBDADOS_FB_VERSION', '2.1.2' );
21
  define( 'WEBDADOS_FB_PLUGIN_NAME', 'Facebook Open Graph, Google+ and Twitter Card Tags' );
22
  define( 'WEBDADOS_FB_W', 1200 );
23
  define( 'WEBDADOS_FB_H', 630 );
1
  <?php
2
  /**
3
  * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
+ * @version 2.1.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, 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.3
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
17
  */
18
 
19
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
 
21
+ define( 'WEBDADOS_FB_VERSION', '2.1.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 );