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

Version Description

  • Fix: Specific post image was not working properly
  • Added a "Clear field" button to the specific post image options box
  • When the homepage is set as a static page, the "homepage description" section on the settings page will reflect that
Download this release

Release Info

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

Code changes from version 1.1.1 to 1.1.2

includes/settings-page.php CHANGED
@@ -292,13 +292,21 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
292
  <tr class="fb_description_options">
293
  <th scope="row" nowrap="nowrap"><?php _e('Homepage description', 'wd-fb-og');?>:</th>
294
  <td>
295
- <?php _e('Use', 'wd-fb-og');?>
296
- <select name="fb_desc_homepage" id="fb_desc_homepage" onchange="showDescriptionCustomText();">
297
- <option value=""<?php if (trim($fb_desc_homepage)=='') echo ' selected="selected"'; ?>><?php _e('Website tagline', 'wd-fb-og');?>&nbsp;</option>
298
- <option value="custom"<?php if (trim($fb_desc_homepage)=='custom') echo ' selected="selected"'; ?>><?php _e('Custom text', 'wd-fb-og');?>&nbsp;</option>
299
- </select>
300
- <div id="fb_desc_homepage_customtext_div">
301
- <textarea name="fb_desc_homepage_customtext" id="fb_desc_homepage_customtext" rows="3" cols="50"><?php echo $fb_desc_homepage_customtext; ?></textarea>
 
 
 
 
 
 
 
 
302
  </div>
303
  </td>
304
  </tr>
292
  <tr class="fb_description_options">
293
  <th scope="row" nowrap="nowrap"><?php _e('Homepage description', 'wd-fb-og');?>:</th>
294
  <td>
295
+ <?php
296
+ $hide_home_description=false;
297
+ if (get_option('show_on_front')=='page') {
298
+ $hide_home_description=true;
299
+ _e('The description of your front page:', 'wd-fb-og');
300
+ echo '<a href="'.get_edit_post_link(get_option('page_on_front')).'" target="_blank">'.get_the_title(get_option('page_on_front')).'</a>';
301
+ }; ?>
302
+ <div<?php if ($hide_home_description) echo ' style="display: none;"'; ?>><?php _e('Use', 'wd-fb-og');?>
303
+ <select name="fb_desc_homepage" id="fb_desc_homepage" onchange="showDescriptionCustomText();">
304
+ <option value=""<?php if (trim($fb_desc_homepage)=='') echo ' selected="selected"'; ?>><?php _e('Website tagline', 'wd-fb-og');?>&nbsp;</option>
305
+ <option value="custom"<?php if (trim($fb_desc_homepage)=='custom') echo ' selected="selected"'; ?>><?php _e('Custom text', 'wd-fb-og');?>&nbsp;</option>
306
+ </select>
307
+ <div id="fb_desc_homepage_customtext_div">
308
+ <textarea name="fb_desc_homepage_customtext" id="fb_desc_homepage_customtext" rows="3" cols="50"><?php echo $fb_desc_homepage_customtext; ?></textarea>
309
+ </div>
310
  </div>
311
  </td>
312
  </tr>
lang/wd-fb-og-pt_PT.mo CHANGED
Binary file
lang/wd-fb-og-pt_PT.po CHANGED
@@ -1,21 +1,22 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v1.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2013-11-27 10:29-0000\n"
7
  "Last-Translator: Wonderm00n <wonderm00n@gmail.com>\n"
8
  "Language-Team: Webdados <info@webdados.pt>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Generator: Poedit 1.5.7\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
  "X-Poedit-Basepath: ../\n"
18
  "X-Textdomain-Support: yes\n"
 
19
  "X-Poedit-SearchPath-0: .\n"
20
 
21
  # @ wd-fb-og
@@ -431,3 +432,13 @@ msgid ""
431
  msgstr ""
432
  "É ALTAMENTE recomendado ir a <a href=\"admin.php?page=wpseo_social\">SEO "
433
  "&gt; Social</a> e desactivar \"Adiciona meta dados Open Graph \""
 
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v1.1.2\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2014-04-19 13:31-0000\n"
7
  "Last-Translator: Wonderm00n <wonderm00n@gmail.com>\n"
8
  "Language-Team: Webdados <info@webdados.pt>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Generator: Poedit 1.6.4\n"
14
  "X-Poedit-SourceCharset: UTF-8\n"
15
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
  "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
  "X-Poedit-Basepath: ../\n"
18
  "X-Textdomain-Support: yes\n"
