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

Version Description

  • Small bug fix introduced in 2.2 that would throw a PHP notice if no tool was selected when saving the settings (Thanks @osti47)
  • Clear image size cache (transients) on uninstall
  • Better debug for support purposes, which can be disabled by returning false on the fb_og_enable_debug filter
  • 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.2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.3

admin/class-webdados-fb-open-graph-admin.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
@@ -453,7 +449,7 @@ class Webdados_FB_Admin {
453
 
454
  /* Run tools */
455
  public function run_tools( $value ) {
456
- if ( is_array( $_POST['tools'] ) ) {
457
  foreach ( $_POST['tools'] as $tool ) {
458
  $function = 'run_tool_'.$tool;
459
  $this->$function();
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
449
 
450
  /* Run tools */
451
  public function run_tools( $value ) {
452
+ if ( isset( $_POST['tools'] ) && is_array( $_POST['tools'] ) ) {
453
  foreach ( $_POST['tools'] as $tool ) {
454
  $function = 'run_tool_'.$tool;
455
  $this->$function();
admin/options-page-3rdparty.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
admin/options-page-facebook.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
admin/options-page-general.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
admin/options-page-right.php CHANGED
@@ -1,8 +1,4 @@
1
  <?php
2
- /**
3
- * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.2
5
- */
6
 
7
  $links = array(
8
  0 => array(
1
  <?php
 
 
 
 
2
 
3
  $links = array(
4
  0 => array(
admin/options-page-schema.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
admin/options-page-seo.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
admin/options-page-tools.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
admin/options-page-twitter.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
admin/options-page.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
fbimg.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
- /**
3
- * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- * @version 2.1.2
5
- */
6
  define('WP_USE_THEMES', false);
7
  require( '../../../wp-blog-header.php' );
8
 
1
  <?php
2
+
 
 
 
3
  define('WP_USE_THEMES', false);
4
  require( '../../../wp-blog-header.php' );
5
 
includes/class-webdados-fb-open-graph.php CHANGED
@@ -1,8 +1,4 @@
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
8
 
1
  <?php
 
 
 
 
2
 
3
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
 
public/class-webdados-fb-open-graph-public.php CHANGED
@@ -51,6 +51,8 @@ class Webdados_FB_Public {
51
  public function insert_meta_tags() {
52
  global $webdados_fb, $wp_query;
53
 
 
 
54
  if ( !apply_filters( 'fb_og_disable', false ) ) {
55
 
56
  //Open tag
@@ -108,6 +110,8 @@ class Webdados_FB_Public {
108
  }
109
 
110
  if ( is_singular() ) { //Including homepage if set as static page
 
 
111
 
112
  global $post;
113
  // Title
@@ -215,6 +219,7 @@ class Webdados_FB_Public {
215
  }
216
  // WooCommerce
217
  if ( $webdados_fb->is_woocommerce_active() && is_product() ) {
 
218
  $fb_type = 'product';
219
  $product = new WC_Product( $post->ID );
220
  //Price
@@ -276,6 +281,7 @@ class Webdados_FB_Public {
276
 
277
  //Category
278
  if ( is_category() ) {
 
279
  $fb_title = wp_strip_all_tags( stripslashes( single_cat_title( '', false ) ), true );
280
  $term = $wp_query->get_queried_object();
281
  $fb_url = get_term_link( $term, $term->taxonomy );
@@ -283,6 +289,7 @@ class Webdados_FB_Public {
283
  if ( trim($cat_desc)!='' ) $fb_desc = $cat_desc;
284
  } else {
285
  if ( is_tag() ) {
 
286
  $fb_title = wp_strip_all_tags( stripslashes( single_tag_title( '', false ) ), true );
287
  $term = $wp_query->get_queried_object();
288
  $fb_url = get_term_link( $term, $term->taxonomy );
@@ -293,10 +300,12 @@ class Webdados_FB_Public {
293
  $fb_title = wp_strip_all_tags( stripslashes( single_term_title( '', false ) ), true );
294
  $term = $wp_query->get_queried_object();
295
  $fb_url = get_term_link($term, $term->taxonomy);
 
296
  $tax_desc = trim( wp_strip_all_tags( stripslashes( term_description() ), true ) );
297
  if ( trim($tax_desc)!='' ) $fb_desc = $tax_desc;
298
  //WooCommerce
299
  if ( $webdados_fb->is_woocommerce_active() && intval($this->options['fb_wc_usecategthumb'])==1 && ( is_product_category() || is_tax('product_brand') ) ) {
 
300
  if ( intval($this->options['fb_image_show'])==1 || intval($this->options['fb_image_show_schema'])==1 || intval($this->options['fb_image_show_twitter'])==1 ) {
301
  if ( $thumbnail_id = get_woocommerce_term_meta( $term->term_id, 'thumbnail_id', true ) ) {
302
  if ( $image = wp_get_attachment_url( $thumbnail_id ) ) {
@@ -307,23 +316,29 @@ class Webdados_FB_Public {
307
  }
308
  } else {
309
  if ( is_search() ) {
 
310
  $fb_title = wp_strip_all_tags( stripslashes( __('Search for', 'wonderm00ns-simple-facebook-open-graph-tags').' "'.get_search_query().'"' ), true );
311
  $fb_url = get_search_link();
312
  } else {
313
  if (is_author()) {
 
314
  $fb_title = wp_strip_all_tags( stripslashes( get_the_author_meta('display_name', get_query_var('author') ) ), true );
315
  $fb_url = get_author_posts_url( get_query_var('author'), get_query_var('author_name') );
316
  } else {
317
  if ( is_archive() ) {
 
318
  if ( is_day() ) {
 
319
  $fb_title = wp_strip_all_tags( stripslashes( get_query_var( 'day' ) . ' ' .single_month_title( ' ', false ) . ' ' . __( 'Archives', 'wonderm00ns-simple-facebook-open-graph-tags' ) ), true );
320
  $fb_url = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) );
321
  } else {
322
  if ( is_month() ) {
 
323
  $fb_title = wp_strip_all_tags( stripslashes( single_month_title( ' ', false ) . ' ' . __( 'Archives', 'wonderm00ns-simple-facebook-open-graph-tags' ) ), true );
324
  $fb_url = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) );
325
  } else {
326
  if ( is_year() ) {
 
327
  $fb_title = wp_strip_all_tags( stripslashes( get_query_var( 'year' ) . ' ' . __( 'Archives', 'wonderm00ns-simple-facebook-open-graph-tags' ) ), true );
328
  $fb_url = get_year_link( get_query_var( 'year' ) );
329
  }
@@ -331,11 +346,13 @@ class Webdados_FB_Public {
331
  }
332
  } else {
333
  if ( is_front_page() ) { //Regular homepage
 
334
  $fb_url = get_option('home').(intval($this->options['fb_url_add_trailing'])==1 ? '/' : '');
335
  $fb_type = trim( $this->options['fb_type_homepage']=='' ? 'website' : $this->options['fb_type_homepage'] );
336
  $fb_desc = $fb_desc_homepage;
337
  } else {
338
  if ( is_home() ) { //Blog page (set as page)
 
339
  if ( 'page' === get_option( 'show_on_front' ) && $page_for_posts = get_option( 'page_for_posts' ) ) {
340
  //$post = get_post( $page_for_posts ); //This is NOT the global $post and it's actually not needed because we'll use the post ID = $page_for_posts
341
  //Blog page
@@ -405,6 +422,7 @@ class Webdados_FB_Public {
405
  //YOAST SEO?
406
  if ( $this->options['fb_show_wpseoyoast']==1 ) {
407
  if ( $webdados_fb->is_yoast_seo_active() ) {
 
408
  $wpseo = WPSEO_Frontend::get_instance();
409
  //Title
410
  $fb_title_temp = $wpseo->title(false);
@@ -431,6 +449,7 @@ class Webdados_FB_Public {
431
  //All in One SEO Pack?
432
  if ( $this->options['fb_show_aioseop']==1 ) {
433
  if ( $webdados_fb->is_aioseop_active() ) {
 
434
  global $aiosp;
435
  //Title - Why are we getting the first post title on archives and homepage...?!?
436
  $fb_title_temp = $aiosp->orig_title;
@@ -506,6 +525,7 @@ class Webdados_FB_Public {
506
 
507
  //Image overlay - Single?
508
  if ( intval($this->options['fb_image_show'])==1 && intval($this->options['fb_image_overlay'])==1 && apply_filters('fb_og_image_overlay', true, $fb_image) ) {
 
509
  //Single
510
  $temp_fb_image_overlay = $this->get_image_with_overlay($fb_image);
511
  if ( $temp_fb_image_overlay['overlay'] ) {
@@ -694,12 +714,13 @@ class Webdados_FB_Public {
694
  }
695
  } else {
696
 
697
- $html.=' <!-- Removed by fb_og_enabled filter -->
698
- ';
699
 
700
  }
701
 
702
  //Close tag
 
 
703
  $html.='<!-- END - '.WEBDADOS_FB_PLUGIN_NAME.' '.WEBDADOS_FB_VERSION.' -->
704
 
705
  ';
51
  public function insert_meta_tags() {
52
  global $webdados_fb, $wp_query;
53
 
54
+ $debug = array();
55
+
56
  if ( !apply_filters( 'fb_og_disable', false ) ) {
57
 
58
  //Open tag
110
  }
111
 
112
  if ( is_singular() ) { //Including homepage if set as static page
113
+
114
+ $debug[] = 'is_singular';
115
 
116
  global $post;
117
  // Title
219
  }
220
  // WooCommerce
221
  if ( $webdados_fb->is_woocommerce_active() && is_product() ) {
222
+ $debug[] = 'is_product';
223
  $fb_type = 'product';
224
  $product = new WC_Product( $post->ID );
225
  //Price
281
 
282
  //Category
283
  if ( is_category() ) {
284
+ $debug[] = 'is_category';
285
  $fb_title = wp_strip_all_tags( stripslashes( single_cat_title( '', false ) ), true );
286
  $term = $wp_query->get_queried_object();
287
  $fb_url = get_term_link( $term, $term->taxonomy );
289
  if ( trim($cat_desc)!='' ) $fb_desc = $cat_desc;
290
  } else {
291
  if ( is_tag() ) {
292
+ $debug[] = 'is_tag';
293
  $fb_title = wp_strip_all_tags( stripslashes( single_tag_title( '', false ) ), true );
294
  $term = $wp_query->get_queried_object();
295
  $fb_url = get_term_link( $term, $term->taxonomy );
300
  $fb_title = wp_strip_all_tags( stripslashes( single_term_title( '', false ) ), true );
301
  $term = $wp_query->get_queried_object();
302
  $fb_url = get_term_link($term, $term->taxonomy);
303
+ $debug[] = 'is_tax: '.$term->taxonomy;
304
  $tax_desc = trim( wp_strip_all_tags( stripslashes( term_description() ), true ) );
305
  if ( trim($tax_desc)!='' ) $fb_desc = $tax_desc;
306
  //WooCommerce
307
  if ( $webdados_fb->is_woocommerce_active() && intval($this->options['fb_wc_usecategthumb'])==1 && ( is_product_category() || is_tax('product_brand') ) ) {
308
+ if ( is_product_category() ) $debug[] = 'is_product_category';
309
  if ( intval($this->options['fb_image_show'])==1 || intval($this->options['fb_image_show_schema'])==1 || intval($this->options['fb_image_show_twitter'])==1 ) {
310
  if ( $thumbnail_id = get_woocommerce_term_meta( $term->term_id, 'thumbnail_id', true ) ) {
311
  if ( $image = wp_get_attachment_url( $thumbnail_id ) ) {
316
  }
317
  } else {
318
  if ( is_search() ) {
319
+ $debug[] = 'is_search';
320
  $fb_title = wp_strip_all_tags( stripslashes( __('Search for', 'wonderm00ns-simple-facebook-open-graph-tags').' "'.get_search_query().'"' ), true );
321
  $fb_url = get_search_link();
322
  } else {
323
  if (is_author()) {
324
+ $debug[] = 'is_author';
325
  $fb_title = wp_strip_all_tags( stripslashes( get_the_author_meta('display_name', get_query_var('author') ) ), true );
326
  $fb_url = get_author_posts_url( get_query_var('author'), get_query_var('author_name') );
327
  } else {
328
  if ( is_archive() ) {
329
+ $debug[] = 'is_archive';
330
  if ( is_day() ) {
331
+ $debug[] = 'is_day';
332
  $fb_title = wp_strip_all_tags( stripslashes( get_query_var( 'day' ) . ' ' .single_month_title( ' ', false ) . ' ' . __( 'Archives', 'wonderm00ns-simple-facebook-open-graph-tags' ) ), true );
333
  $fb_url = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) );
334
  } else {
335
  if ( is_month() ) {
336
+ $debug[] = 'is_month';
337
  $fb_title = wp_strip_all_tags( stripslashes( single_month_title( ' ', false ) . ' ' . __( 'Archives', 'wonderm00ns-simple-facebook-open-graph-tags' ) ), true );
338
  $fb_url = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) );
339
  } else {
340
  if ( is_year() ) {
341
+ $debug[] = 'is_year';
342
  $fb_title = wp_strip_all_tags( stripslashes( get_query_var( 'year' ) . ' ' . __( 'Archives', 'wonderm00ns-simple-facebook-open-graph-tags' ) ), true );
343
  $fb_url = get_year_link( get_query_var( 'year' ) );
344
  }
346
  }
347
  } else {
348
  if ( is_front_page() ) { //Regular homepage
349
+ $debug[] = 'is_front_page';
350
  $fb_url = get_option('home').(intval($this->options['fb_url_add_trailing'])==1 ? '/' : '');
351
  $fb_type = trim( $this->options['fb_type_homepage']=='' ? 'website' : $this->options['fb_type_homepage'] );
352
  $fb_desc = $fb_desc_homepage;
353
  } else {
354
  if ( is_home() ) { //Blog page (set as page)
355
+ $debug[] = 'is_home';
356
  if ( 'page' === get_option( 'show_on_front' ) && $page_for_posts = get_option( 'page_for_posts' ) ) {
357
  //$post = get_post( $page_for_posts ); //This is NOT the global $post and it's actually not needed because we'll use the post ID = $page_for_posts
358
  //Blog page
422
  //YOAST SEO?
423
  if ( $this->options['fb_show_wpseoyoast']==1 ) {
424
  if ( $webdados_fb->is_yoast_seo_active() ) {
425
+ $debug[] = 'yoast_seo';
426
  $wpseo = WPSEO_Frontend::get_instance();
427
  //Title
428
  $fb_title_temp = $wpseo->title(false);
449
  //All in One SEO Pack?
450
  if ( $this->options['fb_show_aioseop']==1 ) {
451
  if ( $webdados_fb->is_aioseop_active() ) {
452
+ $debug[] = 'aio_seo';
453
  global $aiosp;
454
  //Title - Why are we getting the first post title on archives and homepage...?!?
455
  $fb_title_temp = $aiosp->orig_title;
525
 
526
  //Image overlay - Single?
527
  if ( intval($this->options['fb_image_show'])==1 && intval($this->options['fb_image_overlay'])==1 && apply_filters('fb_og_image_overlay', true, $fb_image) ) {
528
+ $debug[] = 'image overlay';
529
  //Single
530
  $temp_fb_image_overlay = $this->get_image_with_overlay($fb_image);
531
  if ( $temp_fb_image_overlay['overlay'] ) {
714
  }
715
  } else {
716
 
717
+ $debug[] = 'Removed by fb_og_enabled filter';
 
718
 
719
  }
720
 
721
  //Close tag
722
+ if ( apply_filters( 'fb_og_enable_debug', true ) ) $html.=' <!-- '.implode( ' | ', $debug ).' -->
723
+ ';
724
  $html.='<!-- END - '.WEBDADOS_FB_PLUGIN_NAME.' '.WEBDADOS_FB_VERSION.' -->
725
 
726
  ';
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webdados, wonderm00n
3
  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.2.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
 
@@ -150,6 +150,12 @@ We DO NOT provide email support for this plugin. If you send us an email asking
150
 
151
  == Changelog ==
152
 
 
 
 
 
 
 
153
  = 2.2.2 =
154
  * NEW WooCommerce Brands integration: Uses the Brand thumbnail image if the "Use Category thumbnail as Image" option is enabled
155
 
3
  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: 5.0-alpha-42440
7
+ Stable tag: 2.2.3
8
 
9
  Inserts Facebook Open Graph, Google+/Schema.org, Twitter and SEO Meta Tags into your WordPress Website for more efficient sharing results.
10
 
150
 
151
  == Changelog ==
152
 
153
+ = 2.2.3 =
154
+ * Small bug fix introduced in 2.2 that would throw a PHP notice if no tool was selected when saving the settings (Thanks @osti47)
155
+ * Clear image size cache (transients) on uninstall
156
+ * Better debug for support purposes, which can be disabled by returning false on the `fb_og_enable_debug` filter
157
+ * Bumped `Tested up to` tag
158
+
159
  = 2.2.2 =
160
  * NEW WooCommerce Brands integration: Uses the Brand thumbnail image if the "Use Category thumbnail as Image" option is enabled
161
 
wonderm00n-open-graph.php CHANGED
@@ -1,13 +1,10 @@
1
  <?php
2
- /**
3
- * @package Facebook Open Graph, Google+ and Twitter Card Tags
4
- */
5
  /*
6
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
7
  Plugin URI: https://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
8
  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.
9
 
10
- Version: 2.2.2
11
  Author: Webdados
12
  Author URI: https://www.webdados.pt
13
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
@@ -17,7 +14,7 @@ WC tested up to: 3.2.6
17
 
18
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
19
 
20
- define( 'WEBDADOS_FB_VERSION', '2.2.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 );
@@ -30,10 +27,15 @@ register_uninstall_hook(__FILE__, 'webdados_fb_uninstall');
30
  function webdados_fb_uninstall() {
31
  $options = get_option( 'wonderm00n_open_graph_settings' );
32
  if ( intval($options['fb_keep_data_uninstall'])==0 ) {
 
33
  delete_option( 'wonderm00n_open_graph_settings' );
34
  delete_option( 'wonderm00n_open_graph_version' );
 
35
  global $wpdb;
 
36
  $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key LIKE '_webdados_fb_open_graph%'" );
 
 
37
  }
38
  }
39
 
1
  <?php
 
 
 
2
  /*
3
  Plugin Name: Facebook Open Graph, Google+ and Twitter Card Tags
4
  Plugin URI: https://www.webdados.pt/produtos-e-servicos/internet/desenvolvimento-wordpress/facebook-open-graph-meta-tags-wordpress/
5
  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.
6
 
7
+ Version: 2.2.3
8
  Author: Webdados
9
  Author URI: https://www.webdados.pt
10
  Text Domain: wonderm00ns-simple-facebook-open-graph-tags
14
 
15
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
16
 
17
+ define( 'WEBDADOS_FB_VERSION', '2.2.3' );
18
  define( 'WEBDADOS_FB_PLUGIN_NAME', 'Facebook Open Graph, Google+ and Twitter Card Tags' );
19
  define( 'WEBDADOS_FB_W', 1200 );
20
  define( 'WEBDADOS_FB_H', 630 );
27
  function webdados_fb_uninstall() {
28
  $options = get_option( 'wonderm00n_open_graph_settings' );
29
  if ( intval($options['fb_keep_data_uninstall'])==0 ) {
30
+ //Settings
31
  delete_option( 'wonderm00n_open_graph_settings' );
32
  delete_option( 'wonderm00n_open_graph_version' );
33
+ delete_option( 'wonderm00n_open_graph_admin_notice' );
34
  global $wpdb;
35
+ //Post meta
36
  $wpdb->query( "DELETE FROM $wpdb->postmeta WHERE meta_key LIKE '_webdados_fb_open_graph%'" );
37
+ //Transients - Image size cache
38
+ $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '%webdados_og_image_size_%'" );
39
  }
40
  }
41