-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
plugin.php
54 lines (48 loc) · 1.26 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
<?php
/**
* Plugin Dependencies
*
* @author Andy Fragen
* @license MIT
* @link https://github.com/WordPress/wp-plugin-dependencies
* @package wp-plugin-dependencies
*/
/**
* Plugin Name: Plugin Dependencies
* Plugin URI: https://wordpress.org/plugins/wp-plugin-dependencies
* Description: Parses 'Requires Plugins' header and information about dependencies.
* Author: Andy Fragen, Colin Stewart, Paul Biron
* Version: 3.0.4
* License: MIT
* Network: true
* Requires at least: 6.4
* Requires PHP: 7.0
* GitHub Plugin URI: https://github.com/WordPress/wp-plugin-dependencies
* Primary Branch: trunk
*/
namespace WP_Plugin_Dependencies;
/*
* Exit if called directly.
* PHP version check and exit.
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
// TODO: update with correct version.
if ( version_compare( get_bloginfo( 'version' ), '6.5-beta1', '>=' )
|| \class_exists( 'WP_Plugin_Dependencies' )
) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
deactivate_plugins( __FILE__ );
return;
}
require_once __DIR__ . '/src/wp-includes/class-wp-plugin-dependencies.php';
\WP_Plugin_Dependencies::initialize();
// Let's get started.
add_action(
'plugins_loaded',
function () {
require_once __DIR__ . '/src/Init_Plugin.php';
Init_Plugin::init();
}
);