forked from humanmade/Cavalcade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.php
30 lines (24 loc) · 988 Bytes
/
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
<?php
/**
* Plugin Name: Cavalcade
* Plugin URI: https://github.com/humanmade/Cavalcade
* Description: A better wp-cron. Horizontally scalable, works perfectly with multisite.
* Author: Human Made
* Author URI: https://hmn.md/
* License: GPLv2 or later
*/
namespace HM\Cavalcade\Plugin;
use WP_CLI;
const MYSQL_DATE_FORMAT = 'Y-m-d H:i:s';
const DATABASE_VERSION = 2;
require __DIR__ . '/inc/namespace.php';
require __DIR__ . '/inc/class-job.php';
require __DIR__ . '/inc/connector/namespace.php';
require __DIR__ . '/inc/upgrade/namespace.php';
add_action( 'plugins_loaded', __NAMESPACE__ . '\\bootstrap' );
add_action( 'plugins_loaded', __NAMESPACE__ . '\\register_cli_commands' );
add_action( 'plugins_loaded', __NAMESPACE__ . '\\Connector\\bootstrap' );
// Register cache groups as early as possible, as some plugins may use cron functions before plugins_loaded
if ( function_exists( 'wp_cache_add_global_groups' ) ) {
register_cache_groups();
}