/
easy-facebook-likebox.php
98 lines (83 loc) · 3.59 KB
/
easy-facebook-likebox.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* Plugin Name: Easy Facebook Likebox
* Plugin URI: httt://wordpress.org/plugins/easy-facebook-likebox
* Description: Easy Facebook like box WordPress plugin allows you to easly display facebook like box fan page on your website using either widget or shortcode to increase facbook fan page likes. You can use the shortcode generated after saving the facebook like box widget. Additionally it also now allows you to dipslay the cusetomized facebook feed on your website using the same color scheme of your website. Its completely customizable with lots of optional settings. Its also responsive facebook like box at the same time.
* Version: 4.2.6
* Author: Sajid Javed
* Author URI: http://jwebsol.com
* Text Domain: easy-facebook-likebox
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
//error_reporting(0);
/*----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
/*
* @EasyFacebookLikeBox:
*
* - Include class for public `easy-facebook-likebox.php`
*
*/
require_once( plugin_dir_path( __FILE__ ) . 'public/includes/core-functions.php' );
require_once( plugin_dir_path( __FILE__ ) . 'public/easy-facebook-likebox.php' );
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*
* @TODO:
*
* - replace Plugin_Name with the name of the class defined in
* `class-plugin-name.php`
*/
register_activation_hook( __FILE__, array( 'Easy_Facebook_Likebox', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'Easy_Facebook_Likebox', 'deactivate' ) );
/*
* @TODO:
*
* - replace Plugin_Name with the name of the class defined in
* `class-plugin-name.php`
*/
add_action( 'plugins_loaded', array( 'Easy_Facebook_Likebox', 'get_instance' ) );
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/*
* @TODO:
*
* - replace `class-plugin-name-admin.php` with the name of the plugin's admin file
* - replace Plugin_Name_Admin with the name of the class defined in
* `class-plugin-name-admin.php`
*
* If you want to include Ajax within the dashboard, change the following
* conditional to:
*
* if ( is_admin() ) {
* ...
* }
*
* The code below is intended to give the lightest footprint possible.
*/
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'admin/easy-facebook-likebox-admin.php' );
add_action( 'plugins_loaded', array( 'Easy_Facebook_Likebox_Admin', 'get_instance' ) );
}
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/*
* Including widget class.
*/
//require_once( plugin_dir_path( __FILE__ ) . 'includes/easy-facebook-likebox-widget.php' );
require_once( plugin_dir_path( __FILE__ ) . 'includes/easy-custom-facebook-feed-widget.php' );
require_once( plugin_dir_path( __FILE__ ) . 'includes/easy-facebook-page-plugin-widget.php' );
// register Foo_Widget widget
function register_fblx_widget() {
register_widget( 'Easy_Custom_Facebook_Feed_Widget' );
register_widget( 'Easy_Facebook_Page_Plugin_Widget' );
}
add_action( 'widgets_init', 'register_fblx_widget' );