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

Version Description

  • Shortcodes are now stripped from og:description
  • Changed og:app_id and og:admins not to be included by default
Download this release

Release Info

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

Code changes from version 0.1.2 to 0.1.4

Files changed (2) hide show
  1. readme.txt +20 -11
  2. wonderm00n-open-graph.php +5 -5
readme.txt CHANGED
@@ -4,26 +4,26 @@ 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.2
8
 
9
- This plugin inserts Facebook Open Grpah Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
11
  == Description ==
12
 
13
- This plugin inserts Facebook Open Grpah Tags into your WordPress Blog/Website for more effective Facebook sharing results.
14
 
15
  It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
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
24
- * og:type : "article" for posts and pages and "website" for all the others
25
- * og:description : From post/page excerpt if it exists, or from post/page content
26
- * og:image : From post/page featured/thumbnail image, or if it doesn't exists from the first image in the post content, or if it doesn't exists from the first image on the post media gallery, or if it doesn't exists from the default image defined on the options menu
27
 
28
  == Installation ==
29
 
@@ -33,6 +33,15 @@ The tags that this plugin inserts are:
33
 
34
  == Changelog ==
35
 
 
 
 
 
 
 
 
 
 
36
  = 0.1.2 =
37
 
38
  * Fixing a bug for themes that do not support post thumbnail
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.4
8
 
9
+ This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
10
 
11
  == Description ==
12
 
13
+ This plugin inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective Facebook sharing results.
14
 
15
  It allows the user to choose which tags are, or not, included and also the default image if the post/page doesn't have one.
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
24
+ * **og:type** : "article" for posts and pages and "website" for all the others
25
+ * **og:description** : From post/page excerpt if it exists, or from post/page content
26
+ * **og:image** : From post/page featured/thumbnail image, or if it doesn't exists from the first image in the post content, or if it doesn't exists from the first image on the post media gallery, or if it doesn't exists from the default image defined on the options menu
27
 
28
  == Installation ==
29
 
33
 
34
  == Changelog ==
35
 
36
+ = 0.1.4 =
37
+
38
+ * Shortcodes are now stripped from og:description
39
+ * Changed og:app_id and og:admins not to be included by default
40
+
41
+ = 0.1.3 =
42
+
43
+ * Just fixing some typos
44
+
45
  = 0.1.2 =
46
 
47
  * Fixing a bug for themes that do not support post thumbnail
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.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.1.1
12
  Author URI: http://wonderm00n.com
13
  */
14
 
@@ -41,7 +41,7 @@ function wonderm00n_open_graph() {
41
  //If not we grab it from the content
42
  $fb_desc=trim($post->post_content);
43
  }
44
- $fb_desc=(intval($fb_desc_chars)>0 ? substr(esc_attr(strip_tags(stripslashes($fb_desc))),0,$fb_desc_chars) : esc_attr(strip_tags(stripslashes($fb_desc))));
45
  $thumbok=false;
46
  if (function_exists('get_post_thumbnail_id')) {
47
  $thumbok=true;
@@ -182,8 +182,8 @@ function wonderm00n_open_graph_add_options() {
182
 
183
  function wonderm00n_open_graph_activate() {
184
  update_option("wonderm00n_open_graph_activated", 1);
185
- update_option("wonderm00n_open_graph_fb_admin_id_show", 1);
186
- update_option("wonderm00n_open_graph_fb_app_id_show", 1);
187
  update_option("wonderm00n_open_graph_fb_sitename_show", 1);
188
  update_option("wonderm00n_open_graph_fb_title_show", 1);
189
  update_option("wonderm00n_open_graph_fb_url_show", 1);
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
+ * @version 0.1.4
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.4
12
  Author URI: http://wonderm00n.com
13
  */
14
 
41
  //If not we grab it from the content
42
  $fb_desc=trim($post->post_content);
43
  }
44
+ $fb_desc=(intval($fb_desc_chars)>0 ? substr(esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))),0,$fb_desc_chars) : esc_attr(strip_tags(strip_shortcodes(stripslashes($fb_desc)))));
45
  $thumbok=false;
46
  if (function_exists('get_post_thumbnail_id')) {
47
  $thumbok=true;
182
 
183
  function wonderm00n_open_graph_activate() {
184
  update_option("wonderm00n_open_graph_activated", 1);
185
+ update_option("wonderm00n_open_graph_fb_admin_id_show", 0);
186
+ update_option("wonderm00n_open_graph_fb_app_id_show", 0);
187
  update_option("wonderm00n_open_graph_fb_sitename_show", 1);
188
  update_option("wonderm00n_open_graph_fb_title_show", 1);
189
  update_option("wonderm00n_open_graph_fb_url_show", 1);