WP Embed Facebook - Version 2.1.3

Version Description

  • Fixed: includes giving problems in some sites.
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

lang/wp-embed-facebook.pot CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the WP Embed Facebook package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Embed Facebook 2.1.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/wp-embed-facebook\n"
8
  "POT-Creation-Date: 2016-06-22 18:07:38+00:00\n"
2
  # This file is distributed under the same license as the WP Embed Facebook package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Embed Facebook 2.1.2\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/wp-embed-facebook\n"
8
  "POT-Creation-Date: 2016-06-22 18:07:38+00:00\n"
lib/class-wef-comments.php CHANGED
@@ -55,7 +55,7 @@ class WEF_Comments extends WP_Embed_FB_Plugin {
55
  static function comments_template( $template ) {
56
  $array = self::string_to_array( self::get_option( 'auto_comments_post_types' ) );
57
  if ( in_array( $GLOBALS['post']->post_type, $array ) ) {
58
- $template = self::get_path() . 'templates/comments.php';
59
  }
60
 
61
  return $template;
55
  static function comments_template( $template ) {
56
  $array = self::string_to_array( self::get_option( 'auto_comments_post_types' ) );
57
  if ( in_array( $GLOBALS['post']->post_type, $array ) ) {
58
+ $template = self::path() . 'templates/comments.php';
59
  }
60
 
61
  return $template;
lib/class-wp-embed-fb-admin.php CHANGED
@@ -28,7 +28,7 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
28
  <p>Hey! The last step.</p>
29
 
30
  <p><img style="position:relative; top: 5px;" height="20px" width="auto"
31
- src="<?php echo self::get_url() . 'lib/admin/ic_setting.png' ?>">&nbsp;Turn on <a
32
  id="wef-video-down" href="<?php echo admin_url( "options-general.php?page=embedfacebook" ) ?>">Video
33
  Download Option</a> in settings.</p>
34
  <small>
@@ -83,11 +83,11 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
83
  */
84
  static function admin_enqueue_scripts( $hook_suffix ) {
85
  if ( $hook_suffix == 'settings_page_embedfacebook' ) {
86
- wp_enqueue_style( 'wpemfb-admin-css', self::get_url() . 'lib/admin/admin.css' );
87
  }
88
- wp_enqueue_style( 'wpemfb-default', self::get_url() . 'templates/default/default.css', array(), false );
89
- wp_enqueue_style( 'wpemfb-classic', self::get_url() . 'templates/classic/classic.css', array(), false );
90
- wp_enqueue_style( 'wpemfb-lightbox', self::get_url() . 'lib/lightbox2/css/lightbox.css', array(), false );
91
  }
92
 
93
  static function in_admin_footer() {
@@ -132,7 +132,7 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
132
  }
133
 
134
  static function add_action_link( $links ) {
135
- array_unshift( $links, '<a href="' . admin_url( "options-general.php?page=embedfacebook" ) . '">' . __( "Settings" ) . '</a>' );
136
 
137
  return $links;
138
  }
@@ -141,8 +141,8 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
141
  * Add template editor style to the embeds.
142
  */
143
  static function admin_init() {
144
- add_editor_style( self::get_url() . '/templates/default/default.css' );
145
- add_editor_style( self::get_url() . '/templates/classic/classic.css' );
146
  }
147
 
148
  /**
@@ -340,7 +340,7 @@ class WP_Embed_FB_Admin extends WP_Embed_FB_Plugin {
340
  self::field( 'checkbox', 'auto_embed_active', __( 'Auto embed url\'s on editor ', 'wp-embed-facebook' ) );
341
  self::field( 'number', 'max_width', __( 'Maximum width in pixels', 'wp-embed-facebook' ), array(), array( 'min' => '0' ) );
342
  self::field( 'checkbox', 'video_as_post', __( 'Embed video as post', 'wp-embed-facebook' ) );
343
- self::field( 'checkbox', 'video_download', sprintf( __( '%sDownload link under video', 'wp-embed-facebook' ), '<img style="display:block;float:left;padding-right:5px;" width="25px" height="auto" src="' . self::get_url() . 'lib/admin/ic_image_settings.png">' ) );
344
 
345
  self::field( 'string', sprintf( __( 'The quote plugin lets people select text on your page and add it to their share.<br><a href="%s" target="_blank" title="WP Embed Facebook">Demo</a>', 'wp-embed-facebook' ), 'http://www.wpembedfb.com/demo-site/social-plugins/quote-plugin/' ), '<h3>' . __( 'Quote Plugin', 'wp-embed-facebook' ) . '</h3>' );
346
  self::field( 'checkbox', 'quote_plugin_active', __( 'Active', 'wp-embed-facebook' ) );
28
  <p>Hey! The last step.</p>
29
 
30
  <p><img style="position:relative; top: 5px;" height="20px" width="auto"
31
+ src="<?php echo self::url() . 'lib/admin/ic_setting.png' ?>">&nbsp;Turn on <a
32
  id="wef-video-down" href="<?php echo admin_url( "options-general.php?page=embedfacebook" ) ?>">Video
33
  Download Option</a> in settings.</p>
34
  <small>
83
  */
84
  static function admin_enqueue_scripts( $hook_suffix ) {
85
  if ( $hook_suffix == 'settings_page_embedfacebook' ) {
86
+ wp_enqueue_style( 'wpemfb-admin-css', self::url() . 'lib/admin/admin.css' );
87
  }
88
+ wp_enqueue_style( 'wpemfb-default', self::url() . 'templates/default/default.css', array(), false );
89
+ wp_enqueue_style( 'wpemfb-classic', self::url() . 'templates/classic/classic.css', array(), false );
90
+ wp_enqueue_style( 'wpemfb-lightbox', self::url() . 'lib/lightbox2/css/lightbox.css', array(), false );
91
  }
92
 
93
  static function in_admin_footer() {
132
  }
133
 
134
  static function add_action_link( $links ) {
135
+ array_unshift( $links, '<a title="WP Embed Facebook Settings" href="' . admin_url( "options-general.php?page=embedfacebook" ) . '">' . __( "Settings" ) . '</a>' );
136
 
137
  return $links;
138
  }
141
  * Add template editor style to the embeds.
142
  */
143
  static function admin_init() {
144
+ add_editor_style( self::url() . '/templates/default/default.css' );
145
+ add_editor_style( self::url() . '/templates/classic/classic.css' );
146
  }
147
 
148
  /**
340
  self::field( 'checkbox', 'auto_embed_active', __( 'Auto embed url\'s on editor ', 'wp-embed-facebook' ) );
341
  self::field( 'number', 'max_width', __( 'Maximum width in pixels', 'wp-embed-facebook' ), array(), array( 'min' => '0' ) );
342
  self::field( 'checkbox', 'video_as_post', __( 'Embed video as post', 'wp-embed-facebook' ) );
343
+ self::field( 'checkbox', 'video_download', sprintf( __( '%sDownload link under video', 'wp-embed-facebook' ), '<img style="display:block;float:left;padding-right:5px;" width="25px" height="auto" src="' . self::url() . 'lib/admin/ic_image_settings.png">' ) );
344
 
345
  self::field( 'string', sprintf( __( 'The quote plugin lets people select text on your page and add it to their share.<br><a href="%s" target="_blank" title="WP Embed Facebook">Demo</a>', 'wp-embed-facebook' ), 'http://www.wpembedfb.com/demo-site/social-plugins/quote-plugin/' ), '<h3>' . __( 'Quote Plugin', 'wp-embed-facebook' ) . '</h3>' );
346
  self::field( 'checkbox', 'quote_plugin_active', __( 'Active', 'wp-embed-facebook' ) );
lib/class-wp-embed-fb-plugin.php CHANGED
@@ -231,10 +231,10 @@ class WP_Embed_FB_Plugin {
231
  * Enqueue wp embed facebook styles
232
  */
233
  static function wp_enqueue_scripts() {
234
- wp_register_style( 'wpemfb-default', self::get_url() . 'templates/default/default.css', array(), false );
235
- wp_register_style( 'wpemfb-classic', self::get_url() . 'templates/classic/classic.css', array(), false );
236
- wp_register_style( 'wpemfb-lightbox', self::get_url() . 'lib/lightbox2/css/lightbox.css', array(), false );
237
- wp_register_script( 'wpemfb-lightbox', self::get_url() . 'lib/lightbox2/js/lightbox.min.js', array( 'jquery' )
238
  );
239
  $lb_defaults = self::get_lb_defaults();
240
  $options = self::get_option();
@@ -250,12 +250,12 @@ class WP_Embed_FB_Plugin {
250
  }
251
  wp_register_script(
252
  'wpemfb',
253
- self::get_url() . 'lib/js/wpembedfb.min.js',
254
  array( 'jquery' )
255
  );
256
  wp_register_script(
257
  'wpemfb-fbjs',
258
- self::get_url() . 'lib/js/fb.min.js',
259
  array( 'jquery' )
260
  );
261
  $translation_array = array(
@@ -295,24 +295,18 @@ class WP_Embed_FB_Plugin {
295
  }
296
  }
297
 
298
- static function get_path() {
299
- if ( self::$path ) {
300
- return self::$path;
301
- } else {
302
  self::$path = dirname( plugin_dir_path( __FILE__ ) ) . '/';
303
-
304
- return self::$path;
305
  }
 
306
  }
307
 
308
- static function get_url() {
309
- if ( self::$url ) {
310
- return self::$url;
311
- } else {
312
  self::$url = dirname( plugin_dir_url( __FILE__ ) ) . '/';
313
-
314
- return self::$url;
315
  }
 
316
  }
317
 
318
  static function get_option( $option = null ) {
231
  * Enqueue wp embed facebook styles
232
  */
233
  static function wp_enqueue_scripts() {
234
+ wp_register_style( 'wpemfb-default', self::url() . 'templates/default/default.css', array(), false );
235
+ wp_register_style( 'wpemfb-classic', self::url() . 'templates/classic/classic.css', array(), false );
236
+ wp_register_style( 'wpemfb-lightbox', self::url() . 'lib/lightbox2/css/lightbox.css', array(), false );
237
+ wp_register_script( 'wpemfb-lightbox', self::url() . 'lib/lightbox2/js/lightbox.min.js', array( 'jquery' )
238
  );
239
  $lb_defaults = self::get_lb_defaults();
240
  $options = self::get_option();
250
  }
251
  wp_register_script(
252
  'wpemfb',
253
+ self::url() . 'lib/js/wpembedfb.min.js',
254
  array( 'jquery' )
255
  );
256
  wp_register_script(
257
  'wpemfb-fbjs',
258
+ self::url() . 'lib/js/fb.min.js',
259
  array( 'jquery' )
260
  );
261
  $translation_array = array(
295
  }
296
  }
297
 
298
+ static function path() {
299
+ if ( self::$path == null ) {
 
 
300
  self::$path = dirname( plugin_dir_path( __FILE__ ) ) . '/';
 
 
301
  }
302
+ return self::$path;
303
  }
304
 
305
+ static function url() {
306
+ if ( self::$url == null ) {
 
 
307
  self::$url = dirname( plugin_dir_url( __FILE__ ) ) . '/';
 
 
308
  }
309
+ return self::$url;
310
  }
311
 
312
  static function get_option( $option = null ) {
lib/class-wp-embed-fb.php CHANGED
@@ -511,9 +511,9 @@ class WP_Embed_FB {
511
  return self::$fbsdk;
512
  } else {
513
  if ( ! class_exists( 'FacebookApiException' ) ) {
514
- require_once __DIR__ . "/base_facebook.php";
515
  }
516
- require_once __DIR__ . "/class-sigami-facebook.php";
517
  $config = array();
518
  $config['appId'] = WP_Embed_FB_Plugin::get_option( 'app_id' );
519
  $config['secret'] = WP_Embed_FB_Plugin::get_option( 'app_secret' );
@@ -539,7 +539,7 @@ class WP_Embed_FB {
539
  $located = locate_template( array( 'plugins/wp-embed-facebook/' . $theme . '/' . $template_name . '.php' ) );
540
  $file = 'templates/' . $theme . '/' . $template_name . '.php';
541
  if ( empty( $located ) ) {
542
- $located = WP_Embed_FB_Plugin::get_path() . $file;
543
  }
544
 
545
  return $located;
511
  return self::$fbsdk;
512
  } else {
513
  if ( ! class_exists( 'FacebookApiException' ) ) {
514
+ require_once(WP_Embed_FB_Plugin::path().'lib/base_facebook.php');
515
  }
516
+ require_once(WP_Embed_FB_Plugin::path().'lib/class-sigami-facebook.php');
517
  $config = array();
518
  $config['appId'] = WP_Embed_FB_Plugin::get_option( 'app_id' );
519
  $config['secret'] = WP_Embed_FB_Plugin::get_option( 'app_secret' );
539
  $located = locate_template( array( 'plugins/wp-embed-facebook/' . $theme . '/' . $template_name . '.php' ) );
540
  $file = 'templates/' . $theme . '/' . $template_name . '.php';
541
  if ( empty( $located ) ) {
542
+ $located = WP_Embed_FB_Plugin::path() . $file;
543
  }
544
 
545
  return $located;
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.5.3
7
- Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -102,6 +102,9 @@ This can only be achieved using the premium version
102
 
103
  == Changelog ==
104
 
 
 
 
105
  = 2.1.2 =
106
  * Added: [fb_plugin] shortcode to embed any type of social plugin
107
  * Added: Auto embed comments plugin to certain post types
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.5.3
7
+ Stable tag: 2.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.1.3 =
106
+ * Fixed: includes giving problems in some sites.
107
+
108
  = 2.1.2 =
109
  * Added: [fb_plugin] shortcode to embed any type of social plugin
110
  * Added: Auto embed comments plugin to certain post types
wp-embed-facebook.php CHANGED
@@ -4,17 +4,18 @@ Plugin Name: WP Embed Facebook
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed any public Facebook video, photo, album, event, page, comment, profile, or post. Add Facebook comments to all your site, insert facebook social plugins (like, save, send, share, follow, quote, comments) anywhere on your site. View the <a href="http://www.wpembedfb.com/demo-site/" title="plugin website" target="_blank">demo site</a>.
6
  Author: Miguel Sirvent
7
- Version: 2.1.2
8
  Author URI: http://www.wpembedfb.com
9
  Text Domain: wp-embed-facebook
10
  Domain Path: /lang
11
  */
12
 
13
- require_once( __DIR__ . '/lib/class-wef-social-plugins.php' );
14
-
15
- require_once( __DIR__ . '/lib/class-wp-embed-fb-plugin.php' );
16
  WP_Embed_FB_Plugin::hooks();
17
 
 
 
 
18
  /** @see WP_Embed_FB_Plugin::install */
19
  register_activation_hook( __FILE__, 'WP_Embed_FB_Plugin::install' );
20
 
@@ -25,20 +26,20 @@ register_uninstall_hook( __FILE__, 'WP_Embed_FB_Plugin::uninstall' );
25
  register_deactivation_hook( __FILE__, 'WP_Embed_FB_Plugin::deactivate' );
26
 
27
 
28
- require_once( __DIR__ . '/lib/class-wp-embed-fb.php' );
29
 
30
  /* Magic here */
31
- require_once( __DIR__ . '/lib/class-wef-magic-embeds.php' );
32
  WEF_Magic_Embeds::hooks();
33
 
34
 
35
  if ( WP_Embed_FB_Plugin::get_option( 'auto_comments_active' ) === 'true' ) {
36
- require_once( __DIR__ . '/lib/class-wef-comments.php' );
37
  WEF_Comments::hooks();
38
  }
39
 
40
  if ( is_admin() ) {
41
- require_once( __DIR__ . '/lib/class-wp-embed-fb-admin.php' );
42
  WP_Embed_FB_Admin::hooks();
43
 
44
  /** @see WP_Embed_FB_Admin::add_action_link */
4
  Plugin URI: http://www.wpembedfb.com
5
  Description: Embed any public Facebook video, photo, album, event, page, comment, profile, or post. Add Facebook comments to all your site, insert facebook social plugins (like, save, send, share, follow, quote, comments) anywhere on your site. View the <a href="http://www.wpembedfb.com/demo-site/" title="plugin website" target="_blank">demo site</a>.
6
  Author: Miguel Sirvent
7
+ Version: 2.1.3
8
  Author URI: http://www.wpembedfb.com
9
  Text Domain: wp-embed-facebook
10
  Domain Path: /lang
11
  */
12
 
13
+ require_once( plugin_dir_path( __FILE__ ) . 'lib/class-wp-embed-fb-plugin.php' );
 
 
14
  WP_Embed_FB_Plugin::hooks();
15
 
16
+ require_once( WP_Embed_FB_Plugin::path() . 'lib/class-wef-social-plugins.php' );
17
+
18
+
19
  /** @see WP_Embed_FB_Plugin::install */
20
  register_activation_hook( __FILE__, 'WP_Embed_FB_Plugin::install' );
21
 
26
  register_deactivation_hook( __FILE__, 'WP_Embed_FB_Plugin::deactivate' );
27
 
28
 
29
+ require_once( WP_Embed_FB_Plugin::path() . 'lib/class-wp-embed-fb.php' );
30
 
31
  /* Magic here */
32
+ require_once( WP_Embed_FB_Plugin::path() . 'lib/class-wef-magic-embeds.php' );
33
  WEF_Magic_Embeds::hooks();
34
 
35
 
36
  if ( WP_Embed_FB_Plugin::get_option( 'auto_comments_active' ) === 'true' ) {
37
+ require_once( WP_Embed_FB_Plugin::path() . 'lib/class-wef-comments.php' );
38
  WEF_Comments::hooks();
39
  }
40
 
41
  if ( is_admin() ) {
42
+ require_once( WP_Embed_FB_Plugin::path() . 'lib/class-wp-embed-fb-admin.php' );
43
  WP_Embed_FB_Admin::hooks();
44
 
45
  /** @see WP_Embed_FB_Admin::add_action_link */