forked from HandyPlugins/handywriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.php
executable file
·64 lines (53 loc) · 1.86 KB
/
plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Plugin Name: Handywriter – AI-Powered Writing Assistant for WordPress
* Plugin URI: https://handyplugins.co/handywriter/
* Description: Handywriter Assistant. AI-powered writing assistant that can help you create content for your WordPress.
* Version: 1.0.1
* Requires at least: 5.4
* Requires PHP: 5.6
* Author: HandyPlugins
* Author URI: https://handyplugins.co/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: handywriter
* Domain Path: /languages
*
* @package Handywriter
*/
namespace Handywriter;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Useful global constants.
define( 'HANDYWRITER_VERSION', '1.0.1' );
define( 'HANDYWRITER_PLUGIN_FILE', __FILE__ );
define( 'HANDYWRITER_URL', plugin_dir_url( __FILE__ ) );
define( 'HANDYWRITER_PATH', plugin_dir_path( __FILE__ ) );
define( 'HANDYWRITER_INC', HANDYWRITER_PATH . 'includes/' );
// Require Composer autoloader if it exists.
if ( file_exists( HANDYWRITER_PATH . 'vendor/autoload.php' ) ) {
include_once HANDYWRITER_PATH . 'vendor/autoload.php';
}
// Include files.
require_once HANDYWRITER_INC . 'constants.php';
require_once HANDYWRITER_INC . 'utils.php';
require_once HANDYWRITER_INC . 'core.php';
require_once HANDYWRITER_INC . 'history.php';
require_once HANDYWRITER_INC . 'admin/dashboard.php';
$network_activated = Utils\is_network_wide( HANDYWRITER_PLUGIN_FILE );
if ( ! defined( 'HANDYWRITER_IS_NETWORK' ) ) {
define( 'HANDYWRITER_IS_NETWORK', $network_activated );
}
register_deactivation_hook( __FILE__, '\Handywriter\Core\deactivate' );
/**
* Bootstrap the plugin.
*
* @return void
*/
function bootstrap() {
Core\setup();
History\setup();
Admin\Dashboard\setup();
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\\bootstrap' );