|
8 | 8 | * @since 0.1.0 |
9 | 9 | */ |
10 | 10 |
|
11 | | -namespace Statify; |
| 11 | +namespace Pluginkollektiv\Statify; |
12 | 12 |
|
13 | 13 | // Quit if accessed outside WP context. |
14 | 14 | defined( 'ABSPATH' ) || exit; |
|
17 | 17 | * Statify. |
18 | 18 | * |
19 | 19 | * @since 0.1.0 |
20 | | - * @since 2.0.0 moved to Statify namespace |
| 20 | + * @since 2.0.0 moved to Pluginkollektiv\Statify namespace |
21 | 21 | */ |
22 | 22 | class Statify { |
23 | 23 | const TRACKING_METHOD_DEFAULT = 0; |
@@ -65,31 +65,31 @@ public static function init() { |
65 | 65 | ); |
66 | 66 |
|
67 | 67 | // Cron. |
68 | | - add_action( 'statify_cleanup', array( 'Statify\Cron', 'cleanup_data' ) ); |
| 68 | + add_action( 'statify_cleanup', array( 'Pluginkollektiv\\Statify\Cron', 'cleanup_data' ) ); |
69 | 69 |
|
70 | 70 | if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) { // XMLRPC. |
71 | | - add_filter( 'xmlrpc_methods', array( 'Statify\XMLRPC', 'xmlrpc_methods' ) ); |
| 71 | + add_filter( 'xmlrpc_methods', array( 'Pluginkollektiv\\Statify\Xmlrpc', 'xmlrpc_methods' ) ); |
72 | 72 | } elseif ( is_admin() ) { // Backend. |
73 | | - add_action( 'wp_initialize_site', array( 'Statify\Install', 'init_site' ) ); |
74 | | - add_action( 'wp_uninitialize_site', array( 'Statify\Uninstall', 'init_site' ) ); |
75 | | - add_action( 'wp_dashboard_setup', array( 'Statify\Dashboard', 'init' ) ); |
76 | | - add_filter( 'plugin_row_meta', array( 'Statify\Backend', 'add_meta_link' ), 10, 2 ); |
77 | | - add_filter( 'plugin_action_links_' . STATIFY_BASE, array( 'Statify\Backend', 'add_action_link' ) ); |
78 | | - add_action( 'admin_init', array( 'Statify\Settings', 'register_settings' ) ); |
79 | | - add_action( 'admin_menu', array( 'Statify\Settings', 'add_admin_menu' ) ); |
80 | | - add_action( 'update_option_statify', array( 'Statify\Settings', 'action_update_options' ), 10, 2 ); |
| 73 | + add_action( 'wp_initialize_site', array( 'Pluginkollektiv\\Statify\Install', 'init_site' ) ); |
| 74 | + add_action( 'wp_uninitialize_site', array( 'Pluginkollektiv\\Statify\Uninstall', 'init_site' ) ); |
| 75 | + add_action( 'wp_dashboard_setup', array( 'Pluginkollektiv\\Statify\Dashboard', 'init' ) ); |
| 76 | + add_filter( 'plugin_row_meta', array( 'Pluginkollektiv\\Statify\Backend', 'add_meta_link' ), 10, 2 ); |
| 77 | + add_filter( 'plugin_action_links_' . STATIFY_BASE, array( 'Pluginkollektiv\\Statify\Backend', 'add_action_link' ) ); |
| 78 | + add_action( 'admin_init', array( 'Pluginkollektiv\\Statify\Settings', 'register_settings' ) ); |
| 79 | + add_action( 'admin_menu', array( 'Pluginkollektiv\\Statify\Settings', 'add_admin_menu' ) ); |
| 80 | + add_action( 'update_option_statify', array( 'Pluginkollektiv\\Statify\Settings', 'action_update_options' ), 10, 2 ); |
81 | 81 | } else { // Frontend. |
82 | | - add_action( 'template_redirect', array( 'Statify\Frontend', 'track_visit' ) ); |
83 | | - add_filter( 'query_vars', array( 'Statify\Frontend', 'query_vars' ) ); |
84 | | - add_action( 'wp_footer', array( 'Statify\Frontend', 'wp_footer' ) ); |
| 82 | + add_action( 'template_redirect', array( 'Pluginkollektiv\\Statify\Frontend', 'track_visit' ) ); |
| 83 | + add_filter( 'query_vars', array( 'Pluginkollektiv\\Statify\Frontend', 'query_vars' ) ); |
| 84 | + add_action( 'wp_footer', array( 'Pluginkollektiv\\Statify\Frontend', 'wp_footer' ) ); |
85 | 85 | if ( function_exists( 'amp_is_request' ) || function_exists( 'is_amp_endpoint' ) ) { |
86 | 86 | // Automattic AMP plugin present. |
87 | | - add_filter( 'amp_analytics_entries', array( 'Statify\Frontend', 'amp_analytics_entries' ) ); |
88 | | - add_filter( 'amp_post_template_analytics', array( 'Statify\Frontend', 'amp_post_template_analytics' ) ); |
| 87 | + add_filter( 'amp_analytics_entries', array( 'Pluginkollektiv\\Statify\Frontend', 'amp_analytics_entries' ) ); |
| 88 | + add_filter( 'amp_post_template_analytics', array( 'Pluginkollektiv\\Statify\Frontend', 'amp_post_template_analytics' ) ); |
89 | 89 | } |
90 | 90 | // Initialize REST API. |
91 | 91 | if ( self::is_javascript_tracking_enabled() ) { |
92 | | - add_filter( 'rest_api_init', array( 'Statify\Api', 'init' ) ); |
| 92 | + add_filter( 'rest_api_init', array( 'Pluginkollektiv\\Statify\Api', 'init' ) ); |
93 | 93 | } |
94 | 94 | } |
95 | 95 | } |
|
0 commit comments