-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsuperdraft.php
More file actions
45 lines (38 loc) · 1.29 KB
/
superdraft.php
File metadata and controls
45 lines (38 loc) · 1.29 KB
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
<?php
/**
* Plugin Name: Superdraft
* Description: A powerful AI-driven toolset that enhances your WordPress experience with smart automation, intelligent recommendations, and predictive features.
* Version: 1.1.4
* Author: Balázs Piller
* Author URI: https://wp-autoplugin.com
* Text Domain: superdraft
* Domain Path: /languages
* License: GPL-3.0
*
* @package Superdraft
* @since 1.0.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Define constants.
define( 'SUPERDRAFT_VERSION', '1.1.4' );
define( 'SUPERDRAFT_DIR', plugin_dir_path( __FILE__ ) );
define( 'SUPERDRAFT_URL', plugin_dir_url( __FILE__ ) );
// Include the autoloader.
require_once SUPERDRAFT_DIR . 'vendor/autoload.php';
// Load the Action Scheduler.
require_once SUPERDRAFT_DIR . 'vendor/woocommerce/action-scheduler/action-scheduler.php';
// Create the logs table.
register_activation_hook( __FILE__, [ 'Superdraft\Logger', 'activate' ] );
// Set default options.
register_activation_hook( __FILE__, [ 'Superdraft\Admin', 'set_default_options' ] );
/**
* Initialize the plugin.
*/
function superdraft_init() {
load_plugin_textdomain( 'superdraft', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
$admin = new Superdraft\Admin();
}
add_action( 'plugins_loaded', 'superdraft_init' );