19
+ "Language: pt_PT\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
  # @ wd-fb-og
432
  msgstr ""
433
  "É ALTAMENTE recomendado ir a <a href=\"admin.php?page=wpseo_social\">SEO "
434
  "&gt; Social</a> e desactivar \"Adiciona meta dados Open Graph \""
435
+
436
+ # @ wd-fb-og
437
+ #: wonderm00n-open-graph.php:519
438
+ msgid "Clear field"
439
+ msgstr "Limpar campo"
440
+
441
+ # @ wd-fb-og
442
+ #: includes/settings-page.php:299
443
+ msgid "The description of your front page:"
444
+ msgstr "A descrição da sua página inicial:"
lang/wd-fb-og.pot CHANGED
@@ -3,7 +3,7 @@ msgstr ""
3
  "Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v1.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2013-11-27 10:18-0000\n"
7
  "Last-Translator: Webdados <info@webdados.pt>\n"
8
  "Language-Team: Webdados <info@webdados.pt>\n"
9
  "MIME-Version: 1.0\n"
@@ -404,3 +404,14 @@ msgid ""
404
  "It's HIGHLY recommended to go to <a href=\"admin.php?page=wpseo_social\">SEO "
405
  "&gt; Social</a> and disable \"Add Open Graph meta data\""
406
  msgstr ""
 
 
 
 
 
 
 
 
 
 
 
3
  "Project-Id-Version: Facebook Open Graph Meta Tags for WordPress v1.1\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2014-04-19 13:28-0000\n"
7
  "Last-Translator: Webdados <info@webdados.pt>\n"
8
  "Language-Team: Webdados <info@webdados.pt>\n"
9
  "MIME-Version: 1.0\n"
404
  "It's HIGHLY recommended to go to <a href=\"admin.php?page=wpseo_social\">SEO "
405
  "&gt; Social</a> and disable \"Add Open Graph meta data\""
406
  msgstr ""
407
+
408
+
409
+ # @ wd-fb-og
410
+ #: wonderm00n-open-graph.php:519
411
+ msgid "Clear field"
412
+ msgstr ""
413
+
414
+ # @ wd-fb-og
415
+ #: includes/settings-page.php:299
416
+ msgid "The description of your front page:"
417
+ msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webdados, wonderm00n
3
  Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
4
  Tags: facebook, open graph, open graph protocol, seo, share, social, meta, schema, google+, g+, google, google plus, image, like, meta, search engine optimization
5
  Requires at least: 3.5
6
- Tested up to: 3.7.1
7
- Stable tag: 1.1.1
8
 
9
  This plugin inserts Facebook Open Graph, Google+/Schema.org and other Meta Tags into your WordPress Website for more efficient sharing results.
10
 
@@ -57,6 +57,11 @@ It allows the user to choose which tags are, or not, included and also the defau
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
60
  = 1.1.1 =
61
  * Fix: a debug var_dump was left uncommented
62
  * readme.txt adjustments
3
  Donate link: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
4
  Tags: facebook, open graph, open graph protocol, seo, share, social, meta, schema, google+, g+, google, google plus, image, like, meta, search engine optimization
5
  Requires at least: 3.5
6
+ Tested up to: 3.9
7
+ Stable tag: 1.1.2
8
 
9
  This plugin inserts Facebook Open Graph, Google+/Schema.org and other Meta Tags into your WordPress Website for more efficient sharing results.
10
 
57
 
58
  == Changelog ==
59
 
60
+ = 1.1.2 =
61
+ * Fix: Specific post image was not working properly
62
+ * Added a "Clear field" button to the specific post image options box
63
+ * When the homepage is set as a static page, the "homepage description" section on the settings page will reflect that
64
+
65
  = 1.1.1 =
66
  * Fix: a debug var_dump was left uncommented
67
  * readme.txt adjustments
wonderm00n-open-graph.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * @package Facebook Open Graph Meta Tags for WordPress
4
- * @version 1.1.1
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph Meta Tags for WordPress
8
  Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
9
  Description: This plugin (formerly known as "Wonderm00n's Simple Facebook Open Graph Meta Tags") inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective and efficient Facebook sharing results. It also allows you to add the Meta Description tag and Schema.org Name, Description and Image tags for more effective and efficient Google+ 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
- Version: 1.1.1
11
  Author: Webdados
12
  Author URI: http://www.webdados.pt
13
  Text Domain: wd-fb-og
@@ -16,7 +16,7 @@ Domain Path: /lang
16
 
17
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
 
