Version Description
Download this release
Release Info
Developer | webshouter |
Plugin | WS Facebook Like Box Widget |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 2.0
- ws-fecebook-likebox.php +18 -18
ws-fecebook-likebox.php
CHANGED
@@ -3,29 +3,29 @@
|
|
3 |
Plugin Name: WS Facebook Like Box Widget
|
4 |
Plugin URI: https://wordpress.org/plugins/ws-fecebook-likebox/
|
5 |
Description: WS Facebook Like Box Widget provides easy and quick use in your blog. You can fully customize facebook like box in easy way.
|
6 |
-
Version:
|
7 |
-
Author: Web Shouter
|
8 |
Author URI: http://www.webshouter.net/
|
9 |
-
License: GPL3
|
10 |
-
*/
|
11 |
-
|
12 |
-
class WS_FACEBOOK_LIKEBOX extends WP_Widget {
|
13 |
-
function __construct() {
|
14 |
-
parent::__construct(
|
15 |
-
'ws_fb_like_box', //
|
16 |
-
__( 'WS Facebook Likebox', 'ws-fb-likebox' ), //
|
17 |
array( 'description' => __( 'WS Likebox Widget!', 'ws-fb-likebox' ), ) //Args
|
18 |
-
);
|
19 |
add_action('wp_head', array(&$this, 'ws_add_fb_script_to_head'));
|
20 |
-
}
|
21 |
-
|
22 |
-
//
|
23 |
-
function ws_add_fb_script_to_head(){
|
24 |
|
25 |
echo '<div id="fb-root"></div><script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=&version=v2.0";fjs.parentNode.insertBefore(js, fjs);}(document, "script", "facebook-jssdk"));</script>';
|
26 |
|
27 |
-
}
|
28 |
-
|
29 |
public function form( $instance ) {
|
30 |
if ( isset( $instance['title'] ) ) {
|
31 |
$title = $instance['title'];
|
@@ -179,7 +179,7 @@ public function widget( $args, $instance ) {
|
|
179 |
|
180 |
echo $args['after_widget'];
|
181 |
}
|
182 |
-
|
183 |
}
|
184 |
|
185 |
// register widget
|
3 |
Plugin Name: WS Facebook Like Box Widget
|
4 |
Plugin URI: https://wordpress.org/plugins/ws-fecebook-likebox/
|
5 |
Description: WS Facebook Like Box Widget provides easy and quick use in your blog. You can fully customize facebook like box in easy way.
|
6 |
+
Version: 2.0
|
7 |
+
Author: Web Shouter
|
8 |
Author URI: http://www.webshouter.net/
|
9 |
+
License: GPL3
|
10 |
+
*/
|
11 |
+
|
12 |
+
class WS_FACEBOOK_LIKEBOX extends WP_Widget {
|
13 |
+
function __construct() {
|
14 |
+
parent::__construct(
|
15 |
+
'ws_fb_like_box', //Base ID
|
16 |
+
__( 'WS Facebook Likebox', 'ws-fb-likebox' ), //Name
|
17 |
array( 'description' => __( 'WS Likebox Widget!', 'ws-fb-likebox' ), ) //Args
|
18 |
+
);
|
19 |
add_action('wp_head', array(&$this, 'ws_add_fb_script_to_head'));
|
20 |
+
}
|
21 |
+
|
22 |
+
//Add script to head
|
23 |
+
function ws_add_fb_script_to_head(){
|
24 |
|
25 |
echo '<div id="fb-root"></div><script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=&version=v2.0";fjs.parentNode.insertBefore(js, fjs);}(document, "script", "facebook-jssdk"));</script>';
|
26 |
|
27 |
+
}
|
28 |
+
|
29 |
public function form( $instance ) {
|
30 |
if ( isset( $instance['title'] ) ) {
|
31 |
$title = $instance['title'];
|
179 |
|
180 |
echo $args['after_widget'];
|
181 |
}
|
182 |
+
|
183 |
}
|
184 |
|
185 |
// register widget
|