-
Notifications
You must be signed in to change notification settings - Fork 2
/
ucf-rss.php
58 lines (47 loc) · 1.4 KB
/
ucf-rss.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 RSS Feed Plugin
Description: Contains shortcode for displaying RSS feed data in posts.
Version: 1.0.4
Author: UCF Web Communications
License: GPL3
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'UCF_RSS__PLUGIN_FILE', __FILE__ );
require_once 'includes/ucf-rss-config.php';
require_once 'includes/ucf-rss-feed.php';
require_once 'includes/ucf-rss-common.php';
require_once 'includes/ucf-rss-shortcode.php';
require_once 'admin/ucf-rss-admin.php';
require_once 'layouts/rss-default.php';
require_once 'layouts/rss-thumbnail.php';
/**
* Activation/deactivation hooks
**/
if ( !function_exists( 'ucf_rss_plugin_activation' ) ) {
function ucf_rss_plugin_activation() {
return UCF_RSS_Config::add_configurable_options();
}
}
if ( !function_exists( 'ucf_rss_plugin_deactivation' ) ) {
function ucf_rss_plugin_deactivation() {
return;
}
}
register_activation_hook( UCF_RSS__PLUGIN_FILE, 'ucf_rss_plugin_activation' );
register_deactivation_hook( UCF_RSS__PLUGIN_FILE, 'ucf_rss_plugin_deactivation' );
/**
* Plugin-dependent actions:
**/
if ( ! function_exists( 'ucf_rss_init' ) ) {
function ucf_rss_init() {
// If the `WP-Shortcode-Interface` plugin is installed, add the shortcode
// definitions.
if ( class_exists( 'WP_SCIF_Config' ) ) {
add_filter( 'wp_scif_add_shortcode', 'ucf_rss_shortcode_interface', 10, 1 );
}
}
add_action( 'plugins_loaded', 'ucf_rss_init' );
}