19
- $wonderm00n_open_graph_plugin_version='1.1.1';
20
  $wonderm00n_open_graph_plugin_settings=array(
21
  'fb_app_id_show',
22
  'fb_app_id',
@@ -383,7 +383,7 @@ function wonderm00n_open_graph_post_image($fb_image_use_specific=1,$fb_image_use
383
  $thumbdone=false;
384
  $fb_image='';
385
  //Specific post image
386
- if (intval($fb_image_use_featured)==1) {
387
  if ($fb_image=trim(get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true))) {
388
  if (trim($fb_image)!='') {
389
  $thumbdone=true;
@@ -515,13 +515,17 @@ if ( is_admin() ) {
515
  _e('Use this image:', 'wd-fb-og');
516
  echo '</label> ';
517
  echo '<input type="text" id="webdados_fb_open_graph_specific_image" name="webdados_fb_open_graph_specific_image" value="' . esc_attr( $value ) . '" size="75" />
518
- <input id="webdados_fb_open_graph_specific_image_button" class="button" type="button" value="'.__('Upload/Choose Open Graph Image','wd-fb-og').'" />';
 
519
  echo '<br/>'.__('Recommended size: 1200x630px', 'wd-fb-og');
520
  echo '<script type="text/javascript">
521
  jQuery(document).ready(function(){
522
  jQuery(\'#webdados_fb_open_graph_specific_image_button\').live(\'click\', function() {
523
  tb_show(\'Upload image\', \'media-upload.php?post_id='.$post->ID.'&type=image&context=webdados_fb_open_graph_specific_image_button&TB_iframe=true\');
524
  });
 
 
 
525
  });
526
  </script>';
527
  }
1
  <?php
2
  /**
3
  * @package Facebook Open Graph Meta Tags for WordPress
4
+ * @version 1.1.2
5
  */
6
  /*
7
  Plugin Name: Facebook Open Graph Meta Tags for WordPress
8
  Plugin URI: http://blog.wonderm00n.com/2011/10/14/wordpress-plugin-simple-facebook-open-graph-tags/
9
  Description: This plugin (formerly known as "Wonderm00n's Simple Facebook Open Graph Meta Tags") inserts Facebook Open Graph Tags into your WordPress Blog/Website for more effective and efficient Facebook sharing results. It also allows you to add the Meta Description tag and Schema.org Name, Description and Image tags for more effective and efficient Google+ 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
+ Version: 1.1.2
11
  Author: Webdados
12
  Author URI: http://www.webdados.pt
13
  Text Domain: wd-fb-og
16
 
17
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
18
 
19
+ $wonderm00n_open_graph_plugin_version='1.1.2';
20
  $wonderm00n_open_graph_plugin_settings=array(
21
  'fb_app_id_show',
22
  'fb_app_id',
383
  $thumbdone=false;
384
  $fb_image='';
385
  //Specific post image
386
+ if (intval($fb_image_use_specific)==1) {
387
  if ($fb_image=trim(get_post_meta($post->ID, '_webdados_fb_open_graph_specific_image', true))) {
388
  if (trim($fb_image)!='') {
389
  $thumbdone=true;
515
  _e('Use this image:', 'wd-fb-og');
516
  echo '</label> ';
517
  echo '<input type="text" id="webdados_fb_open_graph_specific_image" name="webdados_fb_open_graph_specific_image" value="' . esc_attr( $value ) . '" size="75" />
518
+ <input id="webdados_fb_open_graph_specific_image_button" class="button" type="button" value="'.__('Upload/Choose Open Graph Image','wd-fb-og').'" />
519
+ <input id="webdados_fb_open_graph_specific_image_button_clear" class="button" type="button" value="'.__('Clear field','wd-fb-og').'"/>';
520
  echo '<br/>'.__('Recommended size: 1200x630px', 'wd-fb-og');
521
  echo '<script type="text/javascript">
522
  jQuery(document).ready(function(){
523
  jQuery(\'#webdados_fb_open_graph_specific_image_button\').live(\'click\', function() {
524
  tb_show(\'Upload image\', \'media-upload.php?post_id='.$post->ID.'&type=image&context=webdados_fb_open_graph_specific_image_button&TB_iframe=true\');
525
  });
526
+ jQuery(\'#webdados_fb_open_graph_specific_image_button_clear\').live(\'click\', function() {
527
+ jQuery(\'#webdados_fb_open_graph_specific_image\').val(\'\');
528
+ });
529
  });
530
  </script>';
531
  }