-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccessibility-magic.php
More file actions
75 lines (63 loc) · 2.35 KB
/
accessibility-magic.php
File metadata and controls
75 lines (63 loc) · 2.35 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
<?php
/**
* Plugin Name: Accessibility Magic
* Plugin URI: https://handyplugins.co/wp-accessibility-toolkit/
* Description: Accessibility Magic is a collection of tools to make your WordPress website more accessible.
* Version: 1.0.1
* Requires at least: 5.0
* Requires PHP: 7.2
* 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: accessibility-magic
* Domain Path: /languages
*
* @package AccessibilityMagic
*/
namespace AccessibilityMagic;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Useful global constants.
define( 'ACCESSIBILITY_MAGIC_VERSION', '1.0.1' );
define( 'ACCESSIBILITY_MAGIC_DB_VERSION', '1.0' );
define( 'ACCESSIBILITY_MAGIC_PLUGIN_FILE', __FILE__ );
define( 'ACCESSIBILITY_MAGIC_URL', plugin_dir_url( __FILE__ ) );
define( 'ACCESSIBILITY_MAGIC_PATH', plugin_dir_path( __FILE__ ) );
define( 'ACCESSIBILITY_MAGIC_INC', ACCESSIBILITY_MAGIC_PATH . 'includes/' );
// deactivate free
if ( defined( 'ACCESSIBILITY_TOOLKIT_PRO_PLUGIN_FILE' ) ) {
if ( ! function_exists( 'deactivate_plugins' ) ) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
}
deactivate_plugins( plugin_basename( ACCESSIBILITY_TOOLKIT_PRO_PLUGIN_FILE ) );
return;
}
// Require Composer autoloader if it exists.
if ( file_exists( ACCESSIBILITY_MAGIC_PATH . '/vendor/autoload.php' ) ) {
require_once ACCESSIBILITY_MAGIC_PATH . 'vendor/autoload.php';
}
// Include files.
require_once ACCESSIBILITY_MAGIC_INC . 'constants.php';
require_once ACCESSIBILITY_MAGIC_INC . 'utils.php';
require_once ACCESSIBILITY_MAGIC_INC . 'core.php';
require_once ACCESSIBILITY_MAGIC_INC . 'settings.php';
require_once ACCESSIBILITY_MAGIC_INC . 'compat.php';
$accessibility_magic_network_activated = Utils\is_network_wide( ACCESSIBILITY_MAGIC_PLUGIN_FILE );
if ( ! defined( 'ACCESSIBILITY_MAGIC_IS_NETWORK' ) ) {
define( 'ACCESSIBILITY_MAGIC_IS_NETWORK', $accessibility_magic_network_activated );
}
/**
* Setup routine
*
* @return void
* @since 1.0 bootstrapping with plugins_loaded hook
*/
function setup_accessibility_magic() {
// Bootstrap.
Core\setup();
Compat\setup();
Settings\setup();
}
add_action( 'plugins_loaded', __NAMESPACE__ . '\\setup_accessibility_magic' );