WP Embed Facebook - Version 2.0.1

Version Description

  • Fixed message on photo single post
Download this release

Release Info

Developer poxtron
Plugin Icon 128x128 WP Embed Facebook
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0 to 2.0.1

readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: Facebook, facebook, Social Plugins, embed facebook, facebook video, facebook posts, facebook publication, facebook publications, facebook event, facebook events, facebook pages, facebook page, facebook profiles, facebook album, facebook albums, facebook photos, facebook photo, social,
5
  Requires at least: 3.8.1
6
  Tested up to: 4.3.2
7
- Stable tag: 2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -138,6 +138,9 @@ This is a facebook limitation, will try to work around it.
138
 
139
  == Changelog ==
140
 
 
 
 
141
  = 2.0 =
142
  * Fixed language issue when embedding social plugins in admin
143
  * Fixed time on events
@@ -291,5 +294,5 @@ This is a facebook limitation, will try to work around it.
291
 
292
  == Upgrade Notice ==
293
 
294
- = 2.0 =
295
- * Overall Working a LOT Better.
4
  Tags: Facebook, facebook, Social Plugins, embed facebook, facebook video, facebook posts, facebook publication, facebook publications, facebook event, facebook events, facebook pages, facebook page, facebook profiles, facebook album, facebook albums, facebook photos, facebook photo, social,
5
  Requires at least: 3.8.1
6
  Tested up to: 4.3.2
7
+ Stable tag: 2.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
138
 
139
  == Changelog ==
140
 
141
+ = 2.0.1 =
142
+ * Fixed message on photo single post
143
+
144
  = 2.0 =
145
  * Fixed language issue when embedding social plugins in admin
146
  * Fixed time on events
294
 
295
  == Upgrade Notice ==
296
 
297
+ = 2.0.1 =
298
+ * show messages on picture single post
templates/classic/single-post.php CHANGED
@@ -29,9 +29,9 @@ date_default_timezone_set($old_time_zone);
29
  <?php echo isset($fb_post['story']) ? '<p>'.$fb_post['story'].'</p>' : '';?>
30
  <p class="post-time" ><?php echo $post_time ?></p>
31
  <?php
 
32
  switch($fb_post["type"]) :
33
  case 'video':
34
- echo $message ? '<p>'.$message.'</p>':'';
35
  if($is_fb_link){
36
  $raw = WP_Embed_FB::$raw;
37
  $width_r = WP_Embed_FB::$width;
@@ -52,7 +52,6 @@ date_default_timezone_set($old_time_zone);
52
  }
53
  break;
54
  case 'event':
55
- echo $message ? '<p>'.$message.'</p>':'';
56
  WP_Embed_FB::$width = $width-40;
57
  echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
58
  WP_Embed_FB::$width = $width;
@@ -62,15 +61,11 @@ date_default_timezone_set($old_time_zone);
62
  <a href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?>" rel="nofollow" target="_blank">
63
  <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
64
  </a>
65
- <?php echo $description; ?>
66
  <?php
67
  break;
68
- case 'status':
69
- echo $message ? '<p>'.$message.'</p>':'';
70
- break;
71
  case 'music':
72
  case 'link':
73
- echo $message ? '<p>'.$message.'</p>':'';
74
  ?>
75
  <div class="post-link" style="max-width: <?php echo $width?>px;">
76
  <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
@@ -87,12 +82,14 @@ date_default_timezone_set($old_time_zone);
87
  </div>
88
  <?php
89
  break;
 
90
  default:
91
- echo $message ? '<p>'.$message.'</p>':'';
92
  ?>
93
- <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
94
- <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
95
- </a>
 
 
96
  <?php echo $link_info; ?>
97
  <?php
98
  break;
29
  <?php echo isset($fb_post['story']) ? '<p>'.$fb_post['story'].'</p>' : '';?>
30
  <p class="post-time" ><?php echo $post_time ?></p>
31
  <?php
32
+ echo $message ? '<p>'.$message.'</p>':'';
33
  switch($fb_post["type"]) :
34
  case 'video':
 
35
  if($is_fb_link){
36
  $raw = WP_Embed_FB::$raw;
37
  $width_r = WP_Embed_FB::$width;
52
  }
53
  break;
54
  case 'event':
 
55
  WP_Embed_FB::$width = $width-40;
56
  echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
57
  WP_Embed_FB::$width = $width;
61
  <a href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?>" rel="nofollow" target="_blank">
62
  <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
63
  </a>
64
+ <?php echo $link_info; ?>
65
  <?php
66
  break;
 
 
 
67
  case 'music':
68
  case 'link':
 
69
  ?>
70
  <div class="post-link" style="max-width: <?php echo $width?>px;">
71
  <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
82
  </div>
83
  <?php
84
  break;
85
+ case 'status':
86
  default:
 
87
  ?>
