| 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://themeatelier.net/downloads/darkify/ |
| 18 |
* Description: Darkify is for a stylish, modern darkmode look that people love. |
| 19 |
* Version: 1.3.4 |
| 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 |
require_once __DIR__ . '/vendor/autoload.php'; |
| 34 |
|
| 35 |
use ThemeAtelier\Darkify\Darkify; |
| 36 |
|
| 37 |
/** |
| 38 |
* Currently plugin version. |
| 39 |
* Start at version 1.0.0 and use SemVer - https://semver.org |
| 40 |
* Rename this for your plugin and update it as you release new versions. |
| 41 |
*/ |
| 42 |
define('DARKIFY_VERSION', '1.3.4'); |
| 43 |
define('DARKIFY_FILE', __FILE__); |
| 44 |
define('DARKIFY_DIR_URL', plugin_dir_url(__FILE__)); |
| 45 |
define('DARKIFY_BASENAME', plugin_basename(__FILE__)); |
| 46 |
define('DARKIFY_PATH', plugin_dir_path(__FILE__)); |
| 47 |
define('DARKIFY_DIR_NAME', dirname(__FILE__)); |
| 48 |
|
| 49 |
|
| 50 |
function darkify() |
| 51 |
{ |
| 52 |
// Launch the plugin. |
| 53 |
$darkify = new Darkify(); |
| 54 |
$darkify->run(); |
| 55 |
} |
| 56 |
|
| 57 |
include_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 58 |
$pro_plugin_slug = 'darkify-pro/darkify-pro.php'; |
| 59 |
// kick-off the plugin |
| 60 |
if (!is_plugin_active($pro_plugin_slug)) { |
| 61 |
darkify(); |
| 62 |
} |
| 63 |
|
| 64 |
|
| 65 |
/** |
| 66 |
* Options page callback |
| 67 |
*/ |
| 68 |
function darkify_settings() {} |
| 69 |
|
| 70 |
|
| 71 |
/** |
| 72 |
* Initialize the plugin tracker |
| 73 |
* |
| 74 |
* @return void |
| 75 |
*/ |
| 76 |
function darkify_appsero_init() |
| 77 |
{ |
| 78 |
|
| 79 |
if (!class_exists('DarkifyAppSero\Insights')) { |
| 80 |
require_once DARKIFY_PATH . 'src/Admin/appsero/Client.php'; |
| 81 |
} |
| 82 |
|
| 83 |
$client = new DarkifyAppSero\Client('d1635433-15b4-474b-98f8-0c0809dec2c1', 'Darkify', __FILE__); |
| 84 |
// Active insights |
| 85 |
$client->insights()->init(); |
| 86 |
} |
| 87 |
|
| 88 |
darkify_appsero_init(); |
| 89 |
|