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

Version Description

  • Fixed a bug where all the settings could be lost when saving other plugins options (Shame on me!!)
Download this release

Release Info

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

Code changes from version 0.3.3 to 0.3.4

includes/settings-page.php CHANGED
@@ -9,6 +9,36 @@
9
  *
10
  */
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  //Load the defaults
14
  $defaults=wonderm00n_open_graph_default_values();
9
  *
10
  */
11
 
12
+ //First we save!
13
+ if ( isset($_POST['action']) ) {
14
+ if (trim($_POST['action'])=='save') {
15
+ //This should also use the $wonderm00n_open_graph_plugin_settings array, but because of intval and trim we still can't
16
+ update_option('wonderm00n_open_graph_fb_app_id_show', intval($_POST['fb_app_id_show']));
17
+ update_option('wonderm00n_open_graph_fb_app_id', trim($_POST['fb_app_id']));
18
+ update_option('wonderm00n_open_graph_fb_admin_id_show', intval($_POST['fb_admin_id_show']));
19
+ update_option('wonderm00n_open_graph_fb_admin_id', trim($_POST['fb_admin_id']));
20
+ update_option('wonderm00n_open_graph_fb_locale_show', intval($_POST['fb_locale_show']));
21
+ update_option('wonderm00n_open_graph_fb_locale', trim($_POST['fb_locale']));
22
+ update_option('wonderm00n_open_graph_fb_sitename_show', intval($_POST['fb_sitename_show']));
23
+ update_option('wonderm00n_open_graph_fb_title_show', intval($_POST['fb_title_show']));
24
+ update_option('wonderm00n_open_graph_fb_url_show', intval($_POST['fb_url_show']));
25
+ update_option('wonderm00n_open_graph_fb_url_add_trailing', intval($_POST['fb_url_add_trailing']));
26
+ update_option('wonderm00n_open_graph_fb_type_show', intval($_POST['fb_type_show']));
27
+ update_option('wonderm00n_open_graph_fb_type_homepage', trim($_POST['fb_type_homepage']));
28
+ update_option('wonderm00n_open_graph_fb_desc_show', intval($_POST['fb_desc_show']));
29
+ update_option('wonderm00n_open_graph_fb_desc_chars', intval($_POST['fb_desc_chars']));
30
+ update_option('wonderm00n_open_graph_fb_desc_homepage', trim($_POST['fb_desc_homepage']));
31
+ update_option('wonderm00n_open_graph_fb_desc_homepage_customtext', trim($_POST['fb_desc_homepage_customtext']));
32
+ update_option('wonderm00n_open_graph_fb_image_show', intval($_POST['fb_image_show']));
33
+ update_option('wonderm00n_open_graph_fb_image', trim($_POST['fb_image']));
34
+ update_option('wonderm00n_open_graph_fb_image_rss', intval($_POST['fb_image_rss']));
35
+ update_option('wonderm00n_open_graph_fb_image_use_featured', intval($_POST['fb_image_use_featured']));
36
+ update_option('wonderm00n_open_graph_fb_image_use_content', intval($_POST['fb_image_use_content']));
37
+ update_option('wonderm00n_open_graph_fb_image_use_media', intval($_POST['fb_image_use_media']));
38
+ update_option('wonderm00n_open_graph_fb_image_use_default', intval($_POST['fb_image_use_default']));
39
+ update_option('wonderm00n_open_graph_fb_show_subheading', intval($_POST['fb_show_subheading']));
40
+ }
41
+ }
42
 
43
  //Load the defaults
44
  $defaults=wonderm00n_open_graph_default_values();
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.4.2
7
- Stable tag: 0.3.3
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.3.3 =
39
 
40
  * Fixed a bug where unset options would become active again. Thanks to @scrumpit.
4
  Tags: facebook, open graph, seo, share, social, meta
5
  Requires at least: 3
6
  Tested up to: 3.4.2
7
+ Stable tag: 0.3.4
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.3.4 =
39
+
40
+ * Fixed a bug where all the settings could be lost when saving other plugins options (Shame on me!!)
41
+
42
  = 0.3.3 =
43
 
44
  * Fixed a bug where unset options would become active again. Thanks to @scrumpit.
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.3.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.3.3
12
  Author URI: http://wonderm00n.com
13
  */