88
+ <?php if(isset($fb_post['full_picture'],$fb_post['link']) && !empty($fb_post['full_picture']) && !empty($fb_post['link'])) : ?>
89
+ <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
90
+ <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
91
+ </a>
92
+ <?php endif; ?>
93
  <?php echo $link_info; ?>
94
  <?php
95
  break;
templates/default/single-post.php CHANGED
@@ -29,9 +29,9 @@ date_default_timezone_set($old_time_zone);
29
  <?php echo isset($fb_post['story']) ? '<p>'.$fb_post['story'].'</p>' : '';?>
30
  <p class="post-time" ><?php echo $post_time ?></p>
31
  <?php
 
32
  switch($fb_post["type"]) :
33
  case 'video':
34
- echo $message ? '<p>'.$message.'</p>':'';
35
  if($is_fb_link){
36
  $raw = WP_Embed_FB::$raw;
37
  $width_r = WP_Embed_FB::$width;
@@ -52,7 +52,6 @@ date_default_timezone_set($old_time_zone);
52
  }
53
  break;
54
  case 'event':
55
- echo $message ? '<p>'.$message.'</p>':'';
56
  WP_Embed_FB::$width = $width-40;
57
  echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
58
  WP_Embed_FB::$width = $width;
@@ -62,15 +61,11 @@ date_default_timezone_set($old_time_zone);
62
  <a href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?>" rel="nofollow" target="_blank">
63
  <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
64
  </a>
65
- <?php echo $description; ?>
66
  <?php
67
  break;
68
- case 'status':
69
- echo $message ? '<p>'.$message.'</p>':'';
70
- break;
71
  case 'music':
72
  case 'link':
73
- echo $message ? '<p>'.$message.'</p>':'';
74
  ?>
75
  <div class="post-link" style="max-width: <?php echo $width?>px;">
76
  <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
@@ -87,12 +82,14 @@ date_default_timezone_set($old_time_zone);
87
  </div>
88
  <?php
89
  break;
 
90
  default:
91
- echo $message ? '<p>'.$message.'</p>':'';
92
  ?>
93
- <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
94
- <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
95
- </a>
 
 
96
  <?php echo $link_info; ?>
97
  <?php
98
  break;
29
  <?php echo isset($fb_post['story']) ? '<p>'.$fb_post['story'].'</p>' : '';?>
30
  <p class="post-time" ><?php echo $post_time ?></p>
31
  <?php
32
+ echo $message ? '<p>'.$message.'</p>':'';
33
  switch($fb_post["type"]) :
34
  case 'video':
 
35
  if($is_fb_link){
36
  $raw = WP_Embed_FB::$raw;
37
  $width_r = WP_Embed_FB::$width;
52
  }
53
  break;
54
  case 'event':
 
55
  WP_Embed_FB::$width = $width-40;
56
  echo $wp_embed->shortcode(array('src'=>$fb_post['link']));
57
  WP_Embed_FB::$width = $width;
61
  <a href="<?php echo "https://www.facebook.com/".$link[0]."/posts/".$link[1] ?>" rel="nofollow" target="_blank">
62
  <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
63
  </a>
64
+ <?php echo $link_info; ?>
65
  <?php
66
  break;
 
 
 
67
  case 'music':
68
  case 'link':
 
69
  ?>
70
  <div class="post-link" style="max-width: <?php echo $width?>px;">
71
  <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
82
  </div>
83
  <?php
84
  break;
85
+ case 'status':
86
  default:
 
87
  ?>
88
+ <?php if(isset($fb_post['full_picture']) && !empty($fb_post['full_picture'])) : ?>
89
+ <a href="<?php echo $fb_post['link'] ?>" rel="nofollow" target="_blank">
90
+ <img src="<?php echo $fb_post['full_picture'] ?>" width="100%" height="auto" /><br>
91
+ </a>
92
+ <?php endif; ?>
93
  <?php echo $link_info; ?>
94
  <?php
95
  break;
wp-embed-facebook.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Embed Facebook
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed any public Facebook video, photo, album, event, page, profile, or post. Copy the facebook url to a single line on your post, or use shortcode [facebook=url ] more information at <a href="http://www.wpembedfb.com" title="plugin website">www.wpembedfb.com</a>
6
  Author: Miguel Sirvent
7
- Version: 2.0
8
  Author URI: http://profiles.wordpress.org/poxtron/
9
  */
10
  require_once('lib/class-wp-embed-fb-plugin.php');
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed any public Facebook video, photo, album, event, page, profile, or post. Copy the facebook url to a single line on your post, or use shortcode [facebook=url ] more information at <a href="http://www.wpembedfb.com" title="plugin website">www.wpembedfb.com</a>
6
  Author: Miguel Sirvent
7
+ Version: 2.0.1
8
  Author URI: http://profiles.wordpress.org/poxtron/
9
  */
10
  require_once('lib/class-wp-embed-fb-plugin.php');