-
Notifications
You must be signed in to change notification settings - Fork 2
/
wp-church-center.php
executable file
·85 lines (60 loc) · 2.21 KB
/
wp-church-center.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* Plugin Name: WP Church Center
* Plugin URI: http://wpchurch.center
* Description: Provides a 'Next Steps' Center for your Church.
* Version: 1.3.3
* Author: Jordesign, WP Church Team
* Author URI: http://wpchurch.team/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: WP_Church_Center
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Include ACF. Current version bundled is 5.7.8
*/
add_action( 'after_setup_theme', 'wpcc_acf_setup' );
function wpcc_acf_setup() {
/** Check if ACF is used with another plugin, if not already called, use this one */
if( ! class_exists('acf') ) {
// 1. customize ACF path
add_filter('acf/settings/path', 'wpcc_acf_settings_path');
function wpcc_acf_settings_path( $path ) {
// update path
$path = plugin_dir_path( __FILE__ ) . '/advanced-custom-fields/';
// return
return $path;
}
// 2. customize ACF dir
add_filter('acf/settings/dir', 'wpcc_acf_settings_dir');
function wpcc_acf_settings_dir( $dir ) {
// update path
$dir = plugin_dir_url( __FILE__ ) . '/advanced-custom-fields/';
// return
return $dir;
}
// 3. Hide ACF field group menu item
add_filter('acf/settings/show_admin', '__return_false');
require_once plugin_dir_path( __FILE__ ) . 'advanced-custom-fields/acf.php';
}
}
/** Custom Post Type */
require_once plugin_dir_path( __FILE__ ) . 'cpt.php';
/** Customizer Panels */
require_once plugin_dir_path( __FILE__ ) . 'customizer.php';
/** PageTemplater Class to add Page Template */
require_once plugin_dir_path( __FILE__ ) . 'templates/pagetemplater.php';
/** Archive Page Templates */
require_once plugin_dir_path( __FILE__ ) . 'templates.php';
/** Shortcodes */
require_once plugin_dir_path( __FILE__ ) . 'shortcodes.php';
/** Function for dispaying the cards */
require_once plugin_dir_path( __FILE__ ) . 'card-loop.php';
/** Page Ordering */
require_once plugin_dir_path( __FILE__ ) . 'page-ordering/simple-page-ordering.php';
/** Stuff for the Admin */
require_once plugin_dir_path( __FILE__ ) . 'admin/admin.php';