-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcore-functionality-plugin.php
More file actions
65 lines (52 loc) · 2.16 KB
/
core-functionality-plugin.php
File metadata and controls
65 lines (52 loc) · 2.16 KB
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
59
60
61
62
63
64
65
<?php
/**
* Plugin Name: Core Functionality
* Plugin URI: https://github.com/jalberts/Core-Functionality
* Description: This contains all your site's core functionality so that it is theme agnostic.
* Version: 0.1.0
* Author: Joe Alberts <jra@umich.edu>
* @copyright Copyright (c) 2014, Joe Alberts
* License: GPL2 http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
* Core Functionality Plugin, heavily influenced by Bill Erikson's (see readme for more).
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
* General Public License version 2, as published by the Free Software Foundation. You may NOT assume
* that you can use any other version of the GPL.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
*/
/**
* Individual feature components. Uncomment the code to activate them.
*/
// Plugin Directory
//define( 'JRA_DIR', dirname( __FILE__ ) );
// Custom Post Types
//include_once( JRA_DIR . '/lib/functions/post-types.php' );
// Custom Taxonomies
//include_once( JRA_DIR . '/lib/functions/taxonomies.php' );
// Metabox Class
//include_once( JRA_DIR . '/lib/functions/metaboxes.php' );
//require_once( JRA_DIR . '/lib/metabox/custom-meta-boxes.php' );
// Widgets
//include_once( JRA_DIR . '/lib/widgets/widget-social.php' );
// Editor Style Refresh
//include_once( JRA_DIR . '/lib/functions/editor-style-refresh.php' );
// General
include_once( JRA_DIR . '/lib/functions/general.php' );
/**
* Activation/Deactivation
*/
// Flush Rewrite rules cache; needed when creating any new CPTs or taxonomies.
// If Custom Post Types are created after activation, deactivate and reactivate the plugin.
// To Do: Process this on registration of CPT, do avoid re-activating plugin.
function jra_corefunctionality_activate() {
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'jra_corefunctionality_activate' );
function jra_corefunctionality_deactivate() {
flush_rewrite_rules();
}
register_deactivation_hook( __FILE__, 'jra_corefunctionality_deactivate' );