WP Embed Facebook - Version 1.8.3

Version Description

  • Better Video Embeds
Download this release

Release Info

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

Code changes from version 1.8.2 to 1.8.3

lib/admin.php CHANGED
@@ -232,7 +232,6 @@ class EmbFbAdmin{
232
  <tbody>
233
  <tr valign="middle">
234
  <th><?php _e('Embed Videos Raw','wp-embed-facebook') ?>
235
- <br><small><?php _e('not mobile friendly','wp-embed-facebook') ?></small>
236
  </th>
237
 
238
  <td>
232
  <tbody>
233
  <tr valign="middle">
234
  <th><?php _e('Embed Videos Raw','wp-embed-facebook') ?>
 
235
  </th>
236
 
237
  <td>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: poxtron
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8Q85GT3Q8Q26
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.1
7
- Stable tag: 1.8.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -79,6 +79,9 @@ The embedded post code comes directly from facebook so there is no easy way to c
79
 
80
  == Changelog ==
81
 
 
 
 
82
  = 1.8.2 =
83
  * Fix: Error on some systems nothing critic.
84
 
@@ -161,5 +164,5 @@ The embedded post code comes directly from facebook so there is no easy way to c
161
 
162
  == Upgrade Notice ==
163
 
164
- = 1.8.2 =
165
- Fix: Error on some systems nothing critic
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8Q85GT3Q8Q26
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.1.1
7
+ Stable tag: 1.8.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
79
 
80
  == Changelog ==
81
 
82
+ = 1.8.3 =
83
+ * Better Video Embeds
84
+
85
  = 1.8.2 =
86
  * Fix: Error on some systems nothing critic.
87
 
164
 
165
  == Upgrade Notice ==
166
 
167
+ = 1.8.3 =
168
+ Better video embeds
templates/classic/video.php CHANGED
@@ -4,4 +4,21 @@
4
  * to access all fb data print_r($fb_data)
5
  */
6
  ?>
7
- <iframe src="https://www.facebook.com/video/embed?video_id=<?php echo $fb_data['v_id'] ?>" width="<?php echo $width ?>" height="280px"></iframe>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * to access all fb data print_r($fb_data)
5
  */
6
  ?>
7
+ <?php
8
+ $url = $fb_data['source'];
9
+ $file_array = explode('/',parse_url($url, PHP_URL_PATH));
10
+ $file = end($file_array);
11
+ $type_array = explode('.',$file);
12
+ $type = end($type_array);
13
+ $clean_type = strtolower($type);
14
+ if( $clean_type == 'mp4' || $clean_type == 'webm' || $clean_type == 'ogg') :?>
15
+
16
+ <video width="<?php echo $width ?>" height="280px" controls>
17
+ <source src="<?php echo $fb_data['source'] ?>" type="video/<?php echo $clean_type ?>">
18
+ </video>
19
+
20
+ <?php else : ?>
21
+
22
+ <iframe src="https://www.facebook.com/video/embed?video_id=<?php echo $fb_data['id'] ?>" width="<?php echo $width ?>" height="280px"></iframe>
23
+
24
+ <?php endif; ?>
templates/default/video.php CHANGED
@@ -1,9 +1,24 @@
1
  <?php
2
  /*
3
  * You can create your own template by placing a copy of this file on yourtheme/plugins/wp-embed-fb/
4
- * to access all fb data
5
- * <iframe src="https://www.facebook.com/video/embed?video_id=<?php echo $fb_data['v_id'] ?>" width="<?php echo $width ?>" height="280px"></iframe>
6
- * TODO: resonsive iframe not very usefull since this embed is not mobile friendly
7
  */
8
  ?>
9
- <iframe src="https://www.facebook.com/video/embed?video_id=<?php echo $fb_data['id'] ?>" width="<?php echo $width ?>" height="280px"></iframe>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /*
3
  * You can create your own template by placing a copy of this file on yourtheme/plugins/wp-embed-fb/
4
+ * to access all fb data print_r($fb_data)
 
 
5
  */
6
  ?>
7
+ <?php
8
+ $url = $fb_data['source'];
9
+ $file_array = explode('/',parse_url($url, PHP_URL_PATH));
10
+ $file = end($file_array);
11
+ $type_array = explode('.',$file);
12
+ $type = end($type_array);
13
+ $clean_type = strtolower($type);
14
+ if( $clean_type == 'mp4' || $clean_type == 'webm' || $clean_type == 'ogg') :?>
15
+
16
+ <video width="<?php echo $width ?>" height="280px" controls>
17
+ <source src="<?php echo $fb_data['source'] ?>" type="video/<?php echo $clean_type ?>">
18
+ </video>
19
+
20
+ <?php else : ?>
21
+
22
+ <iframe src="https://www.facebook.com/video/embed?video_id=<?php echo $fb_data['id'] ?>" width="<?php echo $width ?>" height="280px"></iframe>
23
+
24
+ <?php endif; ?>
wp-embed-facebook.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Embed Facebook
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed a Facebook video, photo, album, event, page, profile, or post. Copy any facebook url to a single line on your post, or use shortcode [facebook='url' width='' ] more info at <a href="http://www.wpembedfb.com" title="plugin website">www.wpembedfb.com</a>
6
  Author: Miguel Sirvent
7
- Version: 1.8.2
8
  Author URI: http://profiles.wordpress.org/poxtron/
9
  */
10
 
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed a Facebook video, photo, album, event, page, profile, or post. Copy any facebook url to a single line on your post, or use shortcode [facebook='url' width='' ] more info at <a href="http://www.wpembedfb.com" title="plugin website">www.wpembedfb.com</a>
6
  Author: Miguel Sirvent
7
+ Version: 1.8.3
8
  Author URI: http://profiles.wordpress.org/poxtron/
9
  */
10