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

Version Description

  • Fixed the namespace declarations
Download this release

Release Info

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

Code changes from version 0.1.8 to 0.1.8.1

Files changed (2) hide show
  1. readme.txt +7 -3
  2. wonderm00n-open-graph.php +10 -4
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-faceb
4
  Tags: facebook, open graph, seo, share, social, meta
5
  Requires at least: 3
6
  Tested up to: 3.2.1
7
- Stable tag: 0.1.8
8
 
9
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
@@ -16,8 +16,8 @@ It allows the user to choose which tags are, or not, included and also the defau
16
 
17
  The tags that this plugin inserts are:
18
 
19
- * **og:app_id** : From settings on the options screen.
20
- * **og:admins** : From settings on the options screen.
21
  * **og:site_name** : From blog title.
22
  * **og:title** : From post/page/archive/tag/... title.
23
  * **og:url** : From the post/page permalink.
@@ -33,6 +33,10 @@ The tags that this plugin inserts are:
33
 
34
  == Changelog ==
35
 
 
 
 
 
36
  = 0.1.8 =
37
 
38
  * Type 'website' was being used as default for all the urls beside posts. This is wrong. According to Facebook Open Graph specification only the homepage should be 'website' and all the other contents must bu 'article'. This was fixed.
4
  Tags: facebook, open graph, seo, share, social, meta
5
  Requires at least: 3
6
  Tested up to: 3.2.1
7
+ Stable tag: 0.1.8.1
8
 
9
  This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
16
 
17
  The tags that this plugin inserts are:
18
 
19
+ * **fb:app_id** : From settings on the options screen.
20
+ * **fb:admins** : From settings on the options screen.
21
  * **og:site_name** : From blog title.
22
  * **og:title** : From post/page/archive/tag/... title.
23
  * **og:url** : From the post/page permalink.
33
 
34
  == Changelog ==
35
 
36
+ = 0.1.8.1 =
37
+
38
+ * Fixed the namespace declarations
39
+
40
  = 0.1.8 =
41
 
42
  * Type 'website' was being used as default for all the urls beside posts. This is wrong. According to Facebook Open Graph specification only the homepage should be 'website' and all the other contents must bu 'article'. This was fixed.
wonderm00n-open-graph.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
- * @version 0.1.8
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.1.8
12
  Author URI: http://wonderm00n.com
13
  */
14
 
@@ -178,11 +178,17 @@ add_action('wp_head', 'wonderm00n_open_graph', 9999);
178
  function wonderm00n_open_graph_add_opengraph_namespace( $output ) {
179
  if (stristr($output,'xmlns:og')) {
180
  //Already there
181
- return $output;
182
  } else {
183
  //Let's add it
184
- return $output . ' xmlns:og="http://opengraphprotocol.org/schema/"';
185
  }
 
 
 
 
 
 
 
186
  }
187
  //We want to be last to add the namespace because some other plugin may already added it ;-)
188
  add_filter('language_attributes', 'wonderm00n_open_graph_add_opengraph_namespace',9999);
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
+ * @version 0.1.8.1
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.1.8.1
12
  Author URI: http://wonderm00n.com
13
  */
14
 
178
  function wonderm00n_open_graph_add_opengraph_namespace( $output ) {
179
  if (stristr($output,'xmlns:og')) {
180
  //Already there
 
181
  } else {
182
  //Let's add it
183
+ $output=$output . ' xmlns:og="http://ogp.me/ns#"';
184
  }
185
+ if (stristr($output,'xmlns:fb')) {
186
+ //Already there
187
+ } else {
188
+ //Let's add it
189
+ $output=$output . ' xmlns:fb="http://ogp.me/ns/fb#"';
190
+ }
191
+ return $output;
192
  }
193
  //We want to be last to add the namespace because some other plugin may already added it ;-)
194
  add_filter('language_attributes', 'wonderm00n_open_graph_add_opengraph_namespace',9999);