forked from cyberwani/wp-alert-bars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wp-alert-bars.php
30 lines (25 loc) · 996 Bytes
/
wp-alert-bars.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: Delicious Brains WP Alert Bars
* Plugin URI: https://deliciousbrains.com
* Description: WordPress must-use plugin for managing alert bars.
* Author: Delicious Brains
* Version: 1.0
* Author URI: https://deliciousbrains.com
**/
define( 'DBI_ALERT_BAR_BASE_DIR', WPMU_PLUGIN_DIR . '/' . basename( __DIR__ ) );
define( 'DBI_ALERT_BAR_BASE_URL', WPMU_PLUGIN_URL . '/' . basename( __DIR__ ) );
add_action( 'plugins_loaded', 'dbi_alert_bars' );
function dbi_alert_bars() {
if ( ! class_exists( 'ACF' ) ) {
return;
}
require_once WP_PLUGIN_DIR . '/advanced-custom-fields-pro/includes/admin/admin-field-group.php';
( new DeliciousBrains\WPAlertBars\Admin\AlertBarScheduler() )->init();
( new DeliciousBrains\WPAlertBars\Admin\AlertBarRules() )->init();
( new DeliciousBrains\WPAlertBars\PostType\AlertBar() )->init();
( new DeliciousBrains\WPAlertBars\Display() )->init();
if ( is_admin() ) {
( new \DeliciousBrains\WPAlertBars\Admin\ACF() )->init();
}
}