PluginProbe
Device Detector / 2.3.0
Device Detector v2.3.0
trunk 1.0.0 1.1.0 1.1.1 1.2.0 1.3.0 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 2.0.0 2.0.1 2.1.0 2.1.1 2.2.0 2.2.1 2.3.0 2.3.1 2.4.0 3.0.0 3.0.1 3.0.2 3.1.0 3.1.1 All 42 releases
device-detector / device-detector.php

device-detector.php in Device Detector 2.3.0, at device-detector.php

81 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main plugin file.
4 *
5 * @package Bootstrap
6 * @author Pierre Lannoy <https://pierre.lannoy.fr/>.
7 * @since 1.1.0
8 *
9 * @wordpress-plugin
10 * Plugin Name: Device Detector
11 * Plugin URI: https://github.com/Pierre-Lannoy/wp-device-detector
12 * Description: Full featured analytics reporting and management tool that detects all devices accessing your WordPress site.
13 * Version: 2.3.0
14 * Requires at least: 5.2
15 * Requires PHP: 7.2
16 * Author: Pierre Lannoy
17 * Author URI: https://pierre.lannoy.fr
18 * License: GPLv3
19 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
20 * Network: true
21 * Text Domain: device-detector
22 * Domain Path: /languages
23 */
24
25 // If this file is called directly, abort.
26 if ( ! defined( 'WPINC' ) ) {
27 die;
28 }
29
30 require_once __DIR__ . '/init.php';
31 require_once __DIR__ . '/includes/system/class-option.php';
32 require_once __DIR__ . '/includes/system/class-environment.php';
33 require_once __DIR__ . '/autoload.php';
34 require_once __DIR__ . '/includes/libraries/class-libraries.php';
35 require_once __DIR__ . '/includes/libraries/autoload.php';
36 require_once __DIR__ . '/includes/features/class-wpcli.php';
37
38 /**
39 * The code that runs during plugin activation.
40 *
41 * @since 1.0.0
42 */
43 function podd_activate() {
44 PODeviceDetector\Plugin\Activator::activate();
45 }
46
47 /**
48 * The code that runs during plugin deactivation.
49 *
50 * @since 1.0.0
51 */
52 function podd_deactivate() {
53 PODeviceDetector\Plugin\Deactivator::deactivate();
54 }
55
56 /**
57 * The code that runs during plugin uninstallation.
58 *
59 * @since 1.0.0
60 */
61 function podd_uninstall() {
62 PODeviceDetector\Plugin\Uninstaller::uninstall();
63 }
64
65 /**
66 * Begins execution of the plugin.
67 *
68 * @since 1.0.0
69 */
70 function podd_run() {
71 \DecaLog\Engine::initPlugin( PODD_SLUG, PODD_PRODUCT_NAME, PODD_VERSION, \PODeviceDetector\Plugin\Core::get_base64_logo() );
72 \PODeviceDetector\System\Cache::init();
73 $plugin = new PODeviceDetector\Plugin\Core();
74 $plugin->run();
75 }
76
77 register_activation_hook( __FILE__, 'podd_activate' );
78 register_deactivation_hook( __FILE__, 'podd_deactivate' );
79 register_uninstall_hook( __FILE__, 'podd_uninstall' );
80 podd_run();
81