-
Notifications
You must be signed in to change notification settings - Fork 2
/
pinit.php
71 lines (59 loc) · 2.01 KB
/
pinit.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
<?php
/**
* Pinit: Pinterest for WordPress
*
* @package Pinit
* @author Eugenio Petullà <support@codeat.co>
* @license GPL-2.0+
* @link http://codeat.co/pinit
* @copyright 2016 Mattia Migliorini e Eugenio Petullà
*
* @wordpress-plugin
* Plugin Name: Pinit
* Plugin URI: http://codeat.co/pinit
* Description: Handy plugin that adds Pinterest Follow Button, Pin Widget, Profile Widget and Board Widget to your WordPress site.
* Version: 2.1.1
* Author: deshack
* Author URI: https://github.com/deshack/
* Text Domain: pinit
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( !defined( 'WPINC' ) ) {
die;
}
/*
* ------------------------------------------------------------------------------
* Public-Facing Functionality
* ------------------------------------------------------------------------------
*/
require_once( plugin_dir_path( __FILE__ ) . 'includes/load_textdomain.php' );
require_once( plugin_dir_path( __FILE__ ) . 'public/class-pinit.php' );
/*
* - 9999 is used for load the plugin as last for resolve some
* problems when the plugin use API of other plugins, remove
* if you don' want this
*/
add_action( 'plugins_loaded', array( 'Pinit', 'get_instance' ), 9999 );
require_once( plugin_dir_path( __FILE__ ) . 'includes/widgets/widgets.php' );
/*
* -----------------------------------------------------------------------------
* Dashboard and Administrative Functionality
* -----------------------------------------------------------------------------
*/
/*
*
* If you want to include Ajax within the dashboard, change the following
* conditional to:
*
* if ( is_admin() ) {
* ...
* }
*
*/
if ( is_admin() && (!defined( 'DOING_AJAX' ) || !DOING_AJAX ) ) {
require_once( plugin_dir_path( __FILE__ ) . 'admin/class-pinit-admin.php' );
add_action( 'plugins_loaded', array( 'Pinit_Admin', 'get_instance' ) );
}