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

Version Description

  • Fixed a bug where the original, Wordpress stock, Canonical URL was not being removed.
Download this release

Release Info

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

Code changes from version 0.4.2 to 0.4.3

Files changed (2) hide show
  1. readme.txt +6 -2
  2. wonderm00n-open-graph.php +11 -4
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wonderm00n
3
  Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
4
  Tags: facebook, open graph, seo, share, social, meta
5
  Requires at least: 3
6
- Tested up to: 3.5
7
- Stable tag: 0.4.1
8
 
9
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
@@ -35,6 +35,10 @@ The tags that this plugin inserts are:
35
 
36
  == Changelog ==
37
 
 
 
 
 
38
  = 0.4.2 =
39
 
40
  * If using the "Business Directory Plugin" integration, the "og:url" tag is now correctly set in the category listing pages.
3
  Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
4
  Tags: facebook, open graph, seo, share, social, meta
5
  Requires at least: 3
6
+ Tested up to: 3.5.1
7
+ Stable tag: 0.4.3
8
 
9
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
35
 
36
  == Changelog ==
37
 
38
+ = 0.4.3 =
39
+
40
+ * Fixed a bug where the original, Wordpress stock, Canonical URL was not being removed.
41
+
42
  = 0.4.2 =
43
 
44
  * If using the "Business Directory Plugin" integration, the "og:url" tag is now correctly set in the category listing pages.
wonderm00n-open-graph.php CHANGED
@@ -1,18 +1,18 @@
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
- * @version 0.4.2
5
  */
6
  /*
7
  Plugin Name: Wonderm00n's Simple Facebook Open Graph Meta Tags
8
  Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
9
  Description: This plugin inserts Facebook Open Graph Tags into your Wordpress Blog/Website for better Facebook sharing
10
  Author: Marco Almeida (Wonderm00n)
11
- Version: 0.4.2
12
  Author URI: http://wonderm00n.com
13
  */
14
 
15
- $wonderm00n_open_graph_plugin_version='0.4.2';
16
  $wonderm00n_open_graph_plugin_settings=array(
17
  'fb_app_id_show',
18
  'fb_app_id',
@@ -42,6 +42,13 @@ $wonderm00n_open_graph_plugin_settings=array(
42
  'fb_show_businessdirectoryplugin'
43
  );
44
 
 
 
 
 
 
 
 
45
  function wonderm00n_open_graph() {
46
  global $wonderm00n_open_graph_plugin_settings, $wonderm00n_open_graph_plugin_version;
47
 
@@ -258,7 +265,7 @@ function wonderm00n_open_graph() {
258
  $html.='<meta property="og:url" content="'.trim(esc_attr($fb_url)).'" />
259
  ';
260
  if (intval($fb_url_canonical)==1) {
261
- remove_action('wp_head', 'rel_canonical'); //Try to remove the old canonical URL - Not working I guess...
262
  $html.='<link rel="canonical" href="'.trim(esc_attr($fb_url)).'" />
263
  ';
264
  }
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
+ * @version 0.4.3
5
  */
6
  /*
7
  Plugin Name: Wonderm00n's Simple Facebook Open Graph Meta Tags
8
  Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
9
  Description: This plugin inserts Facebook Open Graph Tags into your Wordpress Blog/Website for better Facebook sharing
10
  Author: Marco Almeida (Wonderm00n)
11
+ Version: 0.4.3
12
  Author URI: http://wonderm00n.com
13
  */
14
 
15
+ $wonderm00n_open_graph_plugin_version='0.4.3';
16
  $wonderm00n_open_graph_plugin_settings=array(
17
  'fb_app_id_show',
18
  'fb_app_id',
42
  'fb_show_businessdirectoryplugin'
43
  );
44
 
45
+ //We have to remove canonical NOW because the plugin runs to late
46
+ if (get_option('wonderm00n_open_graph_fb_url_show')==1) {
47
+ if (get_option('wonderm00n_open_graph_fb_url_canonical')==1) {
48
+ remove_action('wp_head', 'rel_canonical');
49
+ }
50
+ }
51
+
52
  function wonderm00n_open_graph() {
53
  global $wonderm00n_open_graph_plugin_settings, $wonderm00n_open_graph_plugin_version;
54
 
265
  $html.='<meta property="og:url" content="'.trim(esc_attr($fb_url)).'" />
266
  ';
267
  if (intval($fb_url_canonical)==1) {
268
+ //remove_action('wp_head', 'rel_canonical'); //Try to remove the old canonical URL - Not working I guess... THIS IS DONE BEFORE
269
  $html.='<link rel="canonical" href="'.trim(esc_attr($fb_url)).'" />
270
  ';
271
  }