| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Statify |
| 4 |
Description: Compact, easy-to-use and privacy-compliant stats plugin for WordPress. |
| 5 |
Text Domain: statify |
| 6 |
Domain Path: /lang |
| 7 |
Author: pluginkollektiv |
| 8 |
Author URI: https://pluginkollektiv.org |
| 9 |
Plugin URI: https://wordpress.org/plugins/statify |
| 10 |
License: GPLv3 or later |
| 11 |
Version: 1.4.3 |
| 12 |
*/ |
| 13 |
|
| 14 |
/* |
| 15 |
Copyright (C) 2011-2015 Sergej Müller |
| 16 |
|
| 17 |
This program is free software; you can redistribute it and/or modify |
| 18 |
it under the terms of the GNU General Public License as published by |
| 19 |
the Free Software Foundation; either version 3 of the License, or |
| 20 |
(at your option) any later version. |
| 21 |
|
| 22 |
This program is distributed in the hope that it will be useful, |
| 23 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 |
GNU General Public License for more details. |
| 26 |
|
| 27 |
You should have received a copy of the GNU General Public License along |
| 28 |
with this program; if not, write to the Free Software Foundation, Inc., |
| 29 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 30 |
*/ |
| 31 |
|
| 32 |
|
| 33 |
/* Quit */ |
| 34 |
defined('ABSPATH') OR exit; |
| 35 |
|
| 36 |
|
| 37 |
/* Constants */ |
| 38 |
define('STATIFY_FILE', __FILE__); |
| 39 |
define('STATIFY_DIR', dirname(__FILE__)); |
| 40 |
define('STATIFY_BASE', plugin_basename(__FILE__)); |
| 41 |
|
| 42 |
|
| 43 |
/* Hooks */ |
| 44 |
add_action( |
| 45 |
'plugins_loaded', |
| 46 |
array( |
| 47 |
'Statify', |
| 48 |
'instance' |
| 49 |
) |
| 50 |
); |
| 51 |
register_activation_hook( |
| 52 |
STATIFY_FILE, |
| 53 |
array( |
| 54 |
'Statify_Install', |
| 55 |
'init' |
| 56 |
) |
| 57 |
); |
| 58 |
register_deactivation_hook( |
| 59 |
STATIFY_FILE, |
| 60 |
array( |
| 61 |
'Statify_Deactivate', |
| 62 |
'init' |
| 63 |
) |
| 64 |
); |
| 65 |
register_uninstall_hook( |
| 66 |
STATIFY_FILE, |
| 67 |
array( |
| 68 |
'Statify_Uninstall', |
| 69 |
'init' |
| 70 |
) |
| 71 |
); |
| 72 |
|
| 73 |
|
| 74 |
/* Autoload */ |
| 75 |
spl_autoload_register('statify_autoload'); |
| 76 |
|
| 77 |
function statify_autoload($class) { |
| 78 |
$plugin_classes = array( |
| 79 |
'Statify', |
| 80 |
'Statify_Backend', |
| 81 |
'Statify_Frontend', |
| 82 |
'Statify_Dashboard', |
| 83 |
'Statify_Install', |
| 84 |
'Statify_Uninstall', |
| 85 |
'Statify_Deactivate', |
| 86 |
'Statify_Table', |
| 87 |
'Statify_XMLRPC', |
| 88 |
'Statify_Cron' |
| 89 |
); |
| 90 |
|
| 91 |
if ( in_array($class, $plugin_classes) ) { |
| 92 |
require_once( |
| 93 |
sprintf( |
| 94 |
'%s/inc/%s.class.php', |
| 95 |
STATIFY_DIR, |
| 96 |
strtolower($class) |
| 97 |
) |
| 98 |
); |
| 99 |
} |
| 100 |
} |
| 101 |
|