-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathucf-events.php
58 lines (45 loc) · 1.41 KB
/
ucf-events.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
55
56
57
58
<?php
/*
Plugin Name: UCF Events
Description: Contains shortcode and widget for displaying UCF Events Feeds
Version: 2.1.6
Author: UCF Web Communications
License: GPL3
Github Plugin URI: UCF/UCF-Events-Plugin
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'UCF_EVENTS__PLUGIN_FILE', __FILE__ );
require_once 'includes/ucf-events-config.php';
require_once 'includes/ucf-events-feed.php';
require_once 'includes/ucf-events-common.php';
require_once 'includes/ucf-events-shortcode.php';
require_once 'includes/ucf-events-widget.php';
require_once 'layouts/ucf-events-classic.php';
require_once 'layouts/ucf-events-modern.php';
/**
* Activation/deactivation hooks
**/
if ( !function_exists( 'ucf_events_plugin_activation' ) ) {
function ucf_events_plugin_activation() {
return UCF_Events_Config::add_options();
}
}
if ( !function_exists( 'ucf_events_plugin_deactivation' ) ) {
function ucf_events_plugin_deactivation() {
return;
}
}
register_activation_hook( UCF_EVENTS__PLUGIN_FILE, 'ucf_events_plugin_activation' );
register_deactivation_hook( UCF_EVENTS__PLUGIN_FILE, 'ucf_events_plugin_deactivation' );
/**
* Plugin-dependent actions:
**/
add_action( 'plugins_loaded', function() {
if ( class_exists( 'WP_SCIF_Shortcode' ) ) {
add_filter( 'wp_scif_add_shortcode', 'ucf_events_shortcode_interface', 10, 1 );
add_filter( 'wp_scif_get_preview_stylesheets', 'ucf_events_shortcode_interface_styles', 10, 1 );
}
} );
?>