Feed & LikeBox For Facebook - Version 1.2

Version Description

31/03/2015

Download this release

Release Info

Developer weblizar
Plugin Icon 128x128 Feed & LikeBox For Facebook
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

Files changed (2) hide show
  1. facebook-by-weblizar.php +35 -15
  2. readme.txt +12 -10
facebook-by-weblizar.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Facebook By WebLizar
4
- * Version: 1.1
5
  * Description: Display your facebook page live stream & friends on WordPress blog.
6
  * Author: WebLizar
7
  * Author URI: http://www.weblizar.com
@@ -49,6 +49,13 @@ class WeblizarFacebook extends WP_Widget {
49
  * @param array $instance Saved values from database.
50
  */
51
  public function widget( $args, $instance ) {
 
 
 
 
 
 
 
52
  $FbAppId = apply_filters( 'facebook_app_id', $instance['FbAppId'] );
53
  $ColorScheme = apply_filters( 'facebook_color_scheme', $instance['ColorScheme'] );
54
  $ForceWall = apply_filters( 'facebook_force_wall', $instance['ForceWall'] );
@@ -60,8 +67,7 @@ class WeblizarFacebook extends WP_Widget {
60
  $Stream = apply_filters( 'facebook_stream', $instance['Stream'] );
61
  $Width = apply_filters( 'facebook_width', $instance['Width'] );
62
 
63
- if ( ! empty( $Title ) )
64
- echo $args['before_title'] . $Title . $args['after_title']; ?>
65
  <style>
66
  @media (max-width:767px) {
67
  .fb_iframe_widget {
@@ -79,18 +85,20 @@ class WeblizarFacebook extends WP_Widget {
79
  }
80
  }
81
  </style>
82
- <div id="fb-root"></div>
83
- <script>(function(d, s, id) {
84
- var js, fjs = d.getElementsByTagName(s)[0];
85
- if (d.getElementById(id)) return;
86
- js = d.createElement(s); js.id = id;
87
- js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=<?php echo $FbAppId; ?>&version=v2.0";
88
- fjs.parentNode.insertBefore(js, fjs);
89
- }(document, 'script', 'facebook-jssdk'));
90
- </script>
91
- <div class="fb-like-box" style="background-color: auto;" colorscheme="<?php echo $ColorScheme; ?>" data-header="<?php echo $Header; ?>" data-height="<?php echo $Height; ?>" data-href="<?php echo $FacebookPageURL; ?>" data-show-border="<?php echo $ShowBorder; ?>" data-show-faces="<?php echo $ShowFaces; ?>" data-stream="<?php echo $Stream; ?>" data-width="<?php echo $Width; ?>" data-force-wall="<?php echo $ForceWall; ?>"></div>
92
-
 
93
  <?php
 
94
  }
95
 
96
  /**
@@ -152,7 +160,18 @@ class WeblizarFacebook extends WP_Widget {
152
  if ( isset( $instance[ 'FbAppId' ] ) ) {
153
  $FbAppId = $instance[ 'FbAppId' ];
154
  }
155
- ?>
 
 
 
 
 
 
 
 
 
 
 
156
  <p>
157
  <label for="<?php echo $this->get_field_id( 'FacebookPageURL' ); ?>"><?php _e( 'Facebook Page URL', WEBLIZAR_FACEBOOK_TEXT_DOMAIN ); ?></label>
158
  <input class="widefat" id="<?php echo $this->get_field_id( 'FacebookPageURL' ); ?>" name="<?php echo $this->get_field_name( 'FacebookPageURL' ); ?>" type="text" value="<?php echo esc_attr( $FacebookPageURL ); ?>">
@@ -214,6 +233,7 @@ class WeblizarFacebook extends WP_Widget {
214
  */
215
  public function update( $new_instance, $old_instance ) {
216
  $instance = array();
 
217
  $instance['FacebookPageURL'] = ( ! empty( $new_instance['FacebookPageURL'] ) ) ? strip_tags( $new_instance['FacebookPageURL'] ) : 'https://www.facebook.com/pages/Weblizar/1440510482872657';
218
  $instance['ColorScheme'] = ( ! empty( $new_instance['ColorScheme'] ) ) ? strip_tags( $new_instance['ColorScheme'] ) : 'light';
219
  $instance['Header'] = ( ! empty( $new_instance['Header'] ) ) ? strip_tags( $new_instance['Header'] ) : 'true';
1
  <?php
2
  /**
3
  * Plugin Name: Facebook By WebLizar
4
+ * Version: 1.2
5
  * Description: Display your facebook page live stream & friends on WordPress blog.
6
  * Author: WebLizar
7
  * Author URI: http://www.weblizar.com
49
  * @param array $instance Saved values from database.
50
  */
51
  public function widget( $args, $instance ) {
52
+ // Outputs the content of the widget
53
+ extract($args); // Make before_widget, etc available.
54
+ $title = apply_filters('title', $instance['title']);
55
+
56
+ echo $before_widget;
57
+ if (!empty($title)) { echo $before_title . $title . $after_title; }
58
+
59
  $FbAppId = apply_filters( 'facebook_app_id', $instance['FbAppId'] );
60
  $ColorScheme = apply_filters( 'facebook_color_scheme', $instance['ColorScheme'] );
61
  $ForceWall = apply_filters( 'facebook_force_wall', $instance['ForceWall'] );
67
  $Stream = apply_filters( 'facebook_stream', $instance['Stream'] );
68
  $Width = apply_filters( 'facebook_width', $instance['Width'] );
69
 
70
+ ?>
 
71
  <style>
72
  @media (max-width:767px) {
73
  .fb_iframe_widget {
85
  }
86
  }
87
  </style>
88
+ <div style="display:block;width:100%;float:left;overflow:hidden;margin-bottom:20px">
89
+ <div id="fb-root"></div>
90
+ <script>(function(d, s, id) {
91
+ var js, fjs = d.getElementsByTagName(s)[0];
92
+ if (d.getElementById(id)) return;
93
+ js = d.createElement(s); js.id = id;
94
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=<?php echo $FbAppId; ?>&version=v2.0";
95
+ fjs.parentNode.insertBefore(js, fjs);
96
+ }(document, 'script', 'facebook-jssdk'));
97
+ </script>
98
+ <div class="fb-like-box" style="background-color: auto;" colorscheme="<?php echo $ColorScheme; ?>" data-header="<?php echo $Header; ?>" data-height="<?php echo $Height; ?>" data-href="<?php echo $FacebookPageURL; ?>" data-show-border="<?php echo $ShowBorder; ?>" data-show-faces="<?php echo $ShowFaces; ?>" data-stream="<?php echo $Stream; ?>" data-width="<?php echo $Width; ?>" data-force-wall="<?php echo $ForceWall; ?>"></div>
99
+ </div>
100
  <?php
101
+ echo $after_widget;
102
  }
103
 
104
  /**
160
  if ( isset( $instance[ 'FbAppId' ] ) ) {
161
  $FbAppId = $instance[ 'FbAppId' ];
162
  }
163
+
164
+ if ( isset( $instance[ 'title' ] ) ) {
165
+ $title = $instance[ 'title' ];
166
+ }
167
+ else {
168
+ $title = __( 'LikeBox', 'WEBLIZAR_FACEBOOK_TEXT_DOMAIN' );
169
+ }
170
+ ?>
171
+ <p>
172
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
173
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
174
+ </p>
175
  <p>
176
  <label for="<?php echo $this->get_field_id( 'FacebookPageURL' ); ?>"><?php _e( 'Facebook Page URL', WEBLIZAR_FACEBOOK_TEXT_DOMAIN ); ?></label>
177
  <input class="widefat" id="<?php echo $this->get_field_id( 'FacebookPageURL' ); ?>" name="<?php echo $this->get_field_name( 'FacebookPageURL' ); ?>" type="text" value="<?php echo esc_attr( $FacebookPageURL ); ?>">
233
  */
234
  public function update( $new_instance, $old_instance ) {
235
  $instance = array();
236
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : 'Tweets';
237
  $instance['FacebookPageURL'] = ( ! empty( $new_instance['FacebookPageURL'] ) ) ? strip_tags( $new_instance['FacebookPageURL'] ) : 'https://www.facebook.com/pages/Weblizar/1440510482872657';
238
  $instance['ColorScheme'] = ( ! empty( $new_instance['ColorScheme'] ) ) ? strip_tags( $new_instance['ColorScheme'] ) : 'light';
239
  $instance['Header'] = ( ! empty( $new_instance['Header'] ) ) ? strip_tags( $new_instance['Header'] ) : 'true';
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: weblizar
3
  Donate link: http://www.weblizar.com/
4
  Tags: facebook, facebook like, facebook widget, facebook page, facebook share, facebook share button, Like, like button, Share, share button, facebook fanbox, facebook page, page, plugin, posts, publish Facebook, sidebar, social, Social Plugins, facebook embed, facebook events, Facebook feed, Like Button Widget,wall, facebook wall, facebook photos, share, tweets, facebook share, facebook news, news, feeds
5
  Requires at least: 3.0
6
- Tested up to: 4.1
7
- Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -86,31 +86,33 @@ Please use WordPress support forum to ask any query regarding any issue.
86
 
87
  == Changelog ==
88
 
89
- For more information, see Weblizar(http://wwww.weblizar.com/).
90
 
91
- = 1.1 = 06/02/2015
92
- * New: Serbian Translation contributed by Borisa Djuraskovic
93
 
 
 
94
 
95
- = 1.0 = 17/12/2014
96
  * Compatible with WordPress 4.1 version
97
  * Remove some unused css code from bootstrap.css
98
  * Update facebook-by-weblizar.php file
99
 
100
- = 0.9 = 06/11/2014
101
  * code update
102
 
103
- = 0.8 = 27/10/2014
104
  * Remove minor bug
105
  * Update css
106
 
107
 
108
- = 0.7 = 05/09/2014
109
  * New: [FBW] shortcode added
110
  * New: Fan Faces Hide & Show Option
111
  * New: Translation Ready With .po & .mo File
112
 
113
- = 0.6 = 20/08/2014
114
  * New: Compatible with WordPress 4.0
115
 
116
  = 0.5 =
3
  Donate link: http://www.weblizar.com/
4
  Tags: facebook, facebook like, facebook widget, facebook page, facebook share, facebook share button, Like, like button, Share, share button, facebook fanbox, facebook page, page, plugin, posts, publish Facebook, sidebar, social, Social Plugins, facebook embed, facebook events, Facebook feed, Like Button Widget,wall, facebook wall, facebook photos, share, tweets, facebook share, facebook news, news, feeds
5
  Requires at least: 3.0
6
+ Tested up to: 4.1.1
7
+ Stable tag: 1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
86
 
87
  == Changelog ==
88
 
89
+ For more information, see [Weblizar](http://wwww.weblizar.com/) .
90
 
91
+ = 1.2 31/03/2015 =
92
+ * New: Added Widget title for plugin widget
93
 
94
+ = 1.1 06/02/2015 =
95
+ * New: Serbian Translation contributed by Borisa Djuraskovic
96
 
97
+ = 1.0 17/12/2014 =
98
  * Compatible with WordPress 4.1 version
99
  * Remove some unused css code from bootstrap.css
100
  * Update facebook-by-weblizar.php file
101
 
102
+ = 0.9 06/11/2014 =
103
  * code update
104
 
105
+ = 0.8 27/10/2014 =
106
  * Remove minor bug
107
  * Update css
108
 
109
 
110
+ = 0.7 05/09/2014 =
111
  * New: [FBW] shortcode added
112
  * New: Fan Faces Hide & Show Option
113
  * New: Translation Ready With .po & .mo File
114
 
115
+ = 0.6 20/08/2014 =
116
  * New: Compatible with WordPress 4.0
117
 
118
  = 0.5 =