PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 2.1.3
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v2.1.3
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
← All changes | darkify.php +39 -24 1.3.02.1.3 View file →
@@ -13,11 +13,13 @@
13 13 * @package Darkify
14 14 *
15 15 * @wordpress-plugin
16 16 * Plugin Name: Darkify
17 - * Plugin URI: https://themeatelier.net/downloads/darkify/
17 + * Plugin URI: https://darkifywp.com/
18 18 * Description: Darkify is for a stylish, modern darkmode look that people love.
19 - * Version: 1.3.0
19 + * Requires at least: 5.5
20 + * Requires PHP: 7.1
21 + * Version: 2.1.3
20 22 * Author: ThemeAtelier
21 23 * Author URI: https://themeatelier.net/
22 24 * License: GPL-2.0+
23 25 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -31,9 +33,9 @@
31 33 }
32 34
33 35 require_once __DIR__ . '/vendor/autoload.php';
34 36
35 -use ThemeAtelier\Darkify\Darkify;
37 +use ThemeAtelier\Darkify\Includes\Darkify;
36 38
37 39 /**
38 40 * Currently plugin version.
39 41 * Start at version 1.0.0 and use SemVer - https://semver.org
@@ -38,17 +40,34 @@
38 40 * Currently plugin version.
39 41 * Start at version 1.0.0 and use SemVer - https://semver.org
40 42 * Rename this for your plugin and update it as you release new versions.
41 43 */
42 -define('DARKIFY_VERSION', '1.3.0');
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__));
44 +if (!defined('DARKIFY_VERSION')) {
45 + define('DARKIFY_VERSION', '2.1.3');
46 +}
47 +if (!defined('DARKIFY_FILE')) {
48 + define('DARKIFY_FILE', __FILE__);
49 +}
50 +if (!defined('DARKIFY_DIR_URL')) {
51 + define('DARKIFY_DIR_URL', plugin_dir_url(__FILE__));
52 +}
53 +if (!defined('DARKIFY_BASENAME')) {
54 + define('DARKIFY_BASENAME', plugin_basename(__FILE__));
55 +}
56 +if (!defined('DARKIFY_PATH')) {
57 + define('DARKIFY_PATH', plugin_dir_path(__FILE__));
58 +}
59 +if (!defined('DARKIFY_DIR_NAME')) {
60 + define('DARKIFY_DIR_NAME', dirname(__FILE__));
61 +}
62 +if (!defined('DARKIFY_DEMO_URL')) {
63 + define('DARKIFY_DEMO_URL', 'https://darkifywp.com/');
64 +}
65 +if (!defined('DARKIFY_DOCS_URL')) {
66 + define('DARKIFY_DOCS_URL', 'https://darkifywp.com/docs/');
67 +}
48 68
49 -
50 -function darkify()
69 +function darkify_run()
51 70 {
52 71 // Launch the plugin.
53 72 $darkify = new Darkify();
54 73 $darkify->run();
@@ -53,23 +72,20 @@
53 72 $darkify = new Darkify();
54 73 $darkify->run();
55 74 }
56 75
76 +/**
77 + * Pro version check.
78 + *
79 + * @return boolean
80 + */
57 81 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();
82 +if (! (is_plugin_active('darkify-pro/darkify-pro.php') || is_plugin_active_for_network('darkify-pro/darkify-pro.php'))) {
83 + darkify_run();
62 84 }
63 85
64 86
65 87 /**
66 - * Options page callback
67 - */
68 -function darkify_settings() {}
69 -
70 -
71 -/**
72 88 * Initialize the plugin tracker
73 89 *
74 90 * @return void
75 91 */
@@ -74,15 +90,14 @@
74 90 * @return void
75 91 */
76 92 function darkify_appsero_init()
77 93 {
78 -
79 94 if (!class_exists('DarkifyAppSero\Insights')) {
80 95 require_once DARKIFY_PATH . 'src/Admin/appsero/Client.php';
81 96 }
82 97
83 - $client = new DarkifyAppSero\Client('d1635433-15b4-474b-98f8-0c0809dec2c1', 'Darkify', __FILE__);
98 + $client = new DarkifyAppSero\Client('16b2d91f-fd42-42d1-b199-5ae98213496a', 'Darkify Dark Mode', __FILE__);
84 99 // Active insights
85 100 $client->insights()->init();
86 101 }
87 102
88 -darkify_appsero_init();
103 +add_action('plugins_loaded', 'darkify_appsero_init');