| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* The plugin bootstrap file |
| 5 |
* |
| 6 |
* This file is read by WordPress to generate the plugin information in the plugin |
| 7 |
* admin area. This file also includes all of the dependencies used by the plugin, |
| 8 |
* registers the activation and deactivation functions, and defines a function |
| 9 |
* that starts the plugin. |
| 10 |
* |
| 11 |
* @link https://themeatelier.net/ |
| 12 |
* @since 1.0.0 |
| 13 |
* @package Darkify |
| 14 |
* |
| 15 |
* @wordpress-plugin |
| 16 |
* Plugin Name: Darkify |
| 17 |
* Plugin URI: https://wp-plugins.themeatelier.net/ |
| 18 |
* Description: Darkify is for a stylish, modern darkmode look that people love. |
| 19 |
* Version: 1.2.1 |
| 20 |
* Author: ThemeAtelier |
| 21 |
* Author URI: https://themeatelier.net/ |
| 22 |
* License: GPL-2.0+ |
| 23 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 24 |
* Text Domain: darkify |
| 25 |
* Domain Path: /languages |
| 26 |
*/ |
| 27 |
|
| 28 |
// If this file is called directly, abort. |
| 29 |
if (!defined('WPINC')) { |
| 30 |
die; |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* Currently plugin version. |
| 35 |
* Start at version 1.0.0 and use SemVer - https://semver.org |
| 36 |
* Rename this for your plugin and update it as you release new versions. |
| 37 |
*/ |
| 38 |
define('DRK_LITE_VERSION', '1.2.1'); |
| 39 |
define('DRK_LITE_DIR_URL', plugin_dir_url(__FILE__)); |
| 40 |
define('DRK_LITE_BASENAME', plugin_basename(__FILE__)); |
| 41 |
define('DRK_LITE_PATH', plugin_dir_path(__FILE__)); |
| 42 |
|
| 43 |
/** |
| 44 |
* The code that runs during plugin activation. |
| 45 |
* This action is documented in includes/class-darkify-activator.php |
| 46 |
*/ |
| 47 |
function darkify_activate() |
| 48 |
{ |
| 49 |
require_once DRK_LITE_PATH . 'includes/class-darkify-activator.php'; |
| 50 |
Darkify_Activator::activate(); |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* The code that runs during plugin deactivation. |
| 55 |
* This action is documented in includes/class-darkify-deactivator.php |
| 56 |
*/ |
| 57 |
function darkify_deactivate() |
| 58 |
{ |
| 59 |
require_once DRK_LITE_PATH . 'includes/class-darkify-deactivator.php'; |
| 60 |
Darkify_Deactivator::deactivate(); |
| 61 |
} |
| 62 |
|
| 63 |
register_activation_hook(__FILE__, 'darkify_activate'); |
| 64 |
register_deactivation_hook(__FILE__, 'darkify_deactivate'); |
| 65 |
|
| 66 |
require DRK_LITE_PATH . 'includes/class-darkify.php'; |
| 67 |
|
| 68 |
|
| 69 |
function darkify_run() |
| 70 |
{ |
| 71 |
$plugin = new Darkify(); |
| 72 |
$plugin->run(); |
| 73 |
} |
| 74 |
darkify_run(); |
| 75 |
|
| 76 |
|
| 77 |
/** |
| 78 |
* Initialize the plugin tracker |
| 79 |
* |
| 80 |
* @return void |
| 81 |
*/ |
| 82 |
function darkify_appsero_init() |
| 83 |
{ |
| 84 |
|
| 85 |
if (!class_exists('DarkifyAppSero\Insights')) { |
| 86 |
require_once DRK_LITE_PATH . 'admin/appsero/Client.php'; |
| 87 |
} |
| 88 |
|
| 89 |
$client = new DarkifyAppSero\Client('d1635433-15b4-474b-98f8-0c0809dec2c1', 'Darkify', __FILE__); |
| 90 |
// Active insights |
| 91 |
$client->insights()->init(); |
| 92 |
} |
| 93 |
|
| 94 |
darkify_appsero_init(); |