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

Version Description

  • Fix the "Suppress cache notices" option (Thanks @digbymaass)
Download this release

Release Info

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

Code changes from version 2.1.6.2 to 2.1.6.3

admin/class-webdados-fb-open-graph-admin.php CHANGED
@@ -17,6 +17,7 @@ class Webdados_FB_Admin {
17
  /* Update FB status */
18
  private $update_status;
19
  private $update_error;
 
20
 
21
  /* Construct */
22
  public function __construct( $options, $version ) {
@@ -262,7 +263,7 @@ class Webdados_FB_Admin {
262
  //$_SESSION['wd_fb_og_updated_error']=1;
263
  //$_SESSION['wd_fb_og_updated_error_message']=__('URL failed:', 'wonderm00ns-simple-facebook-open-graph-tags').' '.$fb_debug_url;
264
  } else {
265
- if ( $response['response']['code']==200 && intval($this->options['fb_adv_supress_fb_notice'])==0 ) {
266
  $this->update_status = 1;
267
  $this->update_error = false;
268
  //$_SESSION['wd_fb_og_updated']=1;
@@ -294,74 +295,76 @@ class Webdados_FB_Admin {
294
  return $location;
295
  }
296
  public function admin_notices() {
297
- if ( isset($_GET['wd_fb_og_status']) ) {
298
- if ( $screen = get_current_screen() ) {
299
- if ( $screen->parent_base=='edit' && $screen->base=='post' ) {
300
- global $post;
301
- switch ( $_GET['wd_fb_og_status'] ) {
302
- case '1':
303
- ?>
304
- <div class="updated">
305
- <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a class="button button-small" style="margin: 0px 1em;" 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>
306
- </div>
307
- <?php
308
- break;
309
- case '-1':
310
- case '-2':
311
- case '-3':
312
- ?>
313
- <div class="error">
314
- <p><?php
315
- echo '<strong>'.__('Error: Facebook Open Graph Tags cache NOT updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags').'</strong>';
316
- if ( isset($_GET['wd_fb_og_error']) ) echo '<br/>'.$_GET['wd_fb_og_error'];
317
- ?></p>
318
- <p>
319
- <strong>
320
- <?php _e( 'This is NOT a plugin error.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
321
- </strong>
322
- <br/>
323
- - <?php _e( 'Do not open support tickets about this issue.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
324
- - <?php _e( 'Lately and unfortunately, Facebook is not allowing to update the cache programmatically.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
325
- <br/>
326
- - <?php _e( 'Have you already configured the App ID and App Secret, needed for flushing the cache on Facebook?', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
327
- <a href="options-general.php?page=<?php echo esc_attr( basename( __FILE__ ) ); ?>"><?php _e( 'If you haven\'t, go to the settings page (Open Graph tab), and do it now.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?></a>
328
- <br/>
329
- or
330
- <br/>
331
- - <a href="https://developers.facebook.com/tools/debug/sharing/?q=<?php echo urlencode(get_permalink($post->ID)); ?>" target="_blank"><?php _e( 'Click here to try to clear the cache manually and then click "Scrape Again"', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?></a>
332
- </p>
333
- </div>
334
- <?php
335
- break;
 
336
 
 
337
  }
338
  }
339
  }
340
- }
341
- /*if ($screen = get_current_screen()) {
342
- if (isset($_SESSION['wd_fb_og_updated']) && $_SESSION['wd_fb_og_updated']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
343
- global $post;
344
- ?>
345
- <div class="updated">
346
- <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>
347
- </div>
348
- <?php
349
- } else {
350
- if (isset($_SESSION['wd_fb_og_updated_error']) && $_SESSION['wd_fb_og_updated_error']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
351
  ?>
352
- <div class="error">
353
- <p><?php
354
- echo '<strong>'.__('Error: Facebook Open Graph Tags cache NOT updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags').'</strong>';
355
- echo '<br/>'.$_SESSION['wd_fb_og_updated_error_message'];
356
- ?></p>
357
  </div>
358
  <?php
 
 
 
 
 
 
 
 
 
 
 
359
  }
360
  }
 
 
 
361
  }
362
- unset($_SESSION['wd_fb_og_updated']);
363
- unset($_SESSION['wd_fb_og_updated_error']);
364
- unset($_SESSION['wd_fb_og_updated_error_message']);*/
365
  }
366
 
367
  /* Manually update cache link */
17
  /* Update FB status */
18
  private $update_status;
19
  private $update_error;
20
+ private $update_show;
21
 
22
  /* Construct */
23
  public function __construct( $options, $version ) {
263
  //$_SESSION['wd_fb_og_updated_error']=1;
264
  //$_SESSION['wd_fb_og_updated_error_message']=__('URL failed:', 'wonderm00ns-simple-facebook-open-graph-tags').' '.$fb_debug_url;
265
  } else {
266
+ if ( $response['response']['code']==200 ) {
267
  $this->update_status = 1;
268
  $this->update_error = false;
269
  //$_SESSION['wd_fb_og_updated']=1;
295
  return $location;
296
  }
297
  public function admin_notices() {
298
+ if ( intval($this->options['fb_adv_supress_fb_notice'])==0 ) {
299
+ if ( isset($_GET['wd_fb_og_status']) ) {
300
+ if ( $screen = get_current_screen() ) {
301
+ if ( $screen->parent_base=='edit' && $screen->base=='post' ) {
302
+ global $post;
303
+ switch ( $_GET['wd_fb_og_status'] ) {
304
+ case '1':
305
+ ?>
306
+ <div class="updated">
307
+ <p><?php _e('Facebook Open Graph Tags cache updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags'); ?> <a class="button button-small" style="margin: 0px 1em;" 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>
308
+ </div>
309
+ <?php
310
+ break;
311
+ case '-1':
312
+ case '-2':
313
+ case '-3':
314
+ ?>
315
+ <div class="error">
316
+ <p><?php
317
+ echo '<strong>'.__('Error: Facebook Open Graph Tags cache NOT updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags').'</strong>';
318
+ if ( isset($_GET['wd_fb_og_error']) ) echo '<br/>'.$_GET['wd_fb_og_error'];
319
+ ?></p>
320
+ <p>
321
+ <strong>
322
+ <?php _e( 'This is NOT a plugin error.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
323
+ </strong>
324
+ <br/>
325
+ - <?php _e( 'Do not open support tickets about this issue.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
326
+ - <?php _e( 'Lately and unfortunately, Facebook is not allowing to update the cache programmatically.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
327
+ <br/>
328
+ - <?php _e( 'Have you already configured the App ID and App Secret, needed for flushing the cache on Facebook?', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?>
329
+ <a href="options-general.php?page=<?php echo esc_attr( basename( __FILE__ ) ); ?>"><?php _e( 'If you haven\'t, go to the settings page (Open Graph tab), and do it now.', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?></a>
330
+ <br/>
331
+ or
332
+ <br/>
333
+ - <a href="https://developers.facebook.com/tools/debug/sharing/?q=<?php echo urlencode(get_permalink($post->ID)); ?>" target="_blank"><?php _e( 'Click here to try to clear the cache manually and then click "Scrape Again"', 'wonderm00ns-simple-facebook-open-graph-tags' ); ?></a>
334
+ </p>
335
+ </div>
336
+ <?php
337
+ break;
338
 
339
+ }
340
  }
341
  }
342
  }
343
+ /*if ($screen = get_current_screen()) {
344
+ if (isset($_SESSION['wd_fb_og_updated']) && $_SESSION['wd_fb_og_updated']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
345
+ global $post;
 
 
 
 
 
 
 
 
346
  ?>
347
+ <div class="updated">
348
+ <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>
 
 
 
349
  </div>
350
  <?php
351
+ } else {
352
+ if (isset($_SESSION['wd_fb_og_updated_error']) && $_SESSION['wd_fb_og_updated_error']==1 && $screen->parent_base=='edit' && $screen->base=='post') {
353
+ ?>
354
+ <div class="error">
355
+ <p><?php
356
+ echo '<strong>'.__('Error: Facebook Open Graph Tags cache NOT updated/purged.', 'wonderm00ns-simple-facebook-open-graph-tags').'</strong>';
357
+ echo '<br/>'.$_SESSION['wd_fb_og_updated_error_message'];
358
+ ?></p>
359
+ </div>
360
+ <?php
361
+ }
362
  }
363
  }
364
+ unset($_SESSION['wd_fb_og_updated']);
365
+ unset($_SESSION['wd_fb_og_updated_error']);
366
+ unset($_SESSION['wd_fb_og_updated_error_message']);*/
367
  }
 
 
 
368
  }
369
 
370
  /* Manually update cache link */
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.2
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.6.3
5
  */
6
 
7
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
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.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
 
@@ -147,6 +147,9 @@ We DO NOT provide email support for this plugin. If you send us an email asking
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)
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.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
 
147
 
148
  == Changelog ==
149
 
150
+ = 2.1.6.3 =
151
+ * Fix the "Suppress cache notices" option (Thanks @digbymaass)
152
+
153
  = 2.1.6.2 =
154
  * Default `og:type` to `website` on non-singular pages because Facebook deprecated it (Thanks @alexiswilke)
155
  * Automatically disable the overlay feature if GD is not installed (Thanks @tiagomagalhaes)
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.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,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.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.6.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.6.3
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.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 );