PluginProbe
Statify / 1.8.3
Statify v1.8.3
2.0.2 2.0.1 trunk 0.7 0.8 0.9 1.0 1.2.8 1.3.0 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 All 32 releases
statify / statify.php

statify.php in Statify 1.8.3, at statify.php

89 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 * Author: pluginkollektiv
7 * Author URI: https://pluginkollektiv.org/
8 * Plugin URI: https://statify.pluginkollektiv.org/
9 * License: GPLv3 or later
10 * Version: 1.8.3
11 *
12 * @package WordPress
13 */
14
15 /* Quit */
16 defined( 'ABSPATH' ) || exit;
17
18
19 /* Constants */
20 define( 'STATIFY_FILE', __FILE__ );
21 define( 'STATIFY_DIR', dirname( __FILE__ ) );
22 define( 'STATIFY_BASE', plugin_basename( __FILE__ ) );
23 define( 'STATIFY_VERSION', '1.8.3' );
24
25
26 /* Hooks */
27 add_action(
28 'plugins_loaded',
29 array(
30 'Statify',
31 'init',
32 )
33 );
34 register_activation_hook(
35 STATIFY_FILE,
36 array(
37 'Statify_Install',
38 'init',
39 )
40 );
41 register_deactivation_hook(
42 STATIFY_FILE,
43 array(
44 'Statify_Deactivate',
45 'init',
46 )
47 );
48 register_uninstall_hook(
49 STATIFY_FILE,
50 array(
51 'Statify_Uninstall',
52 'init',
53 )
54 );
55
56
57 /* Autoload */
58 spl_autoload_register( 'statify_autoload' );
59
60 /**
61 * Include classes via autoload.
62 *
63 * @param string $class Name of an class-file name, without file extension.
64 */
65 function statify_autoload( $class ) {
66
67 $plugin_classes = array(
68 'Statify',
69 'Statify_Backend',
70 'Statify_Frontend',
71 'Statify_Dashboard',
72 'Statify_Install',
73 'Statify_Uninstall',
74 'Statify_Deactivate',
75 'Statify_Settings',
76 'Statify_Table',
77 'Statify_XMLRPC',
78 'Statify_Cron',
79 );
80
81 if ( in_array( $class, $plugin_classes, true ) ) {
82 require_once sprintf(
83 '%s/inc/class-%s.php',
84 STATIFY_DIR,
85 strtolower( str_replace( '_', '-', $class ) )
86 );
87 }
88 }
89