forked from scottsawyer/acf-component-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathacf-component-manager.php
More file actions
95 lines (79 loc) · 2.16 KB
/
acf-component-manager.php
File metadata and controls
95 lines (79 loc) · 2.16 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/**
* ACF Component Manager plugin.
*
* @package acf-component-manager
*
* @wordpress-plugin
* Plugin Name: ACF Component Manager
* Description: Manages ACF based components.
* Version: 0.0.8
* Author: Scott Sawyer
* Text Domain: acf-component-manager
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Plugin version.
*/
define( 'ACF_COMPONENT_MANAGER_VERSION', '0.0.8' );
/**
* Minimum WordPress version.
*/
define( 'ACF_COMPONENT_MANAGER_MIN_WP_VERSION', '6.0' );
/**
* PHP Minimum version.
*/
define( 'ACF_COMPONENT_MANAGER_MIN_PHP_VERSION', '8.0' );
/**
* Misc constants.
*/
define( 'ACF_COMPONENT_MANAGER_FILE', __FILE__ );
define( 'ACF_COMPONENT_MANAGER_PATH', trailingslashit( plugin_dir_path( ACF_COMPONENT_MANAGER_FILE ) ) );
define( 'ACF_COMPONENT_MANAGER_ADMIN_ASSETS', trailingslashit( plugin_dir_url( ACF_COMPONENT_MANAGER_FILE ) ) . 'assets/admin/' );
/**
* Stored components option name.
*/
define( 'STORED_COMPONENTS_OPTION_NAME', 'acf_component_manager_components' );
/**
* Settings option name.
*/
define( 'SETTINGS_OPTION_NAME', 'acf-component-manager-settings' );
/**
* Sources option name.
*/
define( 'SOURCES_OPTION_NAME', 'acf-component-manager-sources' );
/**
* Notices option name.
*/
define( 'NOTICES_OPTION_NAME', 'acf-component-manager-notices' );
require_once 'includes/autoloader.php';
/**
* Activation.
*/
function acf_component_manager_activate() {
require_once ACF_COMPONENT_MANAGER_PATH . 'src/class-activator.php';
\AcfComponentManager\Activator::activate();
}
/**
* Deactivation.
*/
function acf_component_manager_deactivate() {
require_once ACF_COMPONENT_MANAGER_PATH . 'src/class-deactivator.php';
\AcfComponentManager\Deactivator::deactivate();
}
register_activation_hook( ACF_COMPONENT_MANAGER_FILE, 'acf_component_manager_activate' );
register_deactivation_hook( ACF_COMPONENT_MANAGER_FILE, 'acf_component_manager_deactivate' );
/**
* The core plugin class.
*/
require ACF_COMPONENT_MANAGER_PATH . 'src/class-acf-component-manager.php';
/**
* Begin execution.
*/
function acf_component_manager_run() {
$plugin = new AcfComponentManager\AcfComponentManager();
$plugin->run();
}
acf_component_manager_run();