14
 
15
- $wonderm00n_open_graph_plugin_version='0.3.3';
16
  $wonderm00n_open_graph_plugin_settings=array(
17
  'fb_app_id_show',
18
  'fb_app_id',
@@ -339,37 +339,6 @@ function wonderm00n_open_graph_post_image($fb_image_use_featured=1, $fb_image_us
339
  //Admin
340
  if ( is_admin() ) {
341
 
342
- //First we save!
343
- if ( isset($_POST['action']) ) {
344
- if (trim($_POST['action'])=='save') {
345
- //This should also use the $wonderm00n_open_graph_plugin_settings array, but because of intval and trim we still can't
346
- update_option('wonderm00n_open_graph_fb_app_id_show', intval($_POST['fb_app_id_show']));
347
- update_option('wonderm00n_open_graph_fb_app_id', trim($_POST['fb_app_id']));
348
- update_option('wonderm00n_open_graph_fb_admin_id_show', intval($_POST['fb_admin_id_show']));
349
- update_option('wonderm00n_open_graph_fb_admin_id', trim($_POST['fb_admin_id']));
350
- update_option('wonderm00n_open_graph_fb_locale_show', intval($_POST['fb_locale_show']));
351
- update_option('wonderm00n_open_graph_fb_locale', trim($_POST['fb_locale']));
352
- update_option('wonderm00n_open_graph_fb_sitename_show', intval($_POST['fb_sitename_show']));
353
- update_option('wonderm00n_open_graph_fb_title_show', intval($_POST['fb_title_show']));
354
- update_option('wonderm00n_open_graph_fb_url_show', intval($_POST['fb_url_show']));
355
- update_option('wonderm00n_open_graph_fb_url_add_trailing', intval($_POST['fb_url_add_trailing']));
356
- update_option('wonderm00n_open_graph_fb_type_show', intval($_POST['fb_type_show']));
357
- update_option('wonderm00n_open_graph_fb_type_homepage', trim($_POST['fb_type_homepage']));
358
- update_option('wonderm00n_open_graph_fb_desc_show', intval($_POST['fb_desc_show']));
359
- update_option('wonderm00n_open_graph_fb_desc_chars', intval($_POST['fb_desc_chars']));
360
- update_option('wonderm00n_open_graph_fb_desc_homepage', trim($_POST['fb_desc_homepage']));
361
- update_option('wonderm00n_open_graph_fb_desc_homepage_customtext', trim($_POST['fb_desc_homepage_customtext']));
362
- update_option('wonderm00n_open_graph_fb_image_show', intval($_POST['fb_image_show']));
363
- update_option('wonderm00n_open_graph_fb_image', trim($_POST['fb_image']));
364
- update_option('wonderm00n_open_graph_fb_image_rss', intval($_POST['fb_image_rss']));
365
- update_option('wonderm00n_open_graph_fb_image_use_featured', intval($_POST['fb_image_use_featured']));
366
- update_option('wonderm00n_open_graph_fb_image_use_content', intval($_POST['fb_image_use_content']));
367
- update_option('wonderm00n_open_graph_fb_image_use_media', intval($_POST['fb_image_use_media']));
368
- update_option('wonderm00n_open_graph_fb_image_use_default', intval($_POST['fb_image_use_default']));
369
- update_option('wonderm00n_open_graph_fb_show_subheading', intval($_POST['fb_show_subheading']));
370
- }
371
- }
372
-
373
  add_action('admin_menu', 'wonderm00n_open_graph_add_options');
374
 
375
  register_activation_hook(__FILE__, 'wonderm00n_open_graph_activate');
1
  <?php
2
  /**
3
  * @package Wonderm00n's Simple Facebook Open Graph Meta Tags
4
+ * @version 0.3.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.3.4
12
  Author URI: http://wonderm00n.com
13
  */
14
 
15
+ $wonderm00n_open_graph_plugin_version='0.3.4';
16
  $wonderm00n_open_graph_plugin_settings=array(
17
  'fb_app_id_show',
18
  'fb_app_id',
339
  //Admin
340
  if ( is_admin() ) {
341
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  add_action('admin_menu', 'wonderm00n_open_graph_add_options');
343
 
344
  register_activation_hook(__FILE__, 'wonderm00n_open_graph_